[uClibc-cvs] uClibc Makefile,1.228,1.229 Rules.mak,1.147,1.148

Erik Andersen andersen at uclibc.org
Tue Nov 4 13:07:42 UTC 2003


Update of /var/cvs/uClibc
In directory winder:/tmp/cvs-serv7696

Modified Files:
	Makefile Rules.mak 
Log Message:
Rework the config system.  Better utilize the Kconfig language
which should simplify enabling arbitrary architectures.
 -Erik


Index: Rules.mak
===================================================================
RCS file: /var/cvs/uClibc/Rules.mak,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- Rules.mak	3 Nov 2003 09:50:25 -0000	1.147
+++ Rules.mak	4 Nov 2003 13:07:39 -0000	1.148
@@ -83,31 +83,10 @@
 AWK:=$(shell if [ -x /usr/bin/nawk ]; then echo "/usr/bin/nawk"; \
 	else echo "/usr/bin/awk"; fi)
 
-HOST_ARCH:=$(shell uname -m | sed \
-		-e 's/i.86/i386/' \
-		-e 's/sparc.*/sparc/' \
-		-e 's/arm.*/arm/g' \
-		-e 's/m68k.*/m68k/' \
-		-e 's/ppc/powerpc/g' \
-		-e 's/v850.*/v850/g' \
-		-e 's/sh[234].*/sh/' \
-		-e 's/mips.*/mips/' \
-		)
-ifeq ($(strip $(TARGET_ARCH)),)
-TARGET_ARCH:=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
-		-e 's/i.86/i386/' \
-		-e 's/sparc.*/sparc/' \
-		-e 's/arm.*/arm/g' \
-		-e 's/m68k.*/m68k/' \
-		-e 's/ppc/powerpc/g' \
-		-e 's/v850.*/v850/g' \
-		-e 's/sh[234]/sh/' \
-		-e 's/mips-.*/mips/' \
-		-e 's/mipsel-.*/mipsel/' \
-		-e 's/cris.*/cris/' \
-		)
-endif
-export TARGET_ARCH
+# Make certain these contain a final "/", but no "//"s.
+RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(RUNTIME_PREFIX))))))
+DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(DEVEL_PREFIX))))))
+export RUNTIME_PREFIX DEVEL_PREFIX
 
 ARFLAGS:=r
 
@@ -218,7 +197,7 @@
     LIBRARY_CACHE:=#-DUSE_CACHE
     ifeq ($(BUILD_UCLIBC_LDSO),y)
 	LDSO:=$(TOPDIR)lib/$(UCLIBC_LDSO)
-	DYNAMIC_LINKER:=$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO)
+	DYNAMIC_LINKER:=$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)
 	BUILD_DYNAMIC_LINKER:=$(shell cd $(TOPDIR) && pwd)/lib/$(UCLIBC_LDSO)
     else
 	LDSO:=$(SYSTEM_LDSO)
@@ -245,17 +224,6 @@
 LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)
 LIBGCC_DIR:=$(dir $(LIBGCC))
 
-# TARGET_PREFIX is the directory under which which the uClibc runtime
-# environment will be installed and used on the target system.   The 
-# result will look something like the following:
-#   TARGET_PREFIX/
-#	lib/            <contains all runtime and static libs>
-#	usr/lib/        <this directory is searched for runtime libs>
-#	etc/            <weher the shared library cache and configuration 
-#	                information go if you enabled LIBRARY_CACHE above>
-# Very few people will need to change this value from the default...
-TARGET_PREFIX = /
-
 ########################################
 #
 # uClinux shared lib support
@@ -269,3 +237,5 @@
   SHARED_TARGET = lib/libc
 endif
 
+TARGET_ARCH:=$(strip $(subst ",, $(strip $(TARGET_ARCH))))
+

Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/Makefile,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -d -r1.228 -r1.229
--- Makefile	4 Nov 2003 05:49:28 -0000	1.228
+++ Makefile	4 Nov 2003 13:07:39 -0000	1.229
@@ -28,7 +28,7 @@
 TOPDIR=./
 include Rules.mak
 
-DIRS = extra ldso libc libcrypt libresolv libnsl libutil libm libpthread
+DIRS = ldso libc libcrypt libresolv libnsl libutil libm libpthread
 ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
 	DIRS += libintl
 endif
@@ -118,13 +118,13 @@
 	fi;
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/conf -o extra/Configs/Config.in
 
 headers: include/bits/uClibc_config.h
 ifeq ($(strip $(UCLIBC_HAS_MMU)),y)
-	@./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH)
+	@set -x; ./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH)
 else
-	@./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) -n
+	@set -x; ./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) -n
 endif
 	@if [ "$(TARGET_ARCH)" = "mipsel" ]; then \
 	    $(LN) -fs mips libc/sysdeps/linux/mipsel; \
@@ -275,25 +275,6 @@
 	fi;
 endif
 
-# Using the wrapper toolchain is depricated.  You should 
-# really use a _real_ toolchain instead....
-install_toolchain: install_utils
-	$(INSTALL) -d $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin
-	$(INSTALL) -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin
-	$(LN) -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldd \
-		$(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/ldd
-	$(INSTALL) -m 755 ldso/util/ldd \
-		$(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldd
-	$(INSTALL) -m 755 ldso/util/ldconfig \
-		$(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldconfig;
-	$(INSTALL) -m 755 ldso/util/ldconfig \
-		$(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldconfig;
-	# For now, don't bother with readelf since surely the host
-	# system has binutils, or we couldn't have gotten this far...
-	#$(LN) -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-readelf \
-	#	$(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/readelf
-	$(MAKE) -C extra/gcc-uClibc install
-
 ifeq ($(strip $(HAVE_SHARED)),y)
 utils: $(TOPDIR)ldso/util/ldd
 	$(MAKE) -C ldso utils
@@ -303,16 +284,16 @@
 
 install_utils: utils
 ifeq ($(strip $(HAVE_SHARED)),y)
-	$(INSTALL) -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/sbin
-	$(INSTALL) -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin
+	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)/sbin
+	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)/usr/bin
 	$(INSTALL) -m 755 ldso/util/ldd \
-		$(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/ldd
+		$(PREFIX)$(RUNTIME_PREFIX)/usr/bin/ldd
 	$(INSTALL) -m 755 ldso/util/ldconfig \
-		$(PREFIX)$(SYSTEM_DEVEL_PREFIX)/sbin/ldconfig;
+		$(PREFIX)$(RUNTIME_PREFIX)/sbin/ldconfig;
 	# For now, don't bother with readelf since surely the host
 	# system has binutils, or we couldn't have gotten this far...
 	#$(INSTALL) -m 755 ldso/util/readelf \
-	#	$(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/readelf
+	#	$(PREFIX)$(RUNTIME_PREFIX)/usr/bin/readelf
 endif
 
 # Installs run-time libraries and helper apps in preparation for
@@ -360,56 +341,46 @@
 
 # configuration
 # ---------------------------------------------------------------------------
-extra/config/conf: buildconf
-	- at if [ ! -f .config ] ; then \
-		cp extra/Configs/Config.$(TARGET_ARCH).default .config; \
-	fi
-
-buildconf:
+extra/config/conf:
 	make -C extra/config conf
 
-extra/config/mconf: buildmconf
-	- at if [ ! -f .config ] ; then \
-		cp extra/Configs/Config.$(TARGET_ARCH).default .config; \
-	fi
-
-buildmconf:
+extra/config/mconf:
 	make -C extra/config ncurses mconf
 
 menuconfig: extra/config/mconf
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/mconf extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/mconf extra/Configs/Config.in
 
 config: extra/config/conf
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/conf extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/conf extra/Configs/Config.in
 
 oldconfig: extra/config/conf
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/conf -o extra/Configs/Config.in
 
 randconfig: extra/config/conf
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/conf -r extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/conf -r extra/Configs/Config.in
 
 allyesconfig: extra/config/conf
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/conf -y extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/conf -y extra/Configs/Config.in
 
 allnoconfig: extra/config/conf
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/conf -n extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/conf -n extra/Configs/Config.in
 
 defconfig: extra/config/conf
 	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
-	@./extra/config/conf -d extra/Configs/Config.$(TARGET_ARCH)
+	@./extra/config/conf -d extra/Configs/Config.in
 
 
 clean:
@@ -421,7 +392,6 @@
 	$(MAKE) -C libc/misc/wchar clean
 	$(MAKE) -C libc/unistd clean
 	$(MAKE) -C libc/sysdeps/linux/common clean
-	$(MAKE) -C extra/gcc-uClibc clean
 	$(MAKE) -C extra/locale clean
 	@set -e; \
 	for i in `(cd $(TOPDIR)/libc/sysdeps/linux/common/sys; ls *.h)` ; do \




More information about the uClibc-cvs mailing list