me
/
guix
Archived
1
0
Fork 0

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.
master
Ricardo Wurmus 2017-05-16 12:52:59 +02:00
parent 2fcda6d291
commit b101b4e8c1
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 9 additions and 7 deletions

View File

@ -3165,6 +3165,9 @@ tree walking, and translation.")
(arguments (arguments
`(#:jar-name (string-append ,name "-" ,version ".jar") `(#:jar-name (string-append ,name "-" ,version ".jar")
#:test-dir "test" #:test-dir "test"
#:modules ((guix build ant-build-system)
(guix build utils)
(srfi srfi-1))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'check 'fix-tests (add-before 'check 'fix-tests
@ -3175,13 +3178,12 @@ tree walking, and translation.")
#t)) #t))
(add-before 'build 'generate-grammar (add-before 'build 'generate-grammar
(lambda _ (lambda _
(let ((dir "src/org/antlr/stringtemplate/language/")) (with-directory-excursion "src/org/antlr/stringtemplate/language/"
(for-each (lambda (file) (every (lambda (file)
(display file) (format #t "~a\n" file)
(newline) (zero? (system* "antlr" file)))
(system* "antlr" "-o" dir (string-append dir file))) '("template.g" "angle.bracket.template.g" "action.g"
'("template.g" "angle.bracket.template.g" "action.g" "eval.g" "group.g" "interface.g"))))))))
"eval.g" "group.g" "interface.g"))))))))
(native-inputs (native-inputs
`(("antlr" ,antlr2) `(("antlr" ,antlr2)
("java-junit" ,java-junit))) ("java-junit" ,java-junit)))