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
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 %@
+}
Unclear if this would be helpful or not.
Implement more make functions, see:
-https://www.gnu.org/software/make/manual/html_node/Functions.html#Functions
\ No newline at end of file
+https://www.gnu.org/software/make/manual/html_node/Functions.html#Functions
+
+Make re-execs itself if the Makefile (or any include) changes, and
+goals should do something similar. See:
+https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html