From 0c09c5ba51c6165ef7e714e3e946e6cd7afc9cec Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 12 Jun 2016 14:40:34 -0400 Subject: fix --- autoconf.mk.in | 1 + build-aux/Makefile.each.tail/20-systemd.mk | 8 ++++++-- build-aux/Makefile.each.tail/30-automake2autothing.mk | 2 +- build-aux/Makefile.head.mk | 5 ++++- build-aux/Makefile.once.head/20-systemd.mk | 9 +++------ build-aux/Makefile.tail.mk | 2 +- config.mk.in | 13 ++++++++++--- src/busctl/Makefile | 3 +-- src/grp-boot/bootctl/Makefile | 2 -- src/grp-coredump/coredumpctl/Makefile | 2 -- src/grp-coredump/systemd-coredump/Makefile | 2 -- src/grp-machine/libmachine-core/Makefile | 3 --- src/grp-machine/nss-mymachines/Makefile | 1 - src/libshared/Makefile | 8 +++----- src/libudev/src/Makefile | 9 +++++++-- 15 files changed, 37 insertions(+), 33 deletions(-) diff --git a/autoconf.mk.in b/autoconf.mk.in index 94dfca0b54..031dab17d9 100644 --- a/autoconf.mk.in +++ b/autoconf.mk.in @@ -1,4 +1,5 @@ top_builddir = $(topoutdir) +top_srcdir = $(topsrcdir) PACKAGE = @PACKAGE@ VERSION = @VERSION@ 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 . # 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 . +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 diff --git a/config.mk.in b/config.mk.in index 3d71265213..dd8f761e22 100644 --- a/config.mk.in +++ b/config.mk.in @@ -21,7 +21,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . -ifeq ($(topsrcdir),) +ifeq ($(origin topsrcdir),undefined) topoutdir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) abs_topsrcdir := @abs_top_srcdir@ @@ -41,6 +41,11 @@ OUR_CFLAGS = @OUR_CFLAGS@ OUR_LDFLAGS = @OUR_LDFLAGS@ OUR_LIBTOOLFLAGS = +AM_CPPFLAGS = +AM_CFLAGS = +AM_LDFLAGS = +AM_LIBTOOLFLAGS = + EFI_CPPFLAGS = EFI_CFLAGS = EFI_LDFLAGS = @@ -105,9 +110,9 @@ libfirewall.CPPFLAGS = -I$(topsrcdir)/src/libfirewall -I$(topout libfirewall.DEPENDS = $(topoutdir)/src/libfirewall/libfirewall.la libshared.CPPFLAGS = -I$(topsrcdir)/src/libshared -I$(topoutdir)/src/libshared libshared.DEPENDS = $(topoutdir)/src/libshared/libshared.la -#libsystemd-internal.CPPFLAGS = +libsystemd-internal.CPPFLAGS = $(libsystemd.CPPFLAGS) libsystemd-internal.DEPENDS = $(topoutdir)/src/libsystemd/libsystemd-internal/libsystemd-internal.la -#libsystemd-journal-internal.CPPFLAGS = +libsystemd-journal-internal.CPPFLAGS = $(libsystemd.CPPFLAGS) libsystemd-journal-internal.DEPENDS = $(topoutdir)/src/libsystemd/libsystemd-journal-internal/libsystemd-journal-internal.la #libsystemd-network.CPPFLAGS = #libsystemd-network.DEPENDS = @@ -115,6 +120,8 @@ libsystemd.CPPFLAGS = -I$(topsrcdir)/src/libsystemd/include libsystemd.DEPENDS = $(topoutdir)/src/libsystemd/libsystemd.la libudev.CPPFLAGS = -I$(topsrcdir)/src/libudev/include libudev.DEPENDS = $(topoutdir)/src/libudev/src/libudev.la +libudev-internal.CPPFLAGS = $(libudev.CPPFLAGS) +libudev-internal.DEPENDS = $(topoutdir)/src/libudev/src/libudev.la # # -core libs # libbus-proxy-core.CPPFLAGS = # libbus-proxy-core.DEPENDS = diff --git a/src/busctl/Makefile b/src/busctl/Makefile index d4a3c628cb..b256de00d2 100644 --- a/src/busctl/Makefile +++ b/src/busctl/Makefile @@ -34,8 +34,7 @@ busctl_SOURCES = \ busctl_LDADD = \ libshared.la -systemd.CPPFLAGS += $(libshared.CPPFLAGS) -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) +busctl_LDADD += libbasic.la # was hidden by libshared->libsystemd->libbasic systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-boot/bootctl/Makefile b/src/grp-boot/bootctl/Makefile index 221257b905..3b5d86e95c 100644 --- a/src/grp-boot/bootctl/Makefile +++ b/src/grp-boot/bootctl/Makefile @@ -53,7 +53,5 @@ endif # HAVE_BLKID endif # ENABLE_EFI bootctl_LDADD += libbasic.la # was hidden by libshared->libsystemd->libbasic -systemd.CPPFLAGS += $(libshared.CPPFLAGS) -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-coredump/coredumpctl/Makefile b/src/grp-coredump/coredumpctl/Makefile index 07dbe437bf..4b291feb44 100644 --- a/src/grp-coredump/coredumpctl/Makefile +++ b/src/grp-coredump/coredumpctl/Makefile @@ -38,8 +38,6 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_coredumpctl -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) -systemd.CPPFLAGS += $(libshared.CPPFLAGS) systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-journal-internal include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-coredump/systemd-coredump/Makefile b/src/grp-coredump/systemd-coredump/Makefile index 7e1070507c..df1f126e52 100644 --- a/src/grp-coredump/systemd-coredump/Makefile +++ b/src/grp-coredump/systemd-coredump/Makefile @@ -78,8 +78,6 @@ EXTRA_DIST += \ sysctl.d/50-coredump.conf.in \ units/systemd-coredump@.service.in -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) -systemd.CPPFLAGS += $(libshared.CPPFLAGS) systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-journal-internal systemd.CPPFLAGS += -I$(topsrcdir)/src/journal systemd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" diff --git a/src/grp-machine/libmachine-core/Makefile b/src/grp-machine/libmachine-core/Makefile index 110d6484c7..d22e01e25f 100644 --- a/src/grp-machine/libmachine-core/Makefile +++ b/src/grp-machine/libmachine-core/Makefile @@ -49,9 +49,6 @@ test_machine_tables_LDADD = \ tests += \ test-machine-tables -systemd.CPPFLAGS += $(libshared.CPPFLAGS) -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) -systemd.CPPFLAGS += $(libsystemd.CPPFLAGS) systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-machine/nss-mymachines/Makefile b/src/grp-machine/nss-mymachines/Makefile index 454ab3f90e..53aa0eedaf 100644 --- a/src/grp-machine/nss-mymachines/Makefile +++ b/src/grp-machine/nss-mymachines/Makefile @@ -44,7 +44,6 @@ lib_LTLIBRARIES += \ libnss_mymachines.la libnss_mymachines_la_LIBADD += libbasic.la # was hidden by libsystemd->libbasic -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libshared/Makefile b/src/libshared/Makefile index 9846a197c4..5a2a22bce8 100644 --- a/src/libshared/Makefile +++ b/src/libshared/Makefile @@ -137,7 +137,7 @@ libshared_la_CFLAGS = \ libshared_la_LIBADD = \ libsystemd-internal.la \ libsystemd-journal-internal.la \ - libudev.la \ + libudev-internal.la \ $(ACL_LIBS) \ $(LIBIDN_LIBS) \ $(SECCOMP_LIBS) @@ -149,8 +149,6 @@ test_local_addresses_LDADD = \ libshared.la libshared_la_LIBADD += libbasic.la # was hidden by libsystemd->libbasic -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) -systemd.CPPFLAGS += $(libsystemd.CPPFLAGS) systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-journal-internal systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus @@ -162,9 +160,9 @@ systemd.CPPFLAGS += -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" systemd.CPPFLAGS += -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" systemd.CPPFLAGS += -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" -systemd.CPPFLAGS += -DSYSTEMD_FSCK_PATH=\"$(rootlibexecdir)/systemd-fsck\" +systemd.CPPFLAGS += -DSYSTEMD_FSCK_PATH=\"$(libexecdir)/systemd-fsck\" -systemd.CPPFLAGS += -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" +systemd.CPPFLAGS += -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(bindir)/systemd-tty-ask-password-agent\" systemd.CPPFLAGS += -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" systemd.CPPFLAGS += -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" diff --git a/src/libudev/src/Makefile b/src/libudev/src/Makefile index 41bb847bab..69d6573b5f 100644 --- a/src/libudev/src/Makefile +++ b/src/libudev/src/Makefile @@ -74,10 +74,15 @@ test_libudev_sym_CFLAGS = \ test_libudev_sym_LDADD = \ libudev.la +noinst_LTLIBRARIES += \ + libudev-internal.la + +libudev_internal_la_SOURCES =\ + $(libudev_la_SOURCES) + systemd.sed_files += libudev.pc -systemd.CPPFLAGS += $(libbasic.CPPFLAGS) -systemd.CPPFLAGS += $(libsystemd.CPPFLAGS) +libudev_la_LIBADD += libbasic.la # was hidden by libsystemd->libbasic systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-device systemd.CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-hwdb -- cgit v1.2.3-54-g00ecf