git.annexia.org
/
goals.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Standardize running code in a single function, include prelude.sh.
[goals.git]
/
Goalfile.in
diff --git
a/Goalfile.in
b/Goalfile.in
index
0990d6a
..
393b4e9
100644
(file)
--- a/
Goalfile.in
+++ b/
Goalfile.in
@@
-33,17
+33,17
@@
let objects = [
"src/utils.cmx",
"src/cmdline.cmx",
"src/ast.cmx",
"src/utils.cmx",
"src/cmdline.cmx",
"src/ast.cmx",
- "src/eval.cmx",
- "src/run.cmx",
"src/parser.cmx",
"src/lexer.cmx",
"src/parse.cmx",
"src/parser.cmx",
"src/lexer.cmx",
"src/parse.cmx",
+ "src/eval.cmx",
+ "src/run.cmx",
"src/main.cmx"
]
let subdirs = [ "m4", "src", "stdlib", "tests" ]
"src/main.cmx"
]
let subdirs = [ "m4", "src", "stdlib", "tests" ]
-goal all = : ocaml_link ("src/goals", objects)
+goal all = :
"Goalfile",
ocaml_link ("src/goals", objects)
goal clean = {
for d in %subdirs; do
goal clean = {
for d in %subdirs; do
@@
-64,31
+64,35
@@
goal maintainer-clean = : clean {
"src/parser.mli", "src/parser.ml" : "src/parser.mly" {
%MENHIR --explain %<
"src/parser.mli", "src/parser.ml" : "src/parser.mly" {
%MENHIR --explain %<
+ # Hack required to break circular dependencies.
+ echo 'val lexer_read : (Lexing.lexbuf -> token) option ref' >> src/parser.mli
+ echo 'val eval_substitute : (Ast.env -> Ast.loc -> Ast.substs -> string) option ref' >> src/parser.mli
}
"src/lexer.ml" : "src/lexer.mll" {
%OCAMLLEX %<
}
}
"src/lexer.ml" : "src/lexer.mll" {
%OCAMLLEX %<
}
-# XXX Depends on *.ml *.mli, but we don't have a function for this yet.
# XXX Goalfile itself depends on this and we should probably have a
# way to reevaluate it.
# XXX Atomic output.
# XXX Goalfile itself depends on this and we should probably have a
# way to reevaluate it.
# XXX Atomic output.
-"src/.depend" : {
+goal depend () =
+"src/.depend" : wildcard ("src/*.ml"), wildcard ("src/*.mli") {
rm -f %@ %@-t
# Like many existing tools, ocamldep produces make-compatible
# output which doesn't work directly in goals.
rm -f %@ %@-t
# Like many existing tools, ocamldep produces make-compatible
# output which doesn't work directly in goals.
- %OCAMLDEP -all -one-line
src/*.ml src/*.mli
|
+ %OCAMLDEP -all -one-line
-I src %<
|
sed 's|[./[:alnum:]]\+|"&"|g' |
sed 's|" "|", "|g' |
sed 's|.*|& ;|' > %@-t
mv %@-t %@
}
sed 's|[./[:alnum:]]\+|"&"|g' |
sed 's|" "|", "|g' |
sed 's|.*|& ;|' > %@-t
mv %@-t %@
}
--include "src/.depend"
+-include "src/.depend"
;
-# XXX The Goalfile itself needs rules to rebuild it.
-#Makefile: Makefile.in ../config.status
-# ../config.status $@
-#config.ml: config.ml.in ../config.status
-# ../config.status $@
+"Goalfile": "Goalfile.in", "config.status" {
+ ./config.status %@
+}
+"src/config.ml" : "src/config.ml.in", "config.status" {
+ ./config.status %@
+}