#--------------------------------------------------------------
# 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
# 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
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
# 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
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/ \
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)
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)
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)