summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-05-16 12:52:59 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-05-16 15:18:17 +0200
commitb101b4e8c1a5c9719b645708dfa0f7dda4b77f2d (patch)
treef002784b24f55b591072ccf87c174801460cfbfe /gnu/packages
parent2fcda6d291c3c7a1bbbc1960accc58a619b2c043 (diff)
downloadguix-b101b4e8c1a5c9719b645708dfa0f7dda4b77f2d.tar.gz
gnu: java-stringtemplate-3: Use return value in build phase.
* gnu/packages/java.scm (java-stringtemplate-3)[arguments]: Let
build phase "generate-grammar" return success or failure.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/java.scm16
1 files changed, 9 insertions, 7 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 8fe005b28d..123c49c9d5 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3165,6 +3165,9 @@ tree walking, and translation.")
     (arguments
      `(#:jar-name (string-append ,name "-" ,version ".jar")
        #:test-dir "test"
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (srfi srfi-1))
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'fix-tests
@@ -3175,13 +3178,12 @@ tree walking, and translation.")
              #t))
          (add-before 'build 'generate-grammar
            (lambda _
-             (let ((dir "src/org/antlr/stringtemplate/language/"))
-               (for-each (lambda (file)
-                           (display file)
-                           (newline)
-                           (system* "antlr" "-o" dir (string-append dir file)))
-                         '("template.g" "angle.bracket.template.g" "action.g"
-                           "eval.g" "group.g" "interface.g"))))))))
+             (with-directory-excursion "src/org/antlr/stringtemplate/language/"
+               (every (lambda (file)
+                        (format #t "~a\n" file)
+                        (zero? (system* "antlr" file)))
+                      '("template.g" "angle.bracket.template.g" "action.g"
+                        "eval.g" "group.g" "interface.g"))))))))
     (native-inputs
      `(("antlr" ,antlr2)
        ("java-junit" ,java-junit)))