diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2017-05-16 13:19:32 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2017-05-16 15:18:17 +0200 |
commit | f4aa4cfe001d0637816577450aa2f35e23b5a653 (patch) | |
tree | f07c76dbef4bade65a77ac386faa2c3d39446ad8 /gnu/packages | |
parent | 407df789cf3c2f957ce3f96441a74e20bb0f7b2c (diff) | |
download | guix-f4aa4cfe001d0637816577450aa2f35e23b5a653.tar.gz |
gnu: stringtemplate4: Prettify "generate-grammar" phase.
* gnu/packages/java.scm (stringtemplate4)[arguments]: Rewrite "generate-grammar" phase to use "with-directory-excursion" and to report success or failure.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/java.scm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 6c8af7380a..b45569ae3f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -3226,17 +3226,18 @@ StringTemplate also powers ANTLR.") (arguments `(#:tests? #f #:jar-name (string-append ,name "-" ,version ".jar") + #:modules ((guix build ant-build-system) + (guix build utils) + (srfi srfi-1)) #:phases (modify-phases %standard-phases (add-before 'build 'generate-grammar - (lambda* (#:key inputs #:allow-other-keys) - (chdir "src/org/stringtemplate/v4/compiler/") - (for-each (lambda (file) - (display file) - (newline) - (system* "antlr3" file)) - '("STParser.g" "Group.g" "CodeGenerator.g")) - (chdir "../../../../..")))))) + (lambda _ + (with-directory-excursion "src/org/stringtemplate/v4/compiler/" + (every (lambda (file) + (format #t "~a\n" file) + (zero? (system* "antlr3" file))) + '("STParser.g" "Group.g" "CodeGenerator.g")))))))) (inputs `(("antlr3" ,antlr3-bootstrap) ("antlr2" ,antlr2) |