From 0c09c5ba51c6165ef7e714e3e946e6cd7afc9cec Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 12 Jun 2016 14:40:34 -0400 Subject: fix --- build-aux/Makefile.each.tail/20-systemd.mk | 8 ++++++-- build-aux/Makefile.each.tail/30-automake2autothing.mk | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'build-aux/Makefile.each.tail') 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 ?=)\ -- cgit v1.2.3-54-g00ecf