author | kergoth <kergoth> | 2002-11-05 18:26:02 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-11-05 18:26:02 (UTC) |
commit | 468f1826ade3afaf7a8b8587b297d9ec6e0ccf3f (patch) (side-by-side diff) | |
tree | 76a3e2002b736da582de22852c9b4e7cfa6de2f2 /Makefile.test | |
parent | bbacc58102236691c8161fac2674998ce428ac3c (diff) | |
download | opie-468f1826ade3afaf7a8b8587b297d9ec6e0ccf3f.zip opie-468f1826ade3afaf7a8b8587b297d9ec6e0ccf3f.tar.gz opie-468f1826ade3afaf7a8b8587b297d9ec6e0ccf3f.tar.bz2 |
Rearranged root makefile to fix dependencies on make targets, split config.in generation rules into .depends.cfgs
-rw-r--r-- | Makefile.test | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/Makefile.test b/Makefile.test index 3311cde..b30b85d 100644 --- a/Makefile.test +++ b/Makefile.test @@ -1,62 +1,82 @@ #!/usr/bin/make -f export OPIEDIR:=$(shell pwd) export TOPDIR:=$(OPIEDIR) export QMAKESPECSDIR=$(OPIEDIR)/mkspecs export QMAKESPEC=$(QMAKESPECSDIR)/qws/linux-generic-g++ -all : +# $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) +# in order to have a full set of config.in files. +# .depends depends on $(TOPDIR)/.config +# everything else depends on .depends, to ensure the dependencies are +# intact. +# +# NOTE: The order in which things happen in this makefile is +# -critical-. Do not rearrange this! + +all : $(TOPDIR)/.config + +$(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs + +all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends clean-configs : $(TOPDIR)/.depends @echo "Wiping generated config.in files..." @-rm -f $(configs) --include $(TOPDIR)/.config --include $(TOPDIR)/..config.cmd --include $(TOPDIR)/.depends +-include $(TOPDIR)/.depends.cfgs -all : $(TOPDIR)/.depends $(configs) $(subdir-y) +all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs) -./.config: $(configs) +$(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs) $(call descend,scripts/kconfig,conf) @if [ ! -e $@ ]; then \ cp $(TOPDIR)/def-configs/opie $@; \ fi; @$(MAKE) -C scripts/kconfig conf; ./scripts/kconfig/conf -s ./config.in -xconfig: $(configs) +# config rules must have the $(configs) var defined +# at the time that they run. we must ensure that .depends.cfgs +# is built and included by the time we reach this point. + +xconfig : $(call descend,scripts/kconfig,qconf) ./scripts/kconfig/qconf ./config.in -menuconfig: $(configs) scripts/lxdialog/lxdialog +menuconfig : scripts/lxdialog/lxdialog $(call descend,scripts/kconfig,mconf) ./scripts/kconfig/mconf ./config.in -config: $(configs) +config : $(call descend,scripts/kconfig,conf) ./scripts/kconfig/conf ./config.in -oldconfig: $(configs) +oldconfig : $(call descend,scripts/kconfig,conf) ./scripts/kconfig/conf -o ./config.in -randconfig: $(configs) +randconfig : $(call descend,scripts/kconfig,conf) ./scripts/kconfig/conf -r ./config.in -allyesconfig: $(configs) +allyesconfig : $(call descend,scripts/kconfig,conf) ./scripts/kconfig/conf -y ./config.in -allnoconfig: $(configs) +allnoconfig : $(call descend,scripts/kconfig,conf) ./scripts/kconfig/conf -n ./config.in -defconfig: $(configs) +defconfig : $(call descend,scripts/kconfig,conf) ./scripts/kconfig/conf -d ./config.in -include $(TOPDIR)/Rules.make +-include $(TOPDIR)/.config +-include $(TOPDIR)/..config.cmd +-include $(TOPDIR)/.depends +all : $(subdir-y) + +include $(TOPDIR)/Rules.make |