From 68bdc004235a7ecd03bb45932ce935ea1d110b49 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 16 Feb 1999 08:08:20 +0000 Subject: Tue Feb 16 02:31:06 1999 Thomas Bushnell, BSG * Makeconf ($(libname).so): Include $(hurd-version) as part of the soname. ($(libdir)/$(libname).so.$(hurd-version)): New rule. ($(libdir)/$(libname).so): Only create a symlink to the version-numbered name. (install) [makemode == library]: Add the versioned name $(libdir)/$(libname.so).$(hurd-version). * version.h.in: New file. * versioh.h, sh-version.sed: Deleted files. * Makeconf (hurd-version): New variable. * Makefile ($(subdirs)): Depend on version.h. (version.h): New rule. (DIST_FILES): Delete version.h and sh-version.sed. Add version.h.in. --- ChangeLog | 17 +++++++++++++++++ Makeconf | 42 ++++++++++++++++++++++++------------------ Makefile | 9 +++++++-- sh-version.sed | 1 - version.h | 32 -------------------------------- version.h.in | 30 ++++++++++++++++++++++++++++++ 6 files changed, 78 insertions(+), 53 deletions(-) delete mode 100644 sh-version.sed delete mode 100644 version.h create mode 100644 version.h.in diff --git a/ChangeLog b/ChangeLog index 67fa06be..325e70fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Tue Feb 16 02:31:06 1999 Thomas Bushnell, BSG + + * Makeconf ($(libname).so): Include $(hurd-version) as part of the + soname. + ($(libdir)/$(libname).so.$(hurd-version)): New rule. + ($(libdir)/$(libname).so): Only create a symlink to the + version-numbered name. + (install) [makemode == library]: Add + the versioned name $(libdir)/$(libname.so).$(hurd-version). + + * version.h.in: New file. + * versioh.h, sh-version.sed: Deleted files. + * Makeconf (hurd-version): New variable. + * Makefile ($(subdirs)): Depend on version.h. + (version.h): New rule. + (DIST_FILES): Delete version.h and sh-version.sed. Add version.h.in. + 1999-01-24 Roland McGrath * configure.in: Add AC_PROG_AWK. diff --git a/Makeconf b/Makeconf index fbad837a..b6932932 100644 --- a/Makeconf +++ b/Makeconf @@ -18,22 +18,26 @@ # Types `servers' and `utilities'; you have to do it yourself. # Types `server' and `utility' should define -# target (the name of the program built) -# OTHERLIBS (all libraries used) +# target (the name of the program built) +# OTHERLIBS (all libraries used) # Types `servers' and `utilities' should define -# targets (the names of all the programs built) -# special-targets (targets which should not be built the normal way -# and have their own rules) +# targets (the names of all the programs built) +# special-targets (targets which should not be built the normal way +# and have their own rules) # Type `library' should define -# libname (the name of the library, without .a.) -# installhdrs (header files that should be installed in /include) -# installhdrsubdir (the subdirectory they should go in, default `hurd') +# libname (the name of the library, without .a.) +# installhdrs (header files that should be installed in /include) +# installhdrsubdir (the subdirectory they should go in, default `hurd') +# and must not define $(targets). # Put this first so it's the default all: +# What version of the Hurd is this? +hurd-version := 0.2 + # Figure out how to locate the parent directory from here. ifeq (.,$(dir)) .. = @@ -128,12 +132,10 @@ ifeq ($(makemode),library) ifndef installhdrsubdir installhdrsubdir = hurd endif - ifndef targets - ifeq ($(no_prof),t) - targets = $(libname).a $(libname).so - else - targets = $(libname).a $(libname).so $(libname)_p.a - endif + ifeq ($(no_prof),t) + targets := $(libname).a $(libname).so + else + targets := $(libname).a $(libname).so $(libname)_p.a endif endif @@ -180,7 +182,7 @@ ifeq ($(makemode),library) all: libs install libs: add-to-librecord add-to-librecord: $(targets) -install: $(libdir) $(includedir)/$(installhdrsubdir) $(addprefix $(libdir)/,$(targets)) $(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs)) +install: $(libdir) $(includedir)/$(installhdrsubdir) $(libdir)/$(libname).so.$(hurd-version $(addprefix $(libdir)/,$(targets)) $(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs)) install-headers: $(includedir)/$(installhdrsubdir) $(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs)) @@ -204,9 +206,13 @@ libs: $(INSTALLED_LOCAL_HEADERS) $(addprefix $(libdir)/$(libname),_p.a .a): $(libdir)/%: % $(INSTALL_DATA) $< $@ $(RANLIB) $@ -$(libdir)/$(libname).so: $(libname).so + +$(libdir)/$(libname).so.$(hurd-version): $(libname).so $(INSTALL_DATA) $< $@ +$(libdir)/$(libname).so: + ln -f -s $(libname).so.$(hurd-version) $@ + $(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs)): $(includedir)/$(installhdrsubdir)/%: % $(INSTALL_DATA) $< $@ @@ -276,7 +282,7 @@ $(libname)_p.a: $(patsubst %.o,%_p.o,$(OBJS)) $(RANLIB) $@ $(libname).so: $(patsubst %.o,%_pic.o,$(OBJS)) $(library_deps) - $(CC) -shared -Wl,-soname=$(libname).so -o $(libname).so \ + $(CC) -shared -Wl,-soname=$(libname).so.$(hurd-version) -o $(libname).so \ $(rpath) $(CFLAGS) $(LDFLAGS) $($@-LDFLAGS) $^ endif @@ -508,5 +514,5 @@ endef # Rule to make executable shell scripts from .sh files. %: %.sh $(top_srcdir)/sh-version.sed - sed -f $(top_srcdir)/sh-version.sed < $< > $@ + sed -e 's/STANDARD_HURD_VERSION_\\(.[^_]*\\)_/\\1 (GNU Hurd) $(hurd-version)/' < $< > $@ chmod +x $@ diff --git a/Makefile b/Makefile index ef7a6f8e..49398695 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998 Free Software Foundation +# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -22,7 +22,7 @@ include ./Makeconf DIST_FILES = COPYING Makeconf config.make.in configure.in configure \ hurd.boot build.mk.in build.mkcf.in aclocal.m4 \ - README NEWS tasks INSTALL INSTALL-cross version.h sh-version.sed + README NEWS tasks INSTALL INSTALL-cross version.h.in ## Subdirectories of this directory should all be mentioned here @@ -58,6 +58,11 @@ working-prog-subdirs := $(filter-out \ $(prog-subdirs)) +$(subdirs): version.h + +version.h: version.h.in + sed -e 's/MASTER_HURD_VERSION/\"$(hurd-version)\"/' < $< > $@ + ## GNU Coding Standards targets (not all are here yet), and some other ## similar sorts of things diff --git a/sh-version.sed b/sh-version.sed deleted file mode 100644 index d13c94d0..00000000 --- a/sh-version.sed +++ /dev/null @@ -1 +0,0 @@ -s/STANDARD_HURD_VERSION_\(.[^_]*\)_/\1 (GNU Hurd) 0.2/ diff --git a/version.h b/version.h deleted file mode 100644 index ab6c5b2b..00000000 --- a/version.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Hurd version - Copyright (C) 1996, 1997 Free Software Foundation, Inc. - Written by Thomas Bushnell, n/BSG. - - This file is part of the GNU Hurd. - - The GNU Hurd is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2, or (at - your option) any later version. - - The GNU Hurd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ - -/* See sh-version.sed for duplicates of this information. */ - -#ifndef HURD_VERSION -#define HURD_VERSION "0.2" -#endif - -/* The standard way to print versions for --version. */ -#define _SHV_SEP "; " -#define STANDARD_HURD_VERSION(s, extra...) \ - #s " (GNU Hurd" _SHV_SEP ##extra ") " HURD_VERSION - - diff --git a/version.h.in b/version.h.in new file mode 100644 index 00000000..1c822701 --- /dev/null +++ b/version.h.in @@ -0,0 +1,30 @@ +/* Hurd version + Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Written by Thomas Bushnell, n/BSG. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ + +#ifndef HURD_VERSION +#define HURD_VERSION MASTER_HURD_VERSION +#endif + +/* The standard way to print versions for --version. */ +#define _SHV_SEP "; " +#define STANDARD_HURD_VERSION(s, extra...) \ + #s " (GNU Hurd" _SHV_SEP ##extra ") " HURD_VERSION + + -- cgit v1.2.3