diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-17 01:33:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-17 01:33:02 -0400 |
commit | 610d801297fe7e46c319e6da4e6571aaded630dd (patch) | |
tree | d27f6d077694b84ed9881c99b2894701932ca6e1 /build-aux/Makefile.once.head/10-lt.mk | |
parent | 7648bff2717c24e9f5c90ec9e4588eda510aba9d (diff) |
more
Diffstat (limited to 'build-aux/Makefile.once.head/10-lt.mk')
-rw-r--r-- | build-aux/Makefile.once.head/10-lt.mk | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/build-aux/Makefile.once.head/10-lt.mk b/build-aux/Makefile.once.head/10-lt.mk index b014a0f2a4..3c6bea4222 100644 --- a/build-aux/Makefile.once.head/10-lt.mk +++ b/build-aux/Makefile.once.head/10-lt.mk @@ -1,12 +1,17 @@ mod.lt.description = (systemd) Easy handling of libtool dependencies -mod.lt.deps += files +mod.lt.deps += files quote -_lt.dups = $(sort $(foreach l,$1,$(if $(filter-out 1,$(words $(filter $l,$1))),$l))) _lt.patsubst-all = $(if $1,$(call _lt.patsubst-all,$(wordlist 2,$(words $1),$1),$2,$(patsubst $(firstword $1),$2,$3)),$3) _lt.unLIBPATTERNS = $(foreach _lt.tmp,$1,$(if $(filter $(.LIBPATTERNS),$(notdir $(_lt.tmp))),$(call _lt.patsubst-all,$(.LIBPATTERNS),-l%,$(notdir $(_lt.tmp))),$(_lt.tmp))) +_lt.rest = $(wordlist 2,$(words $1),$1) +_lt.dedup = $(if $1,$(if $(filter $(firstword $1),$(call _lt.rest,$1)),,$(firstword $1) )$(call _lt.dedup,$(call _lt.rest,$1))) +_lt.static_dependency_libs = $(foreach _lt.tmp,$1,$(_lt.tmp)$(if $(filter %.la,$(_lt.tmp)), $(shell . $(_lt.tmp); echo $$static_dependency_libs))) -# The semantics for the de-dup bit are a bit weird. My head hurts thinking -# about them. TODO: clarify/simplify/something -lt.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(files.sys)))) -_lt.link_files = $(filter %.o %.lo %.la -l%,$(call _lt.unLIBPATTERNS,$^)) -lt.link_files = $(filter-out $(call _lt.dups,$(_lt.link_files)),$(_lt.link_files)) +lt.lib.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(files.sys)))) +lt.lib.files.all = $(call _lt.dedup,$(filter %.lo %.la -l%,$(call _lt.static_dependency_libs,$(call _lt.unLIBPATTERNS,$^)))) +lt.lib.files.ld = $(filter %.lo -l% $(if $(lt.lib.rpath),%.la),$(lt.lib.files.all)) +lt.lib.files.la = $(filter %.la,$(lt.lib.files.all)) +lt.lib.post = $(if $(lt.lib.files.la),printf '\nstatic_dependency_libs="$(lt.lib.files.la)"\ndependency_libs="$$dependency_libs $$static_dependency_libs"\n' >> $@) + +lt.exe.files.all = $(call _lt.dedup,$(filter %.o %.la -l%,$(call _lt.static_dependency_libs,$(call _lt.unLIBPATTERNS,$^)))) +lt.exe.files.ld = $(lt.exe.files.all) |