3 include $(depth
)/make
/toplevel-version.make
5 # Use alternate configurations alongside eachother:
7 # ./configure --enable-config=debug
10 # uses config-debug.make and config-debug.h; output goes to out-debug.
16 # Use same configuration, but different output directory:
20 # uses config.make and config.h; output goes to out-www.
25 outbase
=out
$(CONFIGSUFFIX
)
29 configuration
=$(config
)
32 configuration
=$(depth
)/config
$(CONFIGSUFFIX
).make
34 configuration
=$(builddir
)/config
$(CONFIGSUFFIX
).make
41 outroot
=$(builddir
)/$(patsubst $(shell cd
$(depth
); pwd
)%,%,$(pwd
))
44 include $(configuration
)
46 outdir
=$(outroot
)/$(outbase
)
47 config_h
=$(builddir
)/config
$(CONFIGSUFFIX
).h
49 # The outdir that was configured for: best guess to find binaries
50 outconfbase
=out
$(CONFIGSUFFIX
)
51 outconfdir
=$(outroot
)/$(outconfbase
)
54 stepdir
= $(stepmake
)/stepmake
55 # for stepmake package
56 # stepdir = $(depth)/stepmake
58 STEPMAKE_TEMPLATES
:= generic
$(STEPMAKE_TEMPLATES
)
59 LOCALSTEPMAKE_TEMPLATES
:= generic
$(LOCALSTEPMAKE_TEMPLATES
)
61 # Don't try to outsmart us, you puny computer!
62 # Well, UGH. This only removes builtin rules from
63 # subsequent $(MAKE)s, *not* from the current run!
64 ifeq ($(BUILTINS_REMOVED
),)
65 export BUILTINS_REMOVED
= yes
66 MAKE
:=$(MAKE
) --no-builtin-rules
67 include $(stepdir
)/no-builtin-rules.make
73 -include $(addprefix $(depth
)/make
/,$(addsuffix -inclusions.make
, $(LOCALSTEPMAKE_TEMPLATES
)))
75 -include $(addprefix $(stepdir
)/,$(addsuffix -inclusions.make
, $(STEPMAKE_TEMPLATES
)))
78 include $(addprefix $(stepdir
)/,$(addsuffix -vars.make
, $(STEPMAKE_TEMPLATES
)))
80 # ugh. need to do this because of PATH :=$(topdir)/..:$(PATH)
81 include $(addprefix $(depth
)/make
/,$(addsuffix -vars.make
, $(LOCALSTEPMAKE_TEMPLATES
)))
84 include $(addprefix $(depth
)/make
/,$(addsuffix -rules.make
, $(LOCALSTEPMAKE_TEMPLATES
)))
85 include $(addprefix $(stepdir
)/,$(addsuffix -rules.make
, $(STEPMAKE_TEMPLATES
)))
86 include $(addprefix $(depth
)/make
/,$(addsuffix -targets.make
, $(LOCALSTEPMAKE_TEMPLATES
)))
87 include $(addprefix $(stepdir
)/,$(addsuffix -targets.make
, $(STEPMAKE_TEMPLATES
)))