[git commit] buildsys: tweak KCONFIG_CONFIG export

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Mar 14 21:49:25 UTC 2013


commit: http://git.uclibc.org/uClibc/commit/?id=0a513103bf2a80787ec4c7064570d08ad36881aa
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

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 at gmail.com>
---
 Makefile.in           |   12 +++---------
 Rules.mak             |   16 +++++++++++++++-
 extra/config/Makefile |   20 +++++++++++---------
 test/Rules.mak        |    8 +++++++-
 4 files changed, 36 insertions(+), 20 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index f8f874d..163184b 100644
--- a/Makefile.in
+++ b/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
diff --git a/Rules.mak b/Rules.mak
index 04a69af..751c2fe 100644
--- a/Rules.mak
+++ b/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/ \
diff --git a/extra/config/Makefile b/extra/config/Makefile
index 46c3614..3cde226 100644
--- a/extra/config/Makefile
+++ b/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)
diff --git a/test/Rules.mak b/test/Rules.mak
index d5a9b1f..ed72db2 100644
--- a/test/Rules.mak
+++ b/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)


More information about the uClibc-cvs mailing list