summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2021-09-07 19:14:13 -0700
committerH. Peter Anvin <hpa@zytor.com>2021-09-07 19:14:13 -0700
commit6d8772a9314c2f140d2af06c03fabf5d18317cf4 (patch)
tree7dd8a47bf10f13bda400a3e55fd90235ce203f6e
parent7fc934e041411573730365bc19c9b92991c1433d (diff)
downloadktest-master.tar.gz
ktest-master.tar.xz
ktest-master.zip
Better handling of configurationsHEADmaster
-rw-r--r--allmake.mk34
1 files changed, 20 insertions, 14 deletions
diff --git a/allmake.mk b/allmake.mk
index 4090054..7e53131 100644
--- a/allmake.mk
+++ b/allmake.mk
@@ -3,29 +3,35 @@ all: $(ALL:=.everything)
.SECONDEXPANSION:
%.everything : %.all %.isoimage %.hdimage
- @: nothing more to do, but make wants at least one recipe
+ @: nothing to do, but make wants at least one recipe
-%.yes %.no %.mod :
- mkdir -p o.$@
- KCONFIG_ALLCONFIG="$(here)/override.$(subst $*.,,$@)" \
- $(MAKE) $(MAKEOPT_$@) $(OPTS) \
- all$(subst $*.,,$@)config \
- | tee -a o.$@/make.log
+%.setup :
+ mkdir -p o.$*
+ rm -f o.$*/make.log
-%.cf : o.%.cf/.config
- $(MAKE) $(MAKEOPT_$@) $(OPTS) olddefconfig \
- | tee -a o.$@/make.log
+allconfig = \
+
+%.config : %.setup
+ conf="$*" ; \
+ conf="$${conf##*.}" ; \
+ KCONFIG_ALLCONFIG="$(here)/override.$$conf" \
+ $(MAKE) $(MAKEOPT_$*) $(OPTS) all$${conf}config \
+ | tee -a o.$*/make.log
+
+autoconf := include/generated/autoconf.h
+
+%.cf.config : o.%.cf/.config %.cf.setup
+ $(MAKE) $(MAKEOPT_$*.cf) $(OPTS) olddefconfig \
+ | tee -a o.$*.cf/make.log
.PRECIOUS: o.%.cf/.config
-o.%.cf/.config : $(here)/%.cf
- mkdir -p $(@D)
+o.%.cf/.config : $(here)/%.cf %.cf.setup
cp -f $< $@
-%.all : %
+%.all : %.config
$(MAKE) $(MAKEOPT_$*) $(OPTS) $(subst $*.,,$@) \
| tee -a o.$*/make.log
%.isoimage %.hdimage : %.all
$(MAKE) $(MAKEOPT_$*) $(OPTS) $(subst $*.,,$@) \
| tee -a o.$*/make.log
-