summaryrefslogtreecommitdiff
path: root/build-aux/Makefile.each.tail
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-02 13:14:53 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-02 13:14:53 -0400
commit3f9916a355913242460edf1a93f80598c5bf9d37 (patch)
treea53af6c27cecc13c567b703d99e00086a4706b74 /build-aux/Makefile.each.tail
parentec46c163fa7283630b06ae1dccb6f1f4bc7d65ee (diff)
libsystemd
Diffstat (limited to 'build-aux/Makefile.each.tail')
-rw-r--r--build-aux/Makefile.each.tail/20-systemd.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk
index 3b533309a8..523d22cb6b 100644
--- a/build-aux/Makefile.each.tail/20-systemd.mk
+++ b/build-aux/Makefile.each.tail/20-systemd.mk
@@ -38,10 +38,13 @@ $(outdir)/%.lo: $(srcdir)/%.c $(topoutdir)/config.h | $(outdir)/.deps
$(outdir)/.deps:
$(AM_V_at)$(MKDIR_P) $@
+_systemd.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(std.sys_files/$(@D)))))
+_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 $^)))
$(outdir)/%.la:
- $(AM_V_CCLD)$(LINK) $(filter-out .var%,$^)
+ $(AM_V_CCLD)$(LINK) $(if $(_systemd.rpath),-rpath $(_systemd.rpath)) $(_systemd.link_files)
-$(DESTDIR)$(libdir)/%.so: $(outdir)/%.la
+$(DESTDIR)$(libdir)/%.la: $(outdir)/%.la
$(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $< $(@D)
$(outdir)/%-from-name.gperf: $(outdir)/%-list.txt