From e05986c02a6e2c71a8ec0715edf1d9c536a95898 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 15 Mar 2018 15:39:45 +0000 Subject: Second draft --- Makefile | 10 +++++----- package/info | 2 +- package/targets.mak | 40 ++++++++++++++++++++++------------------ tools/install-bins | 2 +- tools/link-bins | 9 +-------- tools/rename-bins | 5 ----- tools/symlink-bins | 12 ++++++++++++ 7 files changed, 42 insertions(+), 38 deletions(-) delete mode 100755 tools/rename-bins create mode 100755 tools/symlink-bins diff --git a/Makefile b/Makefile index 182b7c7..1310b12 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ ALL_INCLUDES := $(wildcard src/include/$(package)/*.h) all: .built .built: $(ALL_LIBS) $(ALL_BINS) $(ALL_INCLUDES) - exec ./tools/rename-bins && touch .built + exec ./tools/link-bins && touch .built clean: @exec rm -f $(ALL_LIBS) $(ALL_BINS) $(wildcard src/*/*.o src/*/*.lo) $(EXTRA_TARGETS) @@ -89,7 +89,7 @@ install: install-dynlib install-libexec install-bin install-lib install-include install-dynlib: $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(dynlibdir)/lib%.so) install-libexec: $(LIBEXEC_TARGETS:%=$(DESTDIR)$(libexecdir)/%) -install-bin: .installed +install-bin: .installed $(REAL_TARGETS:%=$(DESTDIR)$(bindir)/%) .installed: .built exec ./tools/install-bins $(INSTALL) $(bindir) $(DESTDIR) && touch .installed @@ -105,10 +105,10 @@ $(DESTDIR)$(exthome): $(DESTDIR)$(home) update: $(DESTDIR)$(exthome) -global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M)) .linked +global-links: $(DESTDIR)$(exthome) $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M)) .linked $(REAL_TARGETS:%=$(DESTDIR)$(sproot)/command/%) -.linked: .installed - exec ./tools/link-bins $(INSTALL) $(bindir) x$(sproot) x$(home) x$(exthome) $(DESTDIR) && touch .linked +.linked: .installed + exec ./tools/symlink-bins $(INSTALL) $(bindir) x$(sproot) x$(home) x$(exthome) $(DESTDIR) && touch .linked $(DESTDIR)$(sproot)/command/%: $(DESTDIR)$(home)/command/% exec $(INSTALL) -D -l ..$(subst $(sproot),,$(exthome))/command/$(