summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-aux/Makefile.each.head/20-libretools.mk3
-rw-r--r--build-aux/Makefile.each.tail/20-libretools.mk17
-rw-r--r--src/chroot-tools/Makefile4
3 files changed, 11 insertions, 13 deletions
diff --git a/build-aux/Makefile.each.head/20-libretools.mk b/build-aux/Makefile.each.head/20-libretools.mk
index be4b8aa..470db51 100644
--- a/build-aux/Makefile.each.head/20-libretools.mk
+++ b/build-aux/Makefile.each.head/20-libretools.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 Luke Shumaker
+# Copyright (C) 2017-2018 Luke Shumaker
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -15,6 +15,7 @@
pkgconfdir = $(sysconfdir)/libretools.d
pkglibexecdir = $(libexecdir)/libretools
+pkglibdir = $(libdir)/libretools
# Auto-detect ########################################################
diff --git a/build-aux/Makefile.each.tail/20-libretools.mk b/build-aux/Makefile.each.tail/20-libretools.mk
index bc96d97..945b0ea 100644
--- a/build-aux/Makefile.each.tail/20-libretools.mk
+++ b/build-aux/Makefile.each.tail/20-libretools.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2017 Luke Shumaker
+# Copyright (C) 2015-2018 Luke Shumaker
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -25,7 +25,8 @@ files.out.all += $(filter-out $(files.src),$(libretools.out)) \
$(if $(strip $(libretools.pots)),dir.pot)
files.sys.all += $(addprefix $(bindir)/,$(libretools.out.bins)) \
$(addprefix $(pkgconfdir)/,$(libretools.out.confs)) \
- $(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs) $(libretools.out.libs)) \
+ $(addprefix $(pkglibdir)/,$(libretools.out.libs)) \
+ $(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs)) \
$(addprefix $(docdir)/,$(libretools.out.docs)) \
$(addprefix $(mandir)/man1/,$(filter %.1,$(libretools.out.mans))) \
$(addprefix $(mandir)/man2/,$(filter %.2,$(libretools.out.mans))) \
@@ -68,12 +69,6 @@ $(DESTDIR)$(mandir)/man5/%.5: $(outdir)/%.5; install -T -Dm644 '$<' '$@'
$(DESTDIR)$(mandir)/man6/%.6: $(outdir)/%.6; install -T -Dm644 '$<' '$@'
$(DESTDIR)$(mandir)/man7/%.7: $(outdir)/%.7; install -T -Dm644 '$<' '$@'
$(DESTDIR)$(mandir)/man8/%.8: $(outdir)/%.8; install -T -Dm644 '$<' '$@'
-$(DESTDIR)$(pkglibexecdir)/%: $(outdir)/% ; $(MKDIR_P) '$(@D)' && cp -T '$<' '$@'
-$(DESTDIR)$(bindir)/% : $(outdir)/% ; install -T -Dm755 '$<' '$@'
-# Repeat the last two rules again with explicit targets because
-# otherwise it would try to do src/xbs->/bin/xbs instead of
-# src/xbs/xbs->/bin/xbs
-ifneq ($(filter $(notdir $(outdir)),$(libretools.out)),)
-$(DESTDIR)$(pkglibexecdir)/$(notdir $(outdir)): $(DESTDIR)$(pkglibexecdir)/%: $(outdir)/% ; $(MKDIR_P) '$(@D)' && cp -T '$<' '$@'
-$(DESTDIR)$(bindir)/$(notdir $(outdir)): $(DESTDIR)$(bindir)/% : $(outdir)/% ; install -T -Dm755 '$<' '$@'
-endif
+$(addprefix $(DESTDIR)$(bindir)/, $(libretools.out.bins) ): $(DESTDIR)$(bindir)/% : $(outdir)/% ; install -T -Dm755 '$<' '$@'
+$(addprefix $(DESTDIR)$(pkglibexecdir)/,$(libretools.out.libexecs)): $(DESTDIR)$(pkglibexecdir)/%: $(outdir)/% ; install -T -Dm755 '$<' '$@'
+$(addprefix $(DESTDIR)$(pkglibdir)/, $(libretools.out.libs) ): $(DESTDIR)$(pkglibdir)/% : $(outdir)/% ; install -T -Dm644 '$<' '$@'
diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile
index e3274e0..412ebb5 100644
--- a/src/chroot-tools/Makefile
+++ b/src/chroot-tools/Makefile
@@ -2,12 +2,14 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
pkglibexecdir = $(libexecdir)/libretools/chroot
+pkglibdir = $(libdir)/libretools/chroot
libretools.src.devtools = makechrootpkg.in mkarchroot.in arch-nspawn.in
-libretools.out.bins = chcleanup librechroot libremakepkg
+libretools.out.bins = librechroot libremakepkg
libretools.out.libexecs = arch-nspawn chcleanup distcc-tool indent mkarchroot
libretools.out.libs = $(libretools.src.sh) makechrootpkg.sh
files.out.int += chcleanup.lib
+files.sys.all += $(bindir)/chcleanup # not in libretools.out.bins because explicit rule
$(srcdir)/makechrootpkg.sh.in: $(srcdir)/makechrootpkg.in
sed -e '1s^.*^#!/hint/bash -euE^' -e '/^\s*main "$$@"\s*$$/d' < $< > $@