aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--Makefile.common2
-rw-r--r--dev/doc/build-system.txt29
3 files changed, 25 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index a8f8df9c0c..f97a2b98e1 100644
--- a/Makefile
+++ b/Makefile
@@ -85,9 +85,6 @@ stage2 $(STAGE2_TARGETS): stage1
stage3 $(STAGE3_TARGETS): stage2
$(call stage-template,3)
-glob.dump: stage2
- $(call stage-template,3)
-
###########################################################################
# Cleaning
###########################################################################
diff --git a/Makefile.common b/Makefile.common
index 0c37a3a7d4..3364edc314 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -805,7 +805,7 @@ VO_TARGETS:=logic arith bool narith zarith qarith lists strings sets \
funind cc subtac rtauto
STAGE3_TARGETS:=world install coqide coqide-files coq coqlib \
coqlight states pcoq-files check init theories theories-light contrib \
- doc $(VO_TARGETS)
+ doc glob.dump $(VO_TARGETS)
# For emacs:
diff --git a/dev/doc/build-system.txt b/dev/doc/build-system.txt
index c79a561542..516664720c 100644
--- a/dev/doc/build-system.txt
+++ b/dev/doc/build-system.txt
@@ -123,13 +123,27 @@ Exceptions are:
RECTYPESML in Makefile.common. If it is a .ml4 file, implement
RECTYPESML4 or '(*i ocamlflags i*)'; see TODO.
-New PHONY targets
------------------
+ - the file needs a specific Makefile entry; add it to Makefile.build
-If you want to add a new PHONY target to the build system, that is a
-target that is not the name of the file it creates, then:
+ - the files produced from the added file do not match an existing
+ pattern or entry in "Makefile". (All the common cases of
+ .ml{,i,l,y,4}, .v, .c, ... files that produces (respectively)
+ .cm[iox], .vo, .glob, .o, ... files with the same basename are
+ already covered.) In this case, see section "New targets".
- - add its rule to Makefile.build
+New targets
+-----------
+
+If you want to add:
+
+ - a new PHONY target to the build system, that is a target that is
+ not the name of the file it creates,
+
+ - a normal target is not already mapped to a stage by "Makefile"
+
+ then:
+
+ - add the necessary rule to Makefile.build, if any
- add the target to STAGEn_TARGETS, with n being the smallest stage
it can be built at, that is:
* 1 for OCaml code that doesn't use any Coq camlp4 grammar extension
@@ -138,6 +152,11 @@ target that is not the name of the file it creates, then:
does.
* 3 for Coq (.v) code.
+ *or*
+
+ add a pattern matching the target to the pattern lists for the
+ smallest stage it can be built at in "Makefile".
+
TODO
----