summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-07-27 13:02:24 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-07-27 13:02:24 -0400
commit6726400e1ebc7fedb147e41c2f12410fe848aeb1 (patch)
treed05ea84c3889da1b10fd868cc029011c22bd2f5c /build-aux
parent0d4bb8b94e37e73f5c163eab267865824e8f912f (diff)
fixity (and work around bug in GNU Make)
The complexity around the install rules is to work around <https://savannah.gnu.org/bugs/?48643>
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/Makefile.each.tail/20-systemd.mk24
1 files changed, 11 insertions, 13 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk
index 8b84b52b63..dc322e642a 100644
--- a/build-aux/Makefile.each.tail/20-systemd.mk
+++ b/build-aux/Makefile.each.tail/20-systemd.mk
@@ -21,7 +21,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
--include $(outdir)/$(DEPDIR)/*.P*
+-include $(wildcard $(outdir)/$(DEPDIR)/*.P*)
std.clean_files += *.o *.lo *.so .deps/ .libs/
std.clean_files += *-list.txt
@@ -52,21 +52,19 @@ $(addprefix $(outdir)/,$(foreach d,$(am.bindirs),$($d_PROGRAMS))): $(outdir)/%:
@if test $(words $^) = 0; then echo 'Cannot link executable with no dependencies: $@' >&2; exit 1; fi
$(AM_V_CCLD)$(LINK) $(_systemd.link_files)
-$(DESTDIR)$(bindir)/%: $(outdir)/%
- $(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@
-$(DESTDIR)$(rootbindir)/%: $(outdir)/%
- $(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@
-$(DESTDIR)$(libexecdir)/%: $(outdir)/%
- $(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@
-$(DESTDIR)$(rootlibexecdir)/%: $(outdir)/%
- $(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@
-$(DESTDIR)$(systemgeneratordir)/%: $(outdir)/%
- $(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@
-$(DESTDIR)$(udevlibexecdir)/%: $(outdir)/%
+_systemd.in_destdir = $(foreach f,$(std.sys_files),$(if $(filter $1,$(patsubst %/,%,$(dir $f))),$(DESTDIR)$f))
+
+define install_bindir
+$(call _systemd.in_destdir,$(bindir)): $(DESTDIR)$(bindir)/%: $(outdir)/%
$(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@
+endef
+$(foreach bindir,$(sort $(foreach d,$(am.bindirs),$($ddir))),$(eval $(value install_bindir)))
-$(DESTDIR)$(libdir)/%.la: $(outdir)/%.la
+define install_libdir
+$(call _systemd.in_destdir,$(libdir)): $(DESTDIR)$(libdir)/%.la: $(outdir)/%.la
$(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@
+endef
+$(foreach libdir,$(sort $(foreach d,lib rootlib,$($ddir))),$(eval $(value install_libdir)))
$(outdir)/%-from-name.gperf: $(outdir)/%-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)