[git commit branch/0.9.33] buildsys: prevent make from searching for .config

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Jan 8 11:10:33 UTC 2013


commit: http://git.uclibc.org/uClibc/commit/?id=c562fca299b1efc4740b458f01036f55fbc090ae
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33

Fixes:
make distclean
mkdir /.config
make -C test/API clean
Reading makefile `../../.config' (search path) (don't care) (no ~ expansion)...
make: *** ../../.config: Is a directory.  Stop.

write(1, "Reading makefile `../../.config'"..., 80) = 80
open("../../.config", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("/usr/include/../../.config", O_RDONLY) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(6, 0x7f2fe3bfc000, 4096)           = -1 EISDIR (Is a directory)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 Makefile.in |    4 ----
 Rules.mak   |    9 ++++++++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 9ba590d..87b8e4b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,10 +16,6 @@ noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
 
 include $(top_srcdir)Rules.mak
 sub_headers := headers
-ifndef KCONFIG_CONFIG
-KCONFIG_CONFIG := $(top_builddir).config
-endif
-export KCONFIG_CONFIG
 
 ifeq ($(HAVE_DOT_CONFIG),y)
 
diff --git a/Rules.mak b/Rules.mak
index 7701abb..6608301 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -74,9 +74,16 @@ BUILD_CFLAGS = -Os -Wall
 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)),)
--include $(top_builddir).config
+# Prevent make from searching
+__ABS_KCONFIG_CONFIG := $(abspath $(KCONFIG_CONFIG))
+-include $(__ABS_KCONFIG_CONFIG)
 endif
 TARGET_ARCH:=$(call qstrip,$(TARGET_ARCH))
 ifeq ($(TARGET_ARCH),)


More information about the uClibc-cvs mailing list