3 include $(depth)/make/toplevel-version.make
4 # Use alternate configurations alongside eachother:
6 # ./configure --enable-config=debug
9 # uses config-debug.make and config-debug.h; output goes to out-debug.
15 # Use same configuration, but different output directory:
19 # uses config.make and config.h; output goes to out-www.
24 outbase=out$(CONFIGSUFFIX)
31 config_make=$(depth)/config$(CONFIGSUFFIX).make
33 config_make=$(builddir)/config$(CONFIGSUFFIX).make
40 outroot=$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(pwd))
43 include $(config_make)
45 outdir=$(outroot)/$(outbase)
48 config_h=$(builddir)/config$(CONFIGSUFFIX).h
50 # The outdir that was configured for: best guess to find binaries
51 outconfbase=out$(CONFIGSUFFIX)
52 outconfdir=$(outroot)/$(outconfbase)
55 stepdir = $(stepmake)/stepmake
56 # for stepmake package
57 # stepdir = $(depth)/stepmake
59 STEPMAKE_TEMPLATES := generic $(STEPMAKE_TEMPLATES)
60 LOCALSTEPMAKE_TEMPLATES:= generic $(LOCALSTEPMAKE_TEMPLATES)
62 # Don't try to outsmart us, you puny computer!
63 # Well, UGH. This only removes builtin rules from
64 # subsequent $(MAKE)s, *not* from the current run!
65 ifeq ($(BUILTINS_REMOVED),)
66 export BUILTINS_REMOVED = yes
67 MAKE:=$(MAKE) --no-builtin-rules
68 include $(stepdir)/no-builtin-rules.make
74 -include $(addprefix $(depth)/make/,$(addsuffix -inclusions.make, $(LOCALSTEPMAKE_TEMPLATES)))
76 -include $(addprefix $(stepdir)/,$(addsuffix -inclusions.make, $(STEPMAKE_TEMPLATES)))
79 include $(addprefix $(stepdir)/,$(addsuffix -vars.make, $(STEPMAKE_TEMPLATES)))
81 # ugh. need to do this because of PATH :=$(topdir)/..:$(PATH)
82 include $(addprefix $(depth)/make/,$(addsuffix -vars.make, $(LOCALSTEPMAKE_TEMPLATES)))
85 include $(addprefix $(depth)/make/,$(addsuffix -rules.make, $(LOCALSTEPMAKE_TEMPLATES)))
86 include $(addprefix $(stepdir)/,$(addsuffix -rules.make, $(STEPMAKE_TEMPLATES)))
87 include $(addprefix $(depth)/make/,$(addsuffix -targets.make, $(LOCALSTEPMAKE_TEMPLATES)))
88 include $(addprefix $(stepdir)/,$(addsuffix -targets.make, $(STEPMAKE_TEMPLATES)))