summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Makefile42
1 files changed, 6 insertions, 36 deletions
diff --git a/src/lib/Makefile b/src/lib/Makefile
index e0067be..d7b4049 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -1,17 +1,12 @@
-include ../../common-devtools.mk
-
-pkglibexecdir=$(libexecdir)/libretools
-
-# Copy from devtools #################################################
-
-copy: common.sh.in
-
-common.sh.in: $(devtoolsdir)/lib/common.sh ; cp $< $@
+copy_files = common.sh.in
+libexecs = $(filter-out librelib,$(wildcard libre*))
+# include common.sh in libs explicitly, because it might not exist yet
+# when the wildcard is performed
+libs = $(sort $(wildcard *.sh) common.sh)
+include ../../common.mk
# Build ##############################################################
-build: common.sh
-
common.sh: %: %.in %.top Makefile
@echo "GEN $@"
@{ \
@@ -20,28 +15,3 @@ common.sh: %: %.in %.top Makefile
echo '_INCLUDE_COMMON_SH=true' && \
cat "$*.in" && \
echo 'fi'; } > "$@"
-
-# Install ############################################################
-
-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)/,$(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)/libre%: libre%
- install -Dm755 '$<' '$@'
-
-$(DESTDIR)$(pkglibexecdir)/%.sh: %.sh
- install -Dm644 '$<' '$@'