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