Browse Source

Fixup and unifiy version numbering. Automate versioning updates.
Propagate fixes across makefiles.
-Erik

Eric Andersen 22 years ago
parent
commit
58bd16ab17
11 changed files with 55 additions and 36 deletions
  1. 18 11
      Makefile
  2. 7 5
      Rules.mak
  3. 15 5
      include/features.h
  4. 2 2
      ldso/ldso/Makefile
  5. 2 2
      ldso/libdl/Makefile
  6. 2 2
      libcrypt/Makefile
  7. 2 2
      libm/Makefile
  8. 2 2
      libpthread/Makefile
  9. 1 1
      libpthread/linuxthreads_db/Makefile
  10. 2 2
      libresolv/Makefile
  11. 2 2
      libutil/Makefile

+ 18 - 11
Makefile

@@ -1,7 +1,7 @@
 # Makefile for uClibc
 #
 # Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001,2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -33,7 +33,7 @@ include Rules.mak
 
 DIRS = extra ldso libc libcrypt libresolv libutil libm libpthread
 
-all: headers uClibc_config subdirs shared util finished
+all: headers include/bits/uClibc_config.h subdirs shared util finished
 
 Config:
 	@echo
@@ -145,11 +145,14 @@ headers: dummy
 	TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > include/bits/syscall.h
 	$(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) headers
 
-uClibc_config: Makefile Config
+include/bits/uClibc_config.h: Makefile Config
 	@echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" > include/bits/uClibc_config.h
 	@echo "#if !defined __FEATURES_H && !defined __need_uClibc_config_h" >> include/bits/uClibc_config.h
 	@echo "#error Never include <bits/uClibc_config.h> directly; use <features.h> instead." >> include/bits/uClibc_config.h
 	@echo "#endif" >> include/bits/uClibc_config.h
+	@echo "#define __UCLIBC_MAJOR__ $(MAJOR_VERSION)" >> include/bits/uClibc_config.h 
+	@echo "#define __UCLIBC_MINOR__ $(MINOR_VERSION)" >> include/bits/uClibc_config.h 
+	@echo "#define __UCLIBC_SUBLEVEL__ $(SUBLEVEL)" >> include/bits/uClibc_config.h 
 	@echo "#define linux 1" >> include/bits/uClibc_config.h 
 	@echo "#define __linux__ 1" >> include/bits/uClibc_config.h 
 	@if [ "$(INCLUDE_IPV6)" = "true" ] ; then \
@@ -269,13 +272,15 @@ install_runtime:
 ifeq ($(strip $(HAVE_SHARED)),true)
 	install -d $(PREFIX)$(DEVEL_PREFIX)/lib
 	install -d $(PREFIX)$(DEVEL_PREFIX)/bin
-	install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)$(DEVEL_PREFIX)/lib
+	install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
+		$(PREFIX)$(DEVEL_PREFIX)/lib
 	cp -a lib/*.so.* $(PREFIX)$(DEVEL_PREFIX)/lib
-	@if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so ] ; then \
+	@if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
 	    set -x -e; \
-	    install -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)$(DEVEL_PREFIX)/lib; \
+	    install -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
+	    		$(PREFIX)$(DEVEL_PREFIX)/lib; \
 	    mkdir -p $(PREFIX)$(SHARED_LIB_LOADER_PATH); \
-	    ln -s $(DEVEL_PREFIX)/lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so \
+	    ln -s $(DEVEL_PREFIX)/lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
 			$(PREFIX)$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO) || true; \
 	fi;
 endif
@@ -312,13 +317,15 @@ ifeq ($(strip $(HAVE_SHARED)),true)
 	install -d $(PREFIX)$(TARGET_PREFIX)/lib
 	install -d $(PREFIX)$(TARGET_PREFIX)/sbin
 	install -d $(PREFIX)$(TARGET_PREFIX)/usr/bin
-	install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)$(TARGET_PREFIX)/lib
+	install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
+		$(PREFIX)$(TARGET_PREFIX)/lib
 	cp -a lib/*.so.* $(PREFIX)$(TARGET_PREFIX)/lib
-	@if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so ] ; then \
+	@if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
 	    set -x -e; \
-	    install -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)$(TARGET_PREFIX)/lib; \
+	    install -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
+	    		$(PREFIX)$(TARGET_PREFIX)/lib; \
 	    mkdir -p $(PREFIX)$(SHARED_LIB_LOADER_PATH); \
-	    ln -s $(TARGET_PREFIX)/lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so \
+	    ln -s $(TARGET_PREFIX)/lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
 	    		$(PREFIX)$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO) || true; \
 	fi;
 endif

+ 7 - 5
Rules.mak

@@ -5,7 +5,7 @@
 # should not mess with this file unless you know what you are doing...  
 # 
 # Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001 Erik Andersen <andersee@debian.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -20,16 +20,18 @@
 # You should have received a copy of the GNU Library General Public License
 # along with this program; if not, write to the Free Software Foundation, Inc.,
 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
 
 include $(TOPDIR)Config
 
+# Be sure to update include/features.h when changing this...
 MAJOR_VERSION:=0
-MINOR_VERSION:=9.11
-VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
+MINOR_VERSION:=9
+SUBLEVEL:=12
+VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
+
 
 LIBNAME:=libc.a
-SHARED_FULLNAME:=libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
+SHARED_FULLNAME:=libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 SHARED_MAJORNAME:=libc.so.$(MAJOR_VERSION)
 UCLIBC_LDSO:=ld-uClibc.so.$(MAJOR_VERSION)
 LIBC:=$(TOPDIR)libc/libc.a

+ 15 - 5
include/features.h

@@ -249,11 +249,21 @@
 /* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.0.  */
 #define __STDC_ISO_10646__		200009L
 
-/* Major and minor version number of the uClibc library package.  Use
-   these macros to test for features in specific releases.  */
-#define	__UCLIBC__		0
-#define	__UCLIBC_MAJOR__	9
-#define	__UCLIBC_MINOR__	5
+/* This macro indicates that the installed library is uClibc.  Use
+ * __UCLIBC_MAJOR__ and __UCLIBC_MINOR__ to test for the features in
+ * specific releases.  */
+#define	__UCLIBC__		1
+
+/* Major and minor version number of the uClibc library package are
+ * can be used to test for features in specific uClibc releases.
+ *
+ * Now included from bits/uClibc_config.h */
+#if 0
+/* For uClibc release 0.9.12, these numbers would be: */
+#define	__UCLIBC_MAJOR__	0
+#define	__UCLIBC_MINOR__	9
+#define	__UCLIBC_SUBLEVEL__	12
+#endif
 
 /*  There is an unwholesomely huge amount of code out there that depends on the
  *  presence of GNU libc header files.  We have GNU libc header files.  So here

+ 2 - 2
ldso/ldso/Makefile

@@ -1,7 +1,7 @@
 # Makefile for uClibc
 #
 # Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -25,7 +25,7 @@
 TOPDIR=../../
 DOPIC=true
 include $(TOPDIR)Rules.mak
-LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
 # Enable this to enable all the code needed to support traditional ldd
 # (i.e. where the shared library loader does all the heavy lifting)

+ 2 - 2
ldso/libdl/Makefile

@@ -1,7 +1,7 @@
 # Makefile for uClibc
 #
 # Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -27,7 +27,7 @@ include $(TOPDIR)Rules.mak
 
 LIBDL=libdl.a
 LIBDL_SHARED=libdl.so
-LIBDL_SHARED_FULLNAME=libdl-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBDL_SHARED_FULLNAME=libdl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
 CSRC= dlib.c
 OBJS=$(patsubst %.c,%.o, $(CSRC))

+ 2 - 2
libcrypt/Makefile

@@ -1,7 +1,7 @@
 # Makefile for uClibc
 #
 # Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -26,7 +26,7 @@ include $(TOPDIR)Rules.mak
 
 LIBCRYPT=libcrypt.a
 LIBCRYPT_SHARED=libcrypt.so
-LIBCRYPT_SHARED_FULLNAME=libcrypt-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBCRYPT_SHARED_FULLNAME=libcrypt-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
 CSRC = crypt.c des.c md5.c
 OBJS=$(patsubst %.c,%.o, $(CSRC))

+ 2 - 2
libm/Makefile

@@ -1,6 +1,6 @@
 # Makefile for uClibc's math library
 #
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # The routines included in this math library are derived from the
 # math library for Apple's MacOS X/Darwin math library, which was
@@ -44,7 +44,7 @@ ALL_SUBDIRS = powerpc
 
 LIBM=libm.a
 LIBM_SHARED=libm.so
-LIBM_SHARED_FULLNAME=libm-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBM_SHARED_FULLNAME=libm-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 CFLAGS+=-D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE
 
 ifeq ($(strip $(DO_C99_MATH)),true)

+ 2 - 2
libpthread/Makefile

@@ -22,11 +22,11 @@ include $(TOPDIR)Rules.mak
 #Adjust the soname version to avoid namespace collisions with glibc's libpthread
 LIBPTHREAD=libpthread.a
 LIBPTHREAD_SHARED=libpthread.so
-LIBPTHREAD_SHARED_FULLNAME=libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBPTHREAD_SHARED_FULLNAME=libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
 LIBTHREAD_DB=libthread_db.a
 LIBTHREAD_DB_SHARED=libthread_db.so
-LIBTHREAD_DB_SHARED_FULLNAME=libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBTHREAD_DB_SHARED_FULLNAME=libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
 DIRS=
 ifeq ($(strip $(INCLUDE_THREADS)),true)

+ 1 - 1
libpthread/linuxthreads_db/Makefile

@@ -21,7 +21,7 @@ TOPDIR=../../
 include $(TOPDIR)Rules.mak
 
 #Adjust the soname version to avoid namespace collisions with glibc's libpthread
-PT_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
+PT_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
 LIBPTHREAD=../libpthread.a
 
 # set up system dependencies include dirs (NOTE: order matters!)

+ 2 - 2
libresolv/Makefile

@@ -1,7 +1,7 @@
 # Makefile for uClibc
 #
 # Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -27,7 +27,7 @@ include $(TOPDIR)Rules.mak
 
 LIBRESOLV=libresolv.a
 LIBRESOLV_SHARED=libresolv.so
-LIBRESOLV_SHARED_FULLNAME=libresolv-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBRESOLV_SHARED_FULLNAME=libresolv-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
 CSRC = resolv.c
 OBJS=$(patsubst %.c,%.o, $(CSRC))

+ 2 - 2
libutil/Makefile

@@ -1,7 +1,7 @@
 # Makefile for uClibc
 #
 # Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -27,7 +27,7 @@ LIBC=$(TOPDIR)libc.a
 
 LIBUTIL=libutil.a
 LIBUTIL_SHARED=libutil.so
-LIBUTIL_SHARED_FULLNAME=libutil-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBUTIL_SHARED_FULLNAME=libutil-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
 CSRC=login.c login_tty.c logout.c logwtmp.c openpty.c
 ifeq ($(strip $(HAS_MMU)),true)