summaryrefslogtreecommitdiff
path: root/build-aux/Makefile.each.tail
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-12 14:40:34 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-12 14:40:34 -0400
commit0c09c5ba51c6165ef7e714e3e946e6cd7afc9cec (patch)
tree8f91d8f14d6182ddbb8c7b425afd2eceded987fa /build-aux/Makefile.each.tail
parent4cb2380233342aa01fda978be775c9a735fce3a2 (diff)
fix
Diffstat (limited to 'build-aux/Makefile.each.tail')
-rw-r--r--build-aux/Makefile.each.tail/20-systemd.mk8
-rw-r--r--build-aux/Makefile.each.tail/30-automake2autothing.mk2
2 files changed, 7 insertions, 3 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk
index a84e4b6ebc..14c5a9d93e 100644
--- a/build-aux/Makefile.each.tail/20-systemd.mk
+++ b/build-aux/Makefile.each.tail/20-systemd.mk
@@ -38,9 +38,13 @@ $(outdir)/%.lo: $(outdir)/%.c $(topoutdir)/config.h | $(outdir)/.deps; $(AM_V_CC
$(outdir)/.deps:
$(AM_V_at)$(MKDIR_P) $@
-_systemd.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(std.sys_files/$(@D)))))
+_systemd.dups = $(sort $(foreach l,$1,$(if $(filter-out 1,$(words $(filter $l,$1))),$l)))
_systemd.patsubst-all = $(if $1,$(call _systemd.patsubst-all,$(wordlist 2,$(words $1),$1),$2,$(patsubst $(firstword $1),$2,$3)),$3)
-_systemd.link_files = $(filter %.o %.lo %.la,$^) $(call _systemd.patsubst-all,$(.LIBPATTERNS),-l%,$(filter $(.LIBPATTERNS),$(notdir $^)))
+_systemd.lt_libs = $(foreach l,$(filter %.la,$1), $l $(call _systemd.lt_libs,$($(notdir $l).DEPENDS)))
+_systemd.lt_filter = $(filter-out $(call _systemd.dups,$(call _systemd.lt_libs,$1)),$1)
+
+_systemd.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(std.sys_files/$(@D)))))
+_systemd.link_files = $(call _systemd.lt_filter,$(filter %.o %.lo %.la,$^)) $(call _systemd.patsubst-all,$(.LIBPATTERNS),-l%,$(filter $(.LIBPATTERNS),$(notdir $^)))
$(outdir)/%.la:
@if test $(words $^) = 0; then echo 'Cannot link library with no dependencies: $@' >&2; exit 1; fi
$(AM_V_CCLD)$(LINK) $(if $(_systemd.rpath),-rpath $(_systemd.rpath)) $(_systemd.link_files)
diff --git a/build-aux/Makefile.each.tail/30-automake2autothing.mk b/build-aux/Makefile.each.tail/30-automake2autothing.mk
index 7091c57d87..9f63ad0040 100644
--- a/build-aux/Makefile.each.tail/30-automake2autothing.mk
+++ b/build-aux/Makefile.each.tail/30-automake2autothing.mk
@@ -6,7 +6,7 @@ std.sys_files += $(addprefix $(bindir)/,$(bin_PROGRAMS))
std.sys_files += $(addprefix $(libexecdir)/,$(libexec_PROGRAMS))
std.out_files += $(notdir $(pkgconfiglib_DATA))
-std.sys_files += $(addprefix $(pkgconfiglibdir)/,$(notdir $(lib_pkgconfiglib_DATA)))
+std.sys_files += $(addprefix $(pkgconfiglibdir)/,$(notdir $(pkgconfiglib_DATA)))
$(foreach n,$(call automake_name,$(std.out_files)),\
$(eval $n_SOURCES ?=)\