From: Richard W.M. Jones Date: Sat, 4 Jan 2020 12:02:24 +0000 (+0000) Subject: build: Create dependencies for Goalfile itself. X-Git-Tag: v'0.2'~80 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=2b6dba02c641e5c2ab09700e20c1f76193869722;p=goals.git build: Create dependencies for Goalfile itself. --- diff --git a/Goalfile.in b/Goalfile.in index afe6c1e..88e0684 100644 --- a/Goalfile.in +++ b/Goalfile.in @@ -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 @@ -88,10 +88,11 @@ goal depend () = 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 %@ +} diff --git a/TODO b/TODO index e631e68..af661fd 100644 --- a/TODO +++ b/TODO @@ -28,4 +28,8 @@ Let within functions and goals, eg: 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