OSDN Git Service

Merge remote branch 'origin/master' into nptl
[uclinux-h8/uClibc.git] / Makefile.in
index 6ac107d..691a597 100644 (file)
@@ -9,14 +9,13 @@
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
 clean_targets := clean realclean distclean \
-       objclean-y headers_clean-y utils_clean
+       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
-
 ifndef KCONFIG_CONFIG
 KCONFIG_CONFIG := $(top_builddir).config
 endif
@@ -114,7 +113,8 @@ target-headers-sysdep := \
        $(ALL_HEADERS_BITS_ARCH) \
        $(ALL_HEADERS_BITS_SUBARCH) \
        $(ALL_HEADERS_SYS_COMMON) \
-       $(ALL_HEADERS_SYS_ARCH)
+       $(ALL_HEADERS_SYS_ARCH) \
+       $(ALL_HEADERS_BITS_PTHREAD)
 
 $(top_builddir)include/fpu_control.h:
        @$(disp_ln)
@@ -148,20 +148,23 @@ endif
 
 $(target-headers-sysdep): | $(top_builddir)include/bits $(top_builddir)include/sys
 
-sysdep_common_headers-clean:
-       $(RM) $(ALL_HEADERS_COMMON)
-headers_clean-y += sysdep_common_headers-clean
+HEADERCLEAN_common:
+       $(do_rm) $(ALL_HEADERS_COMMON)
+headers_clean-y += HEADERCLEAN_common
 
 # The headers. Arch specific headers are specified via ARCH_HEADERS in
 # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
 # libc/sysdeps/linux/Makefile.commonarch to headers-y
 headers-y += $(target-headers-sysdep)
 
-headers: $(top_builddir)include/bits/uClibc_config.h
+headers: $(top_builddir)include/bits/uClibc_config.h $(top_builddir)include/bits/sysnum.h
 subdirs: $(addprefix $(top_builddir),$(subdirs))
-pregen: $(top_builddir)include/bits/sysnum.h headers subdirs
-
-$(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh | $(top_builddir)include/bits
+pregen-headers: headers
+       $(Q)$(MAKE) $(pregen-headers-y)
+pregen: pregen-headers subdirs
+       $(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
+$(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
+       $(Q)$(INSTALL) -d $(@D)
        @$(disp_gen)
        $(Q)set -e; \
        tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
@@ -305,7 +308,7 @@ endif
 install_dev: install_headers install_runtime | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
        -$(INSTALL) -m 644 $(top_builddir)lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
 ifeq ($(HAVE_SHARED),y)
-       for i in `find $(top_builddir)lib/ -type l -name 'lib[a-zA-Z]*.so' | \
+       for i in `cd $(top_builddir) && find lib/ -type l -name 'lib[a-zA-Z]*.so' | \
        $(SED) -e 's/lib\///'` ; do \
                $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \
                $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/$$i; \
@@ -343,7 +346,7 @@ ifeq ($(DOPIC),y)
 #      # If we build shared libraries then the static libs are PIC...
 #      # Make _pic.a symlinks to make mklibs.py and similar tools happy.
        if [ -d $(top_builddir)lib ] ; then \
-               for i in `find $(top_builddir)lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \
+               for i in `cd $(top_builddir) && find lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \
                        $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/`echo $$i \
                                | $(SED) -e 's/\.a$$/_pic.a/'`; \
                done ; \
@@ -430,7 +433,7 @@ defconfig: $(top_builddir)extra/config/conf
                -D extra/Configs/defconfigs/$(ARCH)
 
 menuconfig-clean-y:
-       $(Q)$(MAKE) -C extra/config menuconfig_clean
+       $(Q)$(MAKE) -C extra/config CLEAN_extra/config
 
 include_clean:
        $(Q)$(RM) $(top_builddir)include/fpu_control.h $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h
@@ -446,7 +449,7 @@ include_clean:
 
 clean: include_clean
        $(Q)$(RM) -r $(top_builddir)lib $(top_builddir)include/bits
-       @$(MAKE) -C utils utils_clean
+       @$(MAKE) -C utils CLEAN_utils
        +$(MAKE) -s -C test clean
        @$(RM) $(top_builddir)include/linux $(top_builddir)include/asm*
        $(Q)$(RM) $(top_builddir)extra/scripts/unifdef
@@ -459,11 +462,12 @@ distclean: clean
        $(MAKE) -C extra/config distclean
 
 dist release:
-       $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2
-       mkdir -p ../uClibc-$(VERSION)
-       git archive HEAD |(cd  ../uClibc-$(VERSION) && $(TAR) xf -)
-       $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
-       du -b ../uClibc-$(VERSION).tar.bz2
+       $(RM) ../uClibc-$(VERSION).tar
+       git archive HEAD --format=tar --prefix=uClibc-$(VERSION)/ \
+               > ../uClibc-$(VERSION).tar
+       cat ../uClibc-$(VERSION).tar | bzip2 -c9 > ../uClibc-$(VERSION).tar.bz2
+       cat ../uClibc-$(VERSION).tar | xz -e -c8 > ../uClibc-$(VERSION).tar.xz
+       du -b ../uClibc-$(VERSION).tar.{bz2,xz}
 
 test check: test_compile
        $(Q)$(MAKE) -C test