This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
no more version.mk
- To: libc-hacker@cygnus.com
- Subject: no more version.mk
- From: Zack Weinberg <zack@rabi.phys.columbia.edu>
- Date: Sun, 10 May 1998 15:51:32 -0400
This patch eliminates version.mk. VERSION is already set up to be
substituted by configure, and configure is rerun when version.h
changes. so we might as well add RELEASE and stick both definitions
into config.make.
The big win here is that `make clean' used to create and delete
version.mk in every subdirectory.
zw
1998-05-10 15:39 Zack Weinberg <zack@rabi.phys.columbia.edu>
* configure.in: Define and substitute RELEASE as well as
VERSION.
* config.make.in: Add RELEASE and VERSION to be substituted.
* Makeconfig: Delete all references to version.mk.
* Make-dist: Likewise.
* MakeTAGS: Likewise.
Index: Make-dist
--- Make-dist Sat, 09 May 1998 13:36:13 -0400 zack 0.1
+++ Make-dist Sun, 10 May 1998 15:32:43 -0400 zack 0.1(w)
@@ -132,7 +132,6 @@
foo:=$(shell echo foobie, dammit! >&2)
ifndef tardir
--include $(common-objpfx)version.mk
export tardir := glibc-$(version)
endif
Index: MakeTAGS
--- MakeTAGS Sat, 09 May 1998 13:36:13 -0400 zack 0.1
+++ MakeTAGS Sun, 10 May 1998 15:32:56 -0400 zack 0.1(w)
@@ -163,9 +163,6 @@
do sed "/^#:/s% % $$d/%g" $P/$$d.pot; done) > $@.new
mv -f $@.new $@
-# Get $(version) defined.
-include $(common-objpfx)version.mk
-
# Combine all the messages into the final sorted template translation file.
# The following code requires GNU date.
$P/libc.pot: $(all-pot)
Index: Makeconfig
--- Makeconfig Sat, 09 May 1998 13:36:13 -0400 zack 0.1
+++ Makeconfig Sun, 10 May 1998 15:31:50 -0400 zack 0.1(w)
@@ -657,15 +657,6 @@
BUILD_CC = $(CC)
endif
-# Figure out the version numbers from version.h.
-
-$(common-objpfx)version.mk: $(..)version.h $(..)Makeconfig
- sed -n -e 's/^.*RELEASE.*"\([^"]*\)".*$$/release=\1/p' \
- -e 's/^.*VERSION.*"\([^"]*\)".*$$/version=\1/p' \
- < $< > $@-new
- mv -f $@-new $@
-
-common-generated += version.mk
ifeq (yes, $(build-shared))
@@ -703,11 +694,6 @@
endif
postclean-generated += soversions.mk
-
-ifndef avoid-generated
-# Get $(version) defined with the release version number.
--include $(common-objpfx)version.mk
-endif
# Generate the header containing the names of all shared libraries.
# We use a stamp file to avoid uncessary recompilations.
Index: config.make.in
--- config.make.in Sat, 09 May 1998 13:36:13 -0400 zack 0.1
+++ config.make.in Sun, 10 May 1998 15:30:45 -0400 zack 0.1(w)
@@ -2,6 +2,9 @@
# From $Id$.
# Don't edit this file. Put configuration parameters in configparms instead.
+version = @VERSION@
+release = @RELEASE@
+
# Installation prefixes.
install_root =
prefix = @prefix@
Index: configure.in
--- configure.in Sat, 09 May 1998 13:36:13 -0400 zack 0.1
+++ configure.in Sun, 10 May 1998 15:30:02 -0400 zack 0.1(w)
@@ -1159,8 +1159,10 @@
config_makefile=Makefile
fi
-VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
+VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
+RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
AC_SUBST(VERSION)
+AC_SUBST(RELEASE)
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
[echo '$config_vars' >> config.make; test -d bits || mkdir bits])