X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=Goalfile.in;h=623a09da43f75523a2d20e0bfee95755456a7db5;hb=e23952e03c37201fe805ad3d1635e7d2d41e5908;hp=3a41cbf414fb6a0c8def9a2ee7d8b45decf1b464;hpb=00dfdab0481c531b8608a157dc4c4991f319d7f7;p=goals.git diff --git a/Goalfile.in b/Goalfile.in index 3a41cbf..623a09d 100644 --- a/Goalfile.in +++ b/Goalfile.in @@ -18,7 +18,7 @@ include "ocaml.gl" -let subdirs = [ "m4", "src", "stdlib", "docs", "tests" ] +let subdirs = [ "m4", "src", "stdlib", "docs", "man", "tests" ] goal all = : "Goalfile", tool, documentation; @@ -37,7 +37,8 @@ goal clean = { popd done rm -f src/parser.ml src/parser.mli src/lexer.ml src/parser.conflicts - rm -f docs/*.1 + rm -f man/*.1 man/*.5 + rm -f tests/*.log # We don't delete src/goals because it is required to do builds. # If you want to really delete it, use the maintainer-clean rule. @@ -56,7 +57,7 @@ let OCAMLFIND = "@OCAMLFIND@" let OCAMLLEX = "@OCAMLLEX@" # XXX let OCAMLFLAGS = [ "-g", "-safe-string", "-warn-error", "CDEFLMPSUVYZX+52-3" ] -let OCAMLPACKAGES = [ "-package", "str,unix", "-I", "src" ] +let OCAMLPACKAGES = [ "-package", "str,unix,threads", "-I", "src", "-thread" ] #let OCAMLFLAGS = "@OCAMLFLAGS@" #let OCAMLPACKAGES = "@OCAMLPACKAGES@" @@ -65,11 +66,13 @@ let objects = [ "src/config.cmx", "src/utils.cmx", "src/cmdline.cmx", + "src/jobs.cmx", "src/ast.cmx", "src/parser.cmx", "src/lexer.cmx", "src/parse.cmx", "src/eval.cmx", + "src/deps.cmx", "src/run.cmx", "src/main.cmx" ] @@ -110,14 +113,42 @@ goal depend = let POD2MAN = "@POD2MAN@" -goal documentation = : pod2man ("goals") +goal documentation = : pod2man ("goals", "1"), + pod2man ("Goalfile", "5"), + pod2man ("goals-reference", "5") -goal pod2man (page) = -"docs/%page.1" : "docs/%page.pod" { +goal pod2man (page, section) = +"man/%page.%section" : "docs/%page.pod" { rm -f %@ %@-t + mkdir -p man %POD2MAN \ + -u \ -c "goals" \ --release "@PACKAGE_NAME@-@PACKAGE_VERSION@" \ - --section 1 %< > %@-t + --section %section %< > %@-t mv %@-t %@ -} \ No newline at end of file +} + +#---------------------------------------------------------------------- +# Tests. + +let tests = wrap ("test", wildcard ("tests/*.sh")) + +goal check () = : tests + +goal test (name) = @{ + t=`basename %name` + cd tests + if ../run ./$t > $t.log 2>&1; then + start_green + echo -n "PASS: " + end_colour + echo $t + else + start_red + echo -n "FAIL: " + end_colour + echo $t + exit 1 + fi +}