diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-12 14:40:34 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-12 14:40:34 -0400 |
commit | 0c09c5ba51c6165ef7e714e3e946e6cd7afc9cec (patch) | |
tree | 8f91d8f14d6182ddbb8c7b425afd2eceded987fa /build-aux | |
parent | 4cb2380233342aa01fda978be775c9a735fce3a2 (diff) |
fix
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.each.tail/20-systemd.mk | 8 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/30-automake2autothing.mk | 2 | ||||
-rw-r--r-- | build-aux/Makefile.head.mk | 5 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/20-systemd.mk | 9 | ||||
-rw-r--r-- | build-aux/Makefile.tail.mk | 2 |
5 files changed, 15 insertions, 11 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 ?=)\ diff --git a/build-aux/Makefile.head.mk b/build-aux/Makefile.head.mk index 11b1374a32..36c2c0a2e8 100644 --- a/build-aux/Makefile.head.mk +++ b/build-aux/Makefile.head.mk @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # This bit only gets evaluated once, at the very beginning -ifeq ($(_at.NO_ONCE),) +ifeq ($(origin _at.NO_ONCE),undefined) ifeq ($(topsrcdir),) $(error topsrcdir must be set before including Makefile.head.mk) @@ -50,6 +50,9 @@ _at.reverse = $(if $1,$(call _at.reverse,$(_at.rest))) $(firstword $1) at.dirlocal += at.subdirs at.dirlocal += at.depdirs +_at.outdirs ?= +_at.included_makefiles ?= + include $(sort $(wildcard $(topsrcdir)/build-aux/Makefile.once.head/*.mk)) endif # _at.NO_ONCE diff --git a/build-aux/Makefile.once.head/20-systemd.mk b/build-aux/Makefile.once.head/20-systemd.mk index 75c35b6f4d..a73fc831cf 100644 --- a/build-aux/Makefile.once.head/20-systemd.mk +++ b/build-aux/Makefile.once.head/20-systemd.mk @@ -21,6 +21,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. +TESTS ?= + + SHELL = bash -o pipefail OUR_CPPFLAGS += -MT $@ -MD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).P$(patsubst .%,%,$(suffix $(@F))) @@ -39,15 +42,9 @@ COMPILE = $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=link $(CCLD) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ -# remove targets if the command fails .DELETE_ON_ERROR: - -# keep intermediate files .SECONDARY: -# Keep the test-suite.log -.PRECIOUS: $(TEST_SUITE_LOG) Makefile - V ?= AM_V_M4 = $(AM_V_M4_$(V)) diff --git a/build-aux/Makefile.tail.mk b/build-aux/Makefile.tail.mk index 38f40c2e6a..a8b3d8938f 100644 --- a/build-aux/Makefile.tail.mk +++ b/build-aux/Makefile.tail.mk @@ -40,7 +40,7 @@ $(foreach _at.NO_ONCE,y,\ $(eval include $(filter-out $(_at.included_makefiles),$(makefile))))) # This bit only gets evaluated once, after all of the other Makefiles are read -ifeq ($(_at.NO_ONCE),) +ifeq ($(origin _at.NO_ONCE),undefined) outdir = /bogus srcdir = /bogus |