Browse Source

buildsys: tweak KCONFIG_CONFIG export

0c3eb2da578bc7ba2e74d240e3249dce62ec725e moved KCONFIG_CONFIG around and
that broke propagation of config-settings to the testsuite. Fix that.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 11 years ago
parent
commit
0a513103bf
4 changed files with 36 additions and 20 deletions
  1. 3 9
      Makefile.in
  2. 15 1
      Rules.mak
  3. 11 9
      extra/config/Makefile
  4. 7 1
      test/Rules.mak

+ 3 - 9
Makefile.in

@@ -8,12 +8,6 @@
 #--------------------------------------------------------------
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
-clean_targets := clean realclean distclean \
-	objclean-y headers_clean-y CLEAN_utils
-noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
-	defconfig allyesconfig allnoconfig \
-	release dist tags help
-
 include $(top_srcdir)Rules.mak
 sub_headers := headers
 
@@ -61,7 +55,7 @@ ifeq ($(HAVE_DOT_CONFIG),y)
 # on spot to save us from alot of hazzle.
 $(top_builddir)include/bits/uClibc_config.h: $(conf) $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config
 	@$(disp_gen)
-	$(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
+	$(Q)$< -s $(top_srcdir)extra/Configs/Config.in
 	$(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
 	$(Q)$(MAKE) headers-y
 
@@ -512,8 +506,8 @@ clean: include_clean
 distclean: clean
 	-find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
 	$(RM) $(top_builddir).config $(top_builddir).config.old $(top_builddir).config.cmd
-	$(RM) $(top_builddir)extra/locale/*.tgz
-	$(MAKE) -C extra/config distclean
+	$(Q)$(RM) $(top_builddir)extra/locale/*.tgz
+	@$(MAKE) -C extra/config distclean
 
 dist release:
 	$(RM) ../uClibc-$(VERSION).tar

+ 15 - 1
Rules.mak

@@ -27,6 +27,13 @@ endif
 # file named ".config".  Don't mess with this file unless
 # you know what you are doing.
 
+clean_targets := clean realclean distclean \
+	objclean-y headers_clean-y CLEAN_utils
+noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
+	defconfig allyesconfig allnoconfig \
+	xconfig gconfig update-po-config mconf qconf gconf conf \
+	release dist tags help
+
 
 #-----------------------------------------------------------
 # If you are running a cross compiler, you will want to set
@@ -77,14 +84,21 @@ qstrip = $(strip $(subst ",,$(1)))
 ifndef KCONFIG_CONFIG
 KCONFIG_CONFIG := $(top_builddir).config
 endif
-export KCONFIG_CONFIG
 
 # Pull in the user's uClibc configuration
 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
 # Prevent make from searching
 __ABS_KCONFIG_CONFIG := $(abspath $(KCONFIG_CONFIG))
 -include $(__ABS_KCONFIG_CONFIG)
+else
+# else we have to tell config where to write .config
+export KCONFIG_CONFIG
 endif
+ifeq ($(HAVE_DOT_CONFIG),y)
+# tell config where our .config lives
+export KCONFIG_CONFIG
+endif
+
 TARGET_ARCH:=$(call qstrip,$(TARGET_ARCH))
 ifeq ($(TARGET_ARCH),)
 ARCH ?= $(shell uname -m | $(SED) -e s/i.86/i386/ \

+ 11 - 9
extra/config/Makefile

@@ -1,15 +1,17 @@
 top_srcdir ?= ../../
 
-include $(top_srcdir)Rules.mak
-include $(top_srcdir)Makerules
-
-# ugh
-top_srcdir:=$(shell cd $(top_srcdir) && pwd)/
 ifdef O
 top_builddir ?= ../../
 else
 top_builddir = ../../
 endif
+
+include $(top_srcdir)Rules.mak
+include $(top_srcdir)Makerules
+
+# ugh
+top_srcdir:=$(shell cd $(top_srcdir) && pwd)/
+
 srctree := $(top_srcdir)
 src := extra/config
 obj := $(top_builddir)$(src)
@@ -75,12 +77,12 @@ $(obj)/%:: $(top_srcdir)$(src)/%_shipped
 endif
 CLEAN_extra/config menuconfig_clean:
 	$(do_rm) $(clean-files) $(lxdialog) conf $(wildcard *.o)
-distclean: clean
-	$(do_rm) $(lxdialog) $(conf-objs) $(mconf-objs) \
+distclean: CLEAN_extra/config
+	$(Q)$(RM) -r $(lxdialog) $(conf-objs) $(mconf-objs) \
 		$(kxgettext-objs) \
 		$(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
-		.depend
-	$(do_rm) -r $(top_builddir)include/config
+		.depend \
+		$(top_builddir)include/config
 
 FORCE:
 .PHONY: FORCE clean distclean $(always)

+ 7 - 1
test/Rules.mak

@@ -12,7 +12,13 @@ abs_top_builddir ?= $(shell cd $(top_builddir); pwd)/
 
 TESTDIR=$(top_builddir)test/
 
-include $(top_builddir)/Rules.mak
+include $(top_srcdir)Rules.mak
+ifeq ($(filter $(clean_targets) CLEAN_%,$(MAKECMDGOALS)),)
+ifeq ($(HAVE_DOT_CONFIG),)
+$(error no HAVE_DOT_CONFIG, failed to read .config)
+endif
+endif
+
 ifdef UCLIBC_LDSO
 ifeq (,$(findstring /,$(UCLIBC_LDSO)))
 UCLIBC_LDSO := $(UCLIBC_LDSO)