Changes between Version 16 and Version 17 of Attic/Building/BuildSystem/New


Ignore:
Timestamp:
Jan 13, 2009 2:21:53 PM (7 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Attic/Building/BuildSystem/New

    v16 v17  
    288288# inc.mk
    289289
    290 -include inc1.mk
    291 
    292 inc1.mk : Makefile
     290include inc1.mk
     291
     292ifeq "$(PHASE)" "0"
     293
     294inc1.mk : inc.mk
    293295        echo "X = C" >$@
    294296
    295 ifneq "$(PHASE)" "0"
     297else
     298
    296299include inc2.mk
    297300
    298301inc2.mk : inc1.mk
    299302        echo "Y = $(X)" >$@
     303
    300304endif
    301305
     
    317321We could instead have abandoned '''make''''s automatic re-invocation mechanism altogether,
    318322and used three explicit phases (0, 1, and final), but in practice it's very convenient to use the automatic
    319 re-invocation in the final phase.  However no automatic re-invocation should happen
    320 in any phase except the final one.
     323re-invocation when there are no problematic dependencies.
     324
     325Note that the `inc1.mk` rule is ''only'' enabled in phase 0, so that if we accidentally call `inc.mk` without first performing phase 0, we will either get a failure (if `inc1.mk` doesn't exist), or otherwise '''make''' will not update `inc1.mk` if it is out-of-date.
    321326
    322327In the case of the GHC build system we need 4 such phases, see the