include "ocaml.gl"
-let subdirs = [ "m4", "src", "stdlib", "docs", "tests" ]
+let subdirs = [ "m4", "src", "stdlib", "docs", "man", "tests" ]
goal all = : "Goalfile", tool, documentation;
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
# 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.
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@"
"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"
]
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
+ ../run ./$t
+}