diff doc/devel/make.txt @ 20:bb115deb6fb2

Improve agfiles rule. (1) It didn't depend on $(AGCL) and it absolutely should have. (2) allow AGFORCE=1 to make it rebuild whether or not it looks out of date. (3) Document this.
author David A. Holland
date Mon, 13 Jun 2022 00:02:15 -0400
parents 12171da8943f
children
line wrap: on
line diff
--- a/doc/devel/make.txt	Tue May 31 02:06:45 2022 -0400
+++ b/doc/devel/make.txt	Mon Jun 13 00:02:15 2022 -0400
@@ -19,6 +19,7 @@
 
 	SAFE=1		Compile with "safe" AnaGram (see below)
 	UNSAFE=1	Compile with "unsafe" AnaGram (see below)
+	AGFORCE=1	Force the agfiles target to rebuild.
 
 If you add a file to the build, rerun "make rules" in the affected
 build directories. If you add a whole directory, you need to rerun the
@@ -34,6 +35,12 @@
 away the depend files (depend.mk and *.u or *.d) to keep make from
 complaining that it doesn't exist.
 
+Note that the 'agfiles' target will only rebuild the AnaGram output if
+it appears to be out of date, unless you specify AGFORCE=1. If you
+aren't certain whether it really rebuilt, check the date stamp in the
+output header file.
+
+
 Bootstrapping notes:
 
 AnaGram is partly written using itself. This creates the potential for
@@ -46,7 +53,9 @@
 If you *are* developing, the following precautions are taken:
 
    - By default, the build runs $(TOP)/bin/agcl, which you should
-     update by hand as you see fit.
+     update by hand as you see fit. Note: update it from the copy
+     the build produces in anagram/run, not the one in anagram/agcl.
+     The latter doesn't have the checksums in it and won't run.
 
    - If you set SAFE (e.g., make SAFE=1) the build system will run
      $(TOP)/bin/safe-agcl instead, the idea being that you can be
@@ -67,10 +76,10 @@
 executable.
 
 Also note that if you are developing you should always configure with
---enable-maintainer-mode, and this *requires* $(TOP)/bin/agcl to exist
-in order to test-compile the examples. This also creates a minor
-bootstrap problem: if you don't already have an agcl to place in
-$(TOP)/bin, you have to compile one. The easiest way is as follows:
+--enable-maintainer-mode, and this *requires* $(TOP)/bin/agcl to
+exist. This also creates a minor bootstrap problem: if you don't
+already have an agcl to place in $(TOP)/bin, you have to compile
+one. The easiest way is as follows:
 
    path-to-source/configure native
    make rules
@@ -81,3 +90,13 @@
    make rules
    make
 
+And finally, note that the 'agfiles' target depends make-style, that
+is, by timestamp, on the agcl executable selected. If reverting to an
+older version, including via SAFE=1, it is a good idea to also
+AGFORCE=1 on the make command line, or run the 'agclean' target
+first. (There is also no such dependency when maintainer mode is not
+enabled, because that would preclude building from scratch.)
+
+The premise is that changes to the sources are much more common than
+material changes to the output that require rebuilding the parsers
+used in AnaGram itself.