From ca6db7290cacee0d3b5ba836e6acea76ea314e50 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 26 May 2013 22:11:51 -0400 Subject: redo the library system; avoid hard-coded paths * install all library files to $(libexecdir)/libretools, instead of - $(bindir) - $(datadir)/libretools - $(datadir)/devtools * symlink the executable library files into $(bindir) * add the tool `librelib` * instead of ". /path/to/lib.sh", use ". $(librelib lib.sh)" * mark all libraries with shebangs of what options they support * move blacklist.sh to libreblacklist --- src/lib/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lib/Makefile') diff --git a/src/lib/Makefile b/src/lib/Makefile index 0c69ba3..e1068c1 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -1,2 +1,10 @@ -libre_datadir=$(datadir)/libretools +libre_execdir=$(bindir) +libre_datadir=$(libexecdir)/libretools include ../../common.mk + +rootdir=$(shell sed -r 's|^/||;s|[^/]+|..|g'<<<$(bindir)) + +$(DESTDIR)$(libre_execdir)/%: % + install -Dm755 '$<' '$(DESTDIR)$(libre_datadir)/$(@F)' + install -d '$(@D)' + ln -sf '$(rootdir)$(libre_datadir)/$(@F)' "$@" -- cgit v1.2.3-54-g00ecf