diff options
| author | letouzey | 2010-03-04 16:18:46 +0000 |
|---|---|---|
| committer | letouzey | 2010-03-04 16:18:46 +0000 |
| commit | 8ec7f7267d92cfc891a265c382e807bff5eefc40 (patch) | |
| tree | 3c35bf5dd1df1c47c248f3e170300fb460ba4a79 | |
| parent | a3fda4aa95b125545e1b64a57a56a20861dc0aa5 (diff) | |
Makefile: cleanup of comments + a few words about recent changes in dev/doc/build*.txt
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12840 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | Makefile | 50 | ||||
| -rw-r--r-- | Makefile.build | 17 | ||||
| -rw-r--r-- | dev/doc/build-system.dev.txt | 16 | ||||
| -rw-r--r-- | dev/doc/build-system.txt | 48 |
4 files changed, 77 insertions, 54 deletions
@@ -11,59 +11,31 @@ # Makefile for Coq # -# To be used with GNU Make. +# To be used with GNU Make >= 3.81. # -# This is the only Makefile. You won't find Makefiles in sub-directories -# and this is done on purpose. If you are not yet convinced of the advantages -# of a single Makefile, please read +# This Makefile is now separated into Makefile.{common,build,doc}. +# You won't find Makefiles in sub-directories and this is done on purpose. +# If you are not yet convinced of the advantages of a single Makefile, please +# read # http://miller.emu.id.au/pmiller/books/rmch/ # before complaining. # # When you are working in a subdir, you can compile without moving to the # upper directory using "make -C ..", and the output is still understood # by Emacs' next-error. -########################################################################### - - -# Specific command-line options to this Makefile +# +# Specific command-line options to this Makefile: # # make VERBOSE=1 # restore the raw echoing of commands # make NO_RECALC_DEPS=1 # avoid recomputing dependencies # make NO_RECOMPILE_LIB=1 # a coqtop rebuild does not trigger a stdlib rebuild # # Nota: the 1 above can be replaced by any non-empty value -# More details in dev/doc/build-system*.txt - - -# FAQ: special features used in this Makefile -# -# * Order-only dependencies: | -# -# Dependencies placed after a bar (|) should be built before -# the current rule, but having one of them is out-of-date do not -# trigger a rebuild of the current rule. -# See http://www.gnu.org/software/make/manual/make.html#Prerequisite-Types # -# * Annotation before commands: +/-/@ -# -# a command starting by - is always successful (errors are ignored) -# a command starting by + is runned even if option -n is given to make -# a command starting by @ is not echoed before being runned -# -# * Custom functions -# -# Definition via "define foo" followed by commands (arg is $(1) etc) -# Call via "$(call foo,arg1)" -# -# * Useful builtin functions -# -# $(subst ...), $(patsubst ...), $(shell ...), $(foreach ...), $(if ...) -# -# * Behavior of -include -# -# If the file given to -include doesn't exist, make tries to build it, -# but doesn't care if this build fails. This can be quite surprising, -# see in particular the -include in Makefile.stage* +# ---------------------------------------------------------------------- +# See dev/doc/build-system*.txt for more details/FAQ about this Makefile +# ---------------------------------------------------------------------- + ########################################################################### # File lists diff --git a/Makefile.build b/Makefile.build index e06c80596b..aec75d36f0 100644 --- a/Makefile.build +++ b/Makefile.build @@ -8,21 +8,8 @@ # $Id$ - -# Makefile for Coq -# -# To be used with GNU Make. -# -# This is the only Makefile. You won't find Makefiles in sub-directories -# and this is done on purpose. If you are not yet convinced of the advantages -# of a single Makefile, please read -# http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html -# before complaining. -# -# When you are working in a subdir, you can compile without moving to the -# upper directory using "make -C ..", and the output is still understood -# by Emacs' next-error. -########################################################################### +# This makefile is normally called by the main Makefile after setting +# some variables. ########################################################################### # Starting rule diff --git a/dev/doc/build-system.dev.txt b/dev/doc/build-system.dev.txt index d40143033f..3d9cba1436 100644 --- a/dev/doc/build-system.dev.txt +++ b/dev/doc/build-system.dev.txt @@ -1,6 +1,22 @@ + Since July 2007, Coq features a build system overhauled by Pierre Corbineau and Lionel Elie Mamane. +--------------------------------------------------------------------- +WARNING: +In March 2010 this build system has been heavily adapted by Pierre +Letouzey. In particular there no more explicit stage1,2. Stage3 +was removed some time ago when coqdep was splitted into coqdep_boot +and full coqdep. Ideas are still similar to what is describe below, +but: +1) .ml4 are explicitely turned into .ml files, which stay after build +2) we let "make" handle the inclusion of .d without trying to guess + what could be done at what time. Some initial inclusions hence + _fail_, but "make" tries again later and succeed. + +TODO: remove obsolete sections below and better describe the new approach +----------------------------------------------------------------------- + This file documents internals of the implementation of the build system. For what a Coq developer needs to know about the build system, see build-system.txt . diff --git a/dev/doc/build-system.txt b/dev/doc/build-system.txt index 9362aeeb37..b243ebe2ed 100644 --- a/dev/doc/build-system.txt +++ b/dev/doc/build-system.txt @@ -1,12 +1,60 @@ Since July 2007, Coq features a build system overhauled by Pierre Corbineau and Lionel Elie Mamane. +--------------------------------------------------------------------- +WARNING: +In March 2010 this build system has been heavily adapted by Pierre +Letouzey. In particular there no more explicit stage1,2. Stage3 +was removed some time ago when coqdep was splitted into coqdep_boot +and full coqdep. Ideas are still similar to what is describe below, +but: +1) .ml4 are explicitely turned into .ml files, which stay after build +2) we let "make" handle the inclusion of .d without trying to guess + what could be done at what time. Some initial inclusions hence + _fail_, but "make" tries again later and succeed. + +TODO: remove obsolete sections below and better describe the new approach +----------------------------------------------------------------------- + This file documents what a Coq developer needs to know about the build system. If you want to enhance the build system itself (or are curious about its implementation details), see build-system.dev.txt . The build system is not at its optimal state, see TODO section. + +FAQ: special features used in this Makefile +------------------------------------------- + +* Order-only dependencies: | + +Dependencies placed after a bar (|) should be built before +the current rule, but having one of them is out-of-date do not +trigger a rebuild of the current rule. +See http://www.gnu.org/software/make/manual/make.htmlPrerequisite-Types + +* Annotation before commands: +/-/@ + +a command starting by - is always successful (errors are ignored) +a command starting by + is runned even if option -n is given to make +a command starting by @ is not echoed before being runned + +* Custom functions + +Definition via "define foo" followed by commands (arg is $(1) etc) +Call via "$(call foo,arg1)" + +* Useful builtin functions + +$(subst ...), $(patsubst ...), $(shell ...), $(foreach ...), $(if ...) + +* Behavior of -include + +If the file given to -include doesn't exist, make tries to build it, +but doesn't care if this build fails. This can be quite surprising, +see in particular the -include in Makefile.stage* + + Stages in build system ---------------------- |
