OSDN Git Service

microblaze: Remove duplicate F_{S,G}ETPIPE_SZ
[uclinux-h8/uClibc.git] / Makefile.in
index 80c7099..3b8e043 100644 (file)
@@ -46,6 +46,7 @@ include $(top_srcdir)libc/Makefile.in
 
 conf := $(top_builddir)extra/config/conf
 mconf := $(top_builddir)extra/config/mconf
+nconf := $(top_builddir)extra/config/nconf
 
 ifeq ($(HAVE_DOT_CONFIG),y)
 # If the .config changes then we have to make sure that our includes are
@@ -53,9 +54,9 @@ ifeq ($(HAVE_DOT_CONFIG),y)
 # have uClibc_config.h as prerequisite but since we _symlink_ the headers
 # and do not (?) want to rely on 'make -L' we better update them right here,
 # 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
+$(top_builddir)include/bits/uClibc_config.h: $(conf) $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits
        @$(disp_gen)
-       $(Q)$< -s $(top_srcdir)extra/Configs/Config.in
+       $(Q)$< -s $(Kconfig)
        $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
        $(Q)$(MAKE) headers-y
 
@@ -66,6 +67,10 @@ MAKEFLAGS += -L
 $(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h:
        @true
 
+$(top_builddir)include/generated/unifdef_config.h: $(top_builddir)include/bits/uClibc_config.h | $(top_builddir)include/generated
+       @$(disp_gen)
+       $(Q)$(SED) -e '1,3d' $^ > $@
+
 # For the moment, we have to keep re-running this target
 # because the fix includes scripts rely on pre-processers
 # in order to generate the headers correctly :(.  That
@@ -167,6 +172,9 @@ $(target-headers-sysdep) $(pregen-headers-y): | $(top_builddir)include/bits $(to
 HEADERCLEAN_common:
        $(do_rm) $(ALL_HEADERS_COMMON)
 headers_clean-y += HEADERCLEAN_common
+HEADERCLEAN_config:
+       $(do_rm) -r $(addprefix $(top_builddir)include/,config generated)
+menuconfig-clean-y: HEADERCLEAN_config
 
 # The headers. Arch specific headers are specified via ARCH_HEADERS in
 # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
@@ -196,7 +204,8 @@ $(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscal
 
 .PHONY: $(LOCAL_INSTALL_PATH)
 $(LOCAL_INSTALL_PATH):
-       $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
+       $(Q)$(MAKE) PREFIX=$(LOCAL_INSTALL_PATH) \
+       RUNTIME_PREFIX=/ \
        DEVEL_PREFIX=/usr/ \
        HOSTCC="$(HOSTCC)" \
        install
@@ -216,6 +225,8 @@ $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
 # a "y" here means the feature is enabled and so we should *not* rm it.
 # if the option expands to nothing though, we can punt the headers.
 HEADERS_RM- := \
+       config \
+       generated \
        internal \
        cancel.h \
        dl-osinfo.h \
@@ -240,6 +251,8 @@ HEADERS_RM- := \
        bits/uClibc_va_copy.h \
        bits/sigcontextinfo.h \
        bits/stackinfo.h \
+       atomic.h \
+       bits/atomic.h \
        tls.h \
        rpc/des_crypt.h \
        rpc/key_prot.h \
@@ -280,6 +293,7 @@ HEADERS_RM-$(UCLIBC_HAS_THREADS)             += *thread*.h semaphore.h \
        bits/*thread*.h \
        bits/initspin.h
 HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE)      += atomic.h bits/atomic.h
+HEADERS_RM-$(UCLIBC_HAS_OBSTACK)             += obstack.h
 HEADERS_RM-$(UCLIBC_HAS_UTMPX)               += bits/utmpx.h utmpx.h
 HEADERS_RM-$(UCLIBC_HAS_WCHAR)               += wchar.h wctype.h
 HEADERS_RM-$(UCLIBC_HAS_WORDEXP)             += wordexp.h
@@ -287,6 +301,7 @@ HEADERS_RM-$(UCLIBC_HAS_XATTR)               += sys/xattr.h
 HEADERS_RM-$(UCLIBC_HAS_XLOCALE)             += xlocale.h
 HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC)          += \
        sys/cachectl.h \
+       bits/eventfd.h \
        sys/eventfd.h \
        sys/fsuid.h \
        bits/inotify.h \
@@ -323,7 +338,9 @@ $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR):
        $(do_mkdir)
 endif
 endif
-install_headers: headers $(top_builddir)extra/scripts/unifdef | $(PREFIX)$(DEVEL_PREFIX)include
+
+
+install_headers: headers $(top_builddir)extra/scripts/unifdef $(top_builddir)include/generated/unifdef_config.h | $(PREFIX)$(DEVEL_PREFIX)include
        @$(call disp_install,"include -> $(PREFIX)$(DEVEL_PREFIX)include")
        $(Q)top_builddir=$(top_builddir) \
        $(top_srcdir)extra/scripts/install_headers.sh \
@@ -437,48 +454,56 @@ hostutils: | pregen
 install_hostutils: hostutils
        $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
 
-$(addprefix $(top_builddir),include include/bits include/sys include/config lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
+$(addprefix $(top_builddir),include include/bits include/sys include/config include/generated lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
        $(do_mkdir)
 
 # configuration
 # ---------------------------------------------------------------------------
-$(conf) $(mconf): | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
+$(conf) $(mconf) $(nconf): | $(top_builddir)include/config $(top_builddir)include/generated $(top_builddir)extra/config/lxdialog
        $(Q)$(MAKE) -C extra/config $(@F)
 
 arch-defconfigs := $(notdir $(wildcard $(top_srcdir)extra/Configs/defconfigs/$(ARCH)/*_defconfig))
 
 menuconfig: $(mconf)
-       $(Q)$< extra/Configs/Config.in
-
+       $(Q)$< $(Kconfig)
 config: $(conf)
-       $(Q)$< extra/Configs/Config.in
-
-oldconfig: $(conf)
-       $(Q)$< -o extra/Configs/Config.in
+       $(Q)$< $(Kconfig)
+nconfig: $(nconf)
+       $(Q)$< $(Kconfig)
 
+oldaskconfig: $(conf)
+       $(Q)$< -a $(Kconfig)
 silentoldconfig: $(conf)
-       $(Q)$< -s extra/Configs/Config.in
-
-randconfig: $(conf)
-       $(Q)$< -r extra/Configs/Config.in
-
+       $(Q)$< -s $(Kconfig)
+oldconfig: $(conf)
+       $(Q)$< -o $(Kconfig)
+allnoconfig: $(conf)
+       $(Q)$< -n $(Kconfig)
 allyesconfig: $(conf)
-       $(Q)$< -y extra/Configs/Config.in
+       $(Q)$< -y $(Kconfig)
        $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \
                -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \
                -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \
                -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \
                -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \
                $(KCONFIG_CONFIG)
-       $(Q)$< -o extra/Configs/Config.in
-
-allnoconfig: $(conf)
-       $(Q)$< -n extra/Configs/Config.in
+       $(Q)$< -o $(Kconfig)
+alldefconfig: $(conf)
+       $(Q)$< -A $(Kconfig)
+randconfig: $(conf)
+       $(Q)$< -r $(Kconfig)
 
-cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
+cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ $(Kconfig)
 defconfig: $(conf)   ; $(cmd_defconfig)
 %_defconfig: $(conf) ; $(cmd_defconfig)
 
+savedefconfig: $(conf)
+       $(Q)$< -S defconfig $(Kconfig)
+listnewconfig: $(conf)
+       $(Q)$< -l $(Kconfig)
+olddefconfig: $(conf)
+       $(Q)$< -d $(Kconfig)
+
 menuconfig-clean-y:
        $(Q)$(MAKE) -C extra/config CLEAN_extra/config
 
@@ -497,7 +522,7 @@ clean: include_clean
        $(Q)$(RM) $(top_builddir)extra/scripts/unifdef
        $(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
 
-distclean: clean
+distclean: realclean
        -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
        $(Q)$(RM) $(top_builddir)extra/locale/*.tgz
@@ -512,7 +537,9 @@ dist release:
        du -b ../uClibc-$(VERSION).tar.{bz2,xz}
 
 test check: test_compile
-       $(Q)$(MAKE) -C test
+       $(Q)$(MAKE) -C test \
+               $(if $(O),top_builddir=$(O)/)
 
 test_compile: $(LOCAL_INSTALL_PATH)
-       $(Q)$(MAKE) -C test compile
+       $(Q)$(MAKE) -C test compile \
+               $(if $(O),top_builddir=$(O)/)