SOURCES: kernel-multiarch.make - put generated files to $KERNELOUT...

glen glen at pld-linux.org
Wed Feb 6 00:26:22 CET 2008


Author: glen                         Date: Tue Feb  5 23:26:22 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- put generated files to $KERNELOUTPUT, misc...

---- Files affected:
SOURCES:
   kernel-multiarch.make (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SOURCES/kernel-multiarch.make
diff -u SOURCES/kernel-multiarch.make:1.8 SOURCES/kernel-multiarch.make:1.9
--- SOURCES/kernel-multiarch.make:1.8	Tue Feb  5 21:47:54 2008
+++ SOURCES/kernel-multiarch.make	Wed Feb  6 00:26:17 2008
@@ -5,31 +5,38 @@
 
 include multiarch.make
 
-# multiarch kernel makefile
-all modules_install mrproper:
-	$(Q)$(MAKE) -C $(srctree) $(MAKE_OPTS) $<
+DEFCONFIG := $(KERNELSRC)/arch/$(SRCARCH)/configs/pld_defconfig
+KCONFIG   := $(KERNELOUTPUT)/.config
 
-$(objtree)/.config: $(srctree)/arch/$(SRCARCH)/defconfig
+kernel-config			:= $(KERNELOUTPUT)/scripts/kernel-config.py
+kernel-config-update	:= $(KERNELOUTPUT)/scripts/kernel-config-update.py
 
-pykconfig: $(objtree)/.config.conf
-	@echo 'pykconfig is up to date'
+all := $(filter-out all Makefile,$(MAKECMDGOALS))
 
-$(objtree)/.config.conf: $(objtree)/.config $(objtree)/scripts/kernel-config-update.py
-	@echo '  kernel-config-update.py $(ARCH) arch/$(SRCARCH)/defconfig.conf $< > $@'
-	$(Q)$(PYTHON) $(objtree)/scripts/kernel-config-update.py $(ARCH) $(srctree)/arch/$(SRCARCH)/defconfig.conf $< > .config.conf.tmp
-	$(Q)mv .config.conf.tmp $@
+all:
+	$(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $(MAKE_OPTS) $(all)
 
-$(srctree)/arch/$(SRCARCH)/defconfig: $(srctree)/arch/$(SRCARCH)/defconfig.conf $(objtree)/scripts/kernel-config.py
+$(KCONFIG): $(DEFCONFIG)
+
+pykconfig: $(KERNELOUTPUT)/kernel.conf
+	@echo '  $@ is up to date'
+
+$(KERNELOUTPUT)/kernel.conf: $(KCONFIG) $(kernel-config-update)
+	@echo '  kernel-config-update.py $(ARCH) $(KERNELOUTPUT)/.kernel.conf $< > $@'
+	$(Q)$(PYTHON) $(kernel-config-update) $(ARCH) $(KERNELOUTPUT)/.kernel.conf $< > .kernel.conf.tmp
+	$(Q)mv .kernel.conf.tmp $@
+
+$(DEFCONFIG): $(KERNELOUTPUT)/.kernel.conf $(kernel-config)
 	@echo '  kernel-config.py $(ARCH) $< $@'
 	$(Q)> .defconfig.tmp
-	$(Q)$(PYTHON) $(objtree)/scripts/kernel-config.py $(ARCH) $< .defconfig.tmp
+	$(Q)$(PYTHON) $(kernel-config) $(ARCH) $< .defconfig.tmp
 	$(Q)mv .defconfig.tmp $@
-	$(Q)ln -sf $@ $(objtree)/.config
+	$(Q)ln -sf $@ $(KCONFIG)
 
-$(srctree)/arch/$(SRCARCH)/defconfig.conf: $(CONFIGS) $(objtree)/defconfig-nodep.conf
+$(KERNELOUTPUT)/.kernel.conf: $(CONFIGS) $(KERNELOUTPUT)/.kernel-nodep.conf
 	$(Q)cat $^ > $@
 
-$(objtree)/defconfig-nodep.conf: $(CONFIG_NODEP)
+$(KERNELOUTPUT)/.kernel-nodep.conf: $(CONFIG_NODEP)
 	$(Q)if [ ! -f $@ ] || ! cmp -s $< $@; then \
 		echo '  cat $< > $@'; \
 		cat $< > $@; \
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-multiarch.make?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list