]> git.donarmstrong.com Git - lilypond.git/blob - make/stepmake.make
* Documentation/user/refman.itely: Compile fix for \mark #'(music ...).
[lilypond.git] / make / stepmake.make
1 # make/Stepmake.make
2
3
4 all: foe
5
6 foe:
7         @echo one=.$(shell cd $(builddir); pwd).
8         @echo two=.$(shell cd $(depth); pwd).
9
10 include $(depth)/make/toplevel-version.make
11
12
13 # Use alternate configurations alongside eachother:
14 #
15 #     ./configure --enable-config=debug
16 #     make conf=debug
17 #
18 # uses config-debug.make and config-debug.h; output goes to out-debug.
19 #
20 ifdef conf
21   CONFIGSUFFIX=-$(conf)
22 endif
23
24 # Use same configuration, but different output directory:
25 #
26 #     make out=www
27 #
28 # uses config.make and config.h; output goes to out-www.
29 #
30 ifdef out
31   outbase=out-$(out)
32 else
33   outbase=out$(CONFIGSUFFIX)
34 endif
35
36 ifdef config
37   configuration=$(config)
38 else
39   ifeq ($(builddir),)
40     configuration=$(depth)/config$(CONFIGSUFFIX).make
41   else
42     configuration=$(builddir)/config$(CONFIGSUFFIX).make
43   endif
44 endif
45
46 ifeq ($(builddir),)
47   outroot=.
48 else
49   outroot=$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(pwd))
50 endif
51
52 include $(configuration)
53
54 outdir=$(outroot)/$(outbase)
55 config_h=$(builddir)/config$(CONFIGSUFFIX).h
56
57 # The outdir that was configured for: best guess to find binaries
58 outconfbase=out$(CONFIGSUFFIX)
59 outconfdir=$(outroot)/$(outconfbase)
60
61 # user package
62 stepdir = $(stepmake)/stepmake
63 # for stepmake package
64 # stepdir = $(depth)/stepmake
65
66 STEPMAKE_TEMPLATES := generic $(STEPMAKE_TEMPLATES) 
67 LOCALSTEPMAKE_TEMPLATES:= generic $(LOCALSTEPMAKE_TEMPLATES)
68
69 # Don't try to outsmart us, you puny computer!
70 # Well, UGH.  This only removes builtin rules from
71 # subsequent $(MAKE)s, *not* from the current run!
72 ifeq ($(BUILTINS_REMOVED),)
73   export BUILTINS_REMOVED = yes
74   MAKE:=$(MAKE) --no-builtin-rules
75   include $(stepdir)/no-builtin-rules.make
76 endif
77 .SUFFIXES:
78
79 all:
80
81 -include $(addprefix $(depth)/make/,$(addsuffix -inclusions.make, $(LOCALSTEPMAKE_TEMPLATES)))
82
83 -include $(addprefix $(stepdir)/,$(addsuffix -inclusions.make, $(STEPMAKE_TEMPLATES)))
84
85
86 include $(addprefix $(stepdir)/,$(addsuffix -vars.make, $(STEPMAKE_TEMPLATES)))
87
88 # ugh. need to do this because of PATH :=$(topdir)/..:$(PATH) 
89 include $(addprefix $(depth)/make/,$(addsuffix -vars.make, $(LOCALSTEPMAKE_TEMPLATES))) 
90
91
92 include $(addprefix $(depth)/make/,$(addsuffix -rules.make, $(LOCALSTEPMAKE_TEMPLATES))) 
93 include $(addprefix $(stepdir)/,$(addsuffix -rules.make, $(STEPMAKE_TEMPLATES))) 
94 include $(addprefix $(depth)/make/,$(addsuffix -targets.make, $(LOCALSTEPMAKE_TEMPLATES))) 
95 include $(addprefix $(stepdir)/,$(addsuffix -targets.make, $(STEPMAKE_TEMPLATES))) 
96
97