build: Create dependencies for Goalfile itself.
[goals.git] / Goalfile.in
index 4a80a3f..88e0684 100644 (file)
@@ -43,7 +43,7 @@ let objects = [
 
 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
@@ -81,17 +81,18 @@ goal depend () =
     rm -f %@ %@-t
     # Like many existing tools, ocamldep produces make-compatible
     # output which doesn't work directly in goals.
-    %OCAMLDEP -all -one-line %< |
+    %OCAMLDEP -all -one-line -I src %< |
         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 %@
+}