diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-02-16 08:08:20 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-02-16 08:08:20 +0000 |
commit | 68bdc004235a7ecd03bb45932ce935ea1d110b49 (patch) | |
tree | 19bafbbe698c02599acb686894dab28b8c878c27 /Makeconf | |
parent | cb37680cba43ab2803e376cef23c4381bbd4f034 (diff) |
Tue Feb 16 02:31:06 1999 Thomas Bushnell, BSG <tb@mit.edu>
* 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.
Diffstat (limited to 'Makeconf')
-rw-r--r-- | Makeconf | 42 |
1 files changed, 24 insertions, 18 deletions
@@ -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 $@ |