summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-15 18:01:59 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-23 00:06:37 -0600
commitf7df12564a5aa5b7d144386355ede8b44b429601 (patch)
tree2e8600fd949309baf765734c6e60fef6fac659fc
parent04be9e4ab0bfd1499adda077ecbac21b567e541b (diff)
mv src/librelib src/lib/ # and split librelib into a separate package
-rw-r--r--Makefile7
-rw-r--r--src/lib/Makefile18
-rwxr-xr-xsrc/lib/librelib (renamed from src/librelib)0
-rwxr-xr-xtest/testenv2
4 files changed, 17 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 273699b..0403498 100644
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,11 @@ include config.mk
################################################################################
# these are the resulting packages
-packages=libretools libretools-mips64el
-# and which directories they contains
-libretools=abslibre-tools chroot-tools devtools fullpkg lib librefetch misc toru
+packages=libretools libretools-mips64el librelib
+# and which directories they contain
+libretools=abslibre-tools chroot-tools devtools fullpkg librefetch misc toru
libretools-mips64el=mips64el-tools
+librelib=lib
################################################################################
diff --git a/src/lib/Makefile b/src/lib/Makefile
index 8683ee1..e0067be 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -12,7 +12,7 @@ common.sh.in: $(devtoolsdir)/lib/common.sh ; cp $< $@
build: common.sh
-lib/common.sh: %: %.in %.top Makefile
+common.sh: %: %.in %.top Makefile
@echo "GEN $@"
@{ \
cat "$*.top" && \
@@ -23,19 +23,25 @@ lib/common.sh: %: %.in %.top Makefile
# Install ############################################################
-executables = $(wildcard libre*)
-libraries = $(wildcard *.sh)
+libexecs = $(filter-out librelib,$(wildcard libre*))
+libs = $(wildcard *.sh)
# relative path to `/` from $(bindir)
rootdir=$(shell sed -r 's|^/||;s|[^/]+|..|g'<<<$(bindir))
install: \
- $(addprefix $(DESTDIR)$(bindir)/,$(executables)) \
- $(addprefix $(DESTDIR)$(pkglibexecdir)/,$(executables) $(libraries))
+ $(addprefix $(DESTDIR)$(bindir)/,$(libexecs) librelib) \
+ $(addprefix $(DESTDIR)$(pkglibexecdir)/,$(libexecs) $(libs))
+
+$(DESTDIR)$(bindir)/librelib: librelib
+ install -Dm755 '$<' '$@'
$(DESTDIR)$(bindir)/%: %
install -d '$(@D)'
ln -sf '$(rootdir)$(pkglibexecdir)/$(@F)' "$@"
-$(DESTDIR)$(pkglibexecdir)/%: %
+$(DESTDIR)$(pkglibexecdir)/libre%: libre%
install -Dm755 '$<' '$@'
+
+$(DESTDIR)$(pkglibexecdir)/%.sh: %.sh
+ install -Dm644 '$<' '$@'
diff --git a/src/librelib b/src/lib/librelib
index dc4969f..dc4969f 100755
--- a/src/librelib
+++ b/src/lib/librelib
diff --git a/test/testenv b/test/testenv
index 0448e33..423eda5 100755
--- a/test/testenv
+++ b/test/testenv
@@ -18,7 +18,7 @@ export TMPDIR="$(mktemp --tmpdir -d libretools-test.XXXXXXXXXX)"
trap "rm -rf '$TMPDIR'" EXIT
# Set up the install to work with
destdir=$TMPDIR/destdir
-make -C .. install DESTDIR=$destdir &>/dev/null || {
+make -C .. install-librelib install DESTDIR=$destdir &>/dev/null || {
echo 'error creating local install, cannot run tests'
exit 1
}