svn commit: branches/uClibc-nptl: extra/scripts

carmelo at uclibc.org carmelo at uclibc.org
Wed Mar 5 14:37:51 UTC 2008


Author: carmelo
Date: 2008-03-05 06:37:50 -0800 (Wed, 05 Mar 2008)
New Revision: 21168

Log:
Synch with trunk.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com


Added:
   branches/uClibc-nptl/extra/scripts/conf-header.sh

Modified:
   branches/uClibc-nptl/Makefile.in
   branches/uClibc-nptl/README


Changeset:
Modified: branches/uClibc-nptl/Makefile.in
===================================================================
--- branches/uClibc-nptl/Makefile.in	2008-03-05 14:29:49 UTC (rev 21167)
+++ branches/uClibc-nptl/Makefile.in	2008-03-05 14:37:50 UTC (rev 21168)
@@ -8,7 +8,7 @@
 #--------------------------------------------------------------
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
-noconfig_targets := menuconfig config oldconfig randconfig \
+noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
 	defconfig allyesconfig allnoconfig clean distclean \
 	release dist tags
 
@@ -37,9 +37,11 @@
 include $(top_srcdir)libc/Makefile.in
 
 include/bits/uClibc_config.h: extra/config/conf .config
-	$(INSTALL) -d $(dir $@)
-	@$< -o $(top_srcdir)extra/Configs/Config.in
+	$(Q)$(INSTALL) -d $(dir $@)
+	$(Q)@$< -o $(top_srcdir)extra/Configs/Config.in
+	$(top_srcdir)extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h
 
+
 # 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
@@ -52,7 +54,8 @@
 endif
 HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
 HEADERS_BITS_ARCH   := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
-HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH),$(HEADERS_BITS_COMMON))
+HEADERS_BITS_SUBARCH   := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
+HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH),$(HEADERS_BITS_COMMON))
 
 headers_sysnum:
 	$(Q)\
@@ -72,7 +75,7 @@
 	$(Q)$(MAKE) headers-y
 	$(Q)\
 	set -e; \
-	if [ -f libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h ] ; then \
+	if [ -e libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h ] ; then \
 		$(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h include/ ; \
 	else \
 		$(LN) -fs ../libc/sysdeps/linux/common/fpu_control.h include/ ; \
@@ -88,6 +91,9 @@
 	done; \
 	for i in $(HEADERS_BITS_ARCH) ; do \
 		$(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$$i .; \
+	done; \
+	for i in $(HEADERS_BITS_SUBARCH) ; do \
+		$(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$$i .; \
 	done
 	$(Q)\
 	cd include/sys; \
@@ -128,7 +134,7 @@
 RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib)
 
 # Installs header files.
-install_headers:
+install_headers: headers
 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
 	printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \
 	$(TAR) -chf - -X tar_exclude include \
@@ -136,6 +142,8 @@
 	rm -f tar_exclude
 	printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \
 		$(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
+	echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
+		$(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/_lfs_64.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_uintmaxtostr.h
@@ -150,6 +158,11 @@
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h
 endif
+ifneq ($(UCLIBC_HAS_FENV),y)
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/fenv.h \
+		$(PREFIX)$(DEVEL_PREFIX)include/bits/fenv.h \
+		$(PREFIX)$(DEVEL_PREFIX)include/bits/fenvinline.h
+endif
 ifneq ($(UCLIBC_HAS_WCHAR),y)
 	# Remove wide char headers since wide char support is disabled.
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h
@@ -208,6 +221,11 @@
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h
 endif
+ifneq ($(HAVE_SHARED),y)
+	# Remove dlfcn header if we don't have shared libraries.
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/dlfcn.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/dlfcn.h
+endif
 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
 	# Remove this as it is only used internally.
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/tls.h
@@ -301,24 +319,30 @@
 
 endif # ifeq ($(HAVE_DOT_CONFIG),y)
 
+include/bits:
+	$(INSTALL) -d include/bits
+
 # configuration
 # ---------------------------------------------------------------------------
-extra/config/conf extra/config/mconf:
-	$(MAKE) -C extra/config $(notdir $@)
+extra/config/conf extra/config/mconf: include/bits
+	$(Q)$(MAKE) -C extra/config $(notdir $@)
 
-menuconfig: extra/config/mconf
+menuconfig: extra/config/mconf include/bits
 	$(Q)./extra/config/mconf extra/Configs/Config.in
 
-config: extra/config/conf
+config: extra/config/conf include/bits
 	$(Q)./extra/config/conf extra/Configs/Config.in
 
-oldconfig: extra/config/conf
+oldconfig: extra/config/conf include/bits
 	$(Q)./extra/config/conf -o extra/Configs/Config.in
 
-randconfig: extra/config/conf
+silentoldconfig: extra/config/conf include/bits
+	$(Q)./extra/config/conf -s extra/Configs/Config.in
+
+randconfig: extra/config/conf include/bits
 	$(Q)./extra/config/conf -r extra/Configs/Config.in
 
-allyesconfig: extra/config/conf
+allyesconfig: extra/config/conf include/bits
 	$(Q)./extra/config/conf -y extra/Configs/Config.in
 	sed -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config
 	sed -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config
@@ -327,18 +351,17 @@
 	sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
 	$(Q)./extra/config/conf -o extra/Configs/Config.in
 
-allnoconfig: extra/config/conf
+allnoconfig: extra/config/conf include/bits
 	$(Q)./extra/config/conf -n extra/Configs/Config.in
 
-defconfig: extra/config/conf
+defconfig: extra/config/conf include/bits
 	$(Q)./extra/config/conf -d extra/Configs/Config.in
 
 clean:
 	$(Q)$(RM) -r lib include/bits
 	$(RM) lib*/*.a ldso/*/*.a libpthread/*/*.a
 	$(RM) include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
-	$(MAKE) -C extra/locale locale_clean
-	$(MAKE) headers_clean-y
+	$(MAKE) objclean-y headers_clean-y
 	$(MAKE) -s -C test clean
 	$(MAKE) -C utils utils_clean
 	@set -e; \
@@ -351,20 +374,18 @@
 		done; \
 	fi
 	@$(RM) include/linux include/asm*
-	-find . \( -name \*.o -o -name \*.os -o -name \*.oS \) -exec $(RM) {} \;
 
 distclean: clean
 	-find . \( -name core -o -name \*.orig -o -name \*~ \) -exec $(RM) {} \;
 	$(RM) .config .config.old .config.cmd
 	$(RM) extra/locale/*.tgz
-	$(MAKE) -C extra/config config_clean
+	$(MAKE) -C extra/config distclean
 
 dist release:
-	$(MAKE) -s distclean
-	$(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.gz
+	$(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2
 	svn -q export . ../uClibc-$(VERSION)
-	$(TAR) czf ../uClibc-$(VERSION).tar.gz -C .. uClibc-$(VERSION)
-	du -b ../uClibc-$(VERSION).tar.gz
+	$(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
+	du -b ../uClibc-$(VERSION).tar.bz2
 
 test check:
 	$(Q)$(MAKE) -C test

Modified: branches/uClibc-nptl/README
===================================================================
--- branches/uClibc-nptl/README	2008-03-05 14:29:49 UTC (rev 21167)
+++ branches/uClibc-nptl/README	2008-03-05 14:37:50 UTC (rev 21168)
@@ -21,7 +21,7 @@
 you plan to burn Linux into the system's firmware...
 
 uClibc is maintained by Erik Andersen and is licensed under the
-GNU LIBRARY GENERAL PUBLIC LICENSE.  This license allows you to
+GNU LESSER GENERAL PUBLIC LICENSE.  This license allows you to
 make closed source commercial applications using an unmodified
 version of uClibc (Please consider sharing some of the money you
 make ;-).  You do not need to give away all your source code just
@@ -44,7 +44,7 @@
 etc.) can be found at http://www.uclibc.org/.
 
 uClibc may be freely modified and distributed under the terms of
-the GNU Library General Public License, which can be found in the
+the GNU Lesser General Public License, which can be found in the
 file COPYING.LIB.
 
 Please Note:

Added: branches/uClibc-nptl/extra/scripts/conf-header.sh
===================================================================
--- branches/uClibc-nptl/extra/scripts/conf-header.sh	                        (rev 0)
+++ branches/uClibc-nptl/extra/scripts/conf-header.sh	2008-03-05 14:37:50 UTC (rev 21168)
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+
+# Turn .config into a header file
+
+if [ -z "$1" ] ; then
+	echo "Usage: conf-header.sh <.config>"
+	exit 1
+fi
+
+cat <<EOF
+#if !defined __FEATURES_H && !defined __need_uClibc_config_h
+# error Never include <bits/uClibc_config.h> directly; use <features.h> instead
+#endif
+
+#define __UCLIBC_MAJOR__ ${MAJOR_VERSION}
+#define __UCLIBC_MINOR__ ${MINOR_VERSION}
+#define __UCLIBC_SUBLEVEL__ ${SUBLEVEL}
+EOF
+
+exec \
+sed \
+	-e '/^#$/d' \
+	-e '/^[^#]/s:^\([^=]*\)=\(.*\):#define __\1__ \2:' \
+	-e '/^#define /s: y$: 1:' \
+	-e '/^# .* is not set$/s:^# \(.*\) is not set$:#undef __\1__:' \
+	-e 's:^# \(.*\)$:/* \1 */:' \
+	$1


Property changes on: branches/uClibc-nptl/extra/scripts/conf-header.sh
___________________________________________________________________
Name: svn:executable
   + *




More information about the uClibc-cvs mailing list