summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 18:48:01 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 18:48:01 -0400
commit7b5516edb2acfc4ef6a48c5044eb4263eb9a3ad3 (patch)
treeac0460406a1a7c1dba4ef1002fa632e12321ae47
parent534754b0800a464247496f8c49948381797d9afb (diff)
stuff
-rw-r--r--build-aux/Makefile.each.tail/20-systemd.mk3
-rw-r--r--build-aux/Makefile.once.head/20-systemd.mk11
-rw-r--r--config.mk.in4
-rw-r--r--src/libsystemd/Makefile11
-rw-r--r--src/libsystemd/libsystemd-internal/Makefile20
-rw-r--r--src/libsystemd/libsystemd-internal/subdir.mk11
-rw-r--r--src/libudev/Makefile2
-rw-r--r--src/libudev/src/Makefile15
8 files changed, 39 insertions, 38 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk
index fa0bd9ec2a..48963c2a22 100644
--- a/build-aux/Makefile.each.tail/20-systemd.mk
+++ b/build-aux/Makefile.each.tail/20-systemd.mk
@@ -13,3 +13,6 @@ $(outdir)/.deps:
$(outdir)/%.la:
$(AM_V_CCLD)$(LINK) $(filter-out .var%,$^)
+
+$(DESTDIR)$(libdir)/%.so: $(outdir)/%.la
+ $(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $< $(@D)
diff --git a/build-aux/Makefile.once.head/20-systemd.mk b/build-aux/Makefile.once.head/20-systemd.mk
index 7358649809..2a2f3a7ac5 100644
--- a/build-aux/Makefile.once.head/20-systemd.mk
+++ b/build-aux/Makefile.once.head/20-systemd.mk
@@ -34,6 +34,11 @@ 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 $@
+SED_PROCESS = \
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+ < $< > $@
+
# remove targets if the command fails
.DELETE_ON_ERROR:
@@ -126,7 +131,7 @@ define generate-sym-test
$(AM_V_at)printf 'return 0; }\n' >> $@
endef
-at.dirlocal += noinst_LTLIBRARIES
+at.dirlocal += noinst_LTLIBRARIES lib_LTLIBRARIES
automake_name = $(subst -,_,$(subst .,_,$1))
automake_sources = $(addprefix $(outdir)/,$(notdir $($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))
automake_lo = $(patsubst %.c,%.lo,$(filter %.c,$(automake_sources)))
@@ -134,7 +139,9 @@ automake_o = $(patsubst %.c,%.o,$(filter %.c,$(automake_sources)))
automake_libs = $($(automake_name)_LIBADD)
define automake2autothing
-std.out_files += $(noinst_LTLIBRARIES)
+std.out_files += $(noinst_LTLIBRARIES) $(lib_LTLIBRARIES) $(notdir $(pkgconfiglib_DATA))
+std.sys_files += $(addprefix $(libdir)/,$(lib_LTLIBRARIES))
+std.sys_files += $(addprefix $(pkgconfiglibdir)/,$(notdir $(lib_pkgconfiglib_DATA)))
$(foreach n,$(call automake_name,$(std.out_files)),\
$(eval $n_SOURCES ?=)\
$(eval nodist_$n_SOURCES ?=)\
diff --git a/config.mk.in b/config.mk.in
index 1e25255175..7768f74c6e 100644
--- a/config.mk.in
+++ b/config.mk.in
@@ -99,14 +99,12 @@ libshared.CPPFLAGS = -I$(topsrcdir)/src/libshared -I$(topoutdir)/src/libshar
libshared.DEPENDS = $(topoutdir)/src/libshared/libshared.la
libfirewall.CPPFLAGS = -I$(topsrcdir)/src/libfirewall -I$(topoutdir)/src/libfirewall
libfirewall.DEPENDS = $(topoutdir)/src/libfirewall/libfirewall.la
-libsystemd.CPPFLAGS = -I$(topsrcdir)/src/libsystemd/libsystemd/include -I$(topoutdir)/src/libsystemd/libsystemd/include
+libsystemd.CPPFLAGS = -I$(topsrcdir)/src/libsystemd/include -I$(topoutdir)/src/libsystemd/include
libsystemd.DEPENDS = $(topoutdir)/src/libsystemd/libsystemd/libsystemd.la
libsystemd-internal.CPPFLAGS = -I$(topsrcdir)/src/libsystemd/libsystemd-internal/include
libsystemd-internal.DEPENDS = $(topoutdir)/src/libsystemd/libsystemd-internal/libsystemd-internal.la
libsystemd-journal.CPPFLAGS = -I$(topsrcdir)/src/libsystemd/libsystemd-journal/include
libsystemd-journal.DEPENDS = $(topoutdir)/src/libsystemd/libsystemd-journal/libsystemd-journal.la
-libsystemd.CPPFLAGS = -I$(topsrcdir)/src/libsystemd/libsystemd-journal/include
-libsystemd.DEPENDS = $(topoutdir)/src/libsystemd/libsystemd/libsystemd.la
libacl.CPPFLAGS =
libacl.DEPENDS = @ACL_LIBS@
libapparmor.CPPFLAGS = $(shell $(PKG_CONFIG) --cflags libapparmor)
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile
index b5e6e44523..a7d690515f 100644
--- a/src/libsystemd/Makefile
+++ b/src/libsystemd/Makefile
@@ -64,21 +64,12 @@ libsystemd_la_CFLAGS = \
libsystemd_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
- -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
+ -Wl,--version-script=$(@D)/libsystemd.sym
libsystemd_la_LIBADD = \
$(libsystemd_internal_la_LIBADD) \
$(libsystemd_journal_internal_la_LIBADD)
-libsystemd-install-hook:
- libname=libsystemd.so && $(move-to-rootlibdir)
-
-libsystemd-uninstall-hook:
- rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
-
-INSTALL_EXEC_HOOKS += libsystemd-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
-
pkgconfiglib_DATA += \
src/libsystemd/libsystemd.pc
diff --git a/src/libsystemd/libsystemd-internal/Makefile b/src/libsystemd/libsystemd-internal/Makefile
index 38115c9108..3d65f0ea11 100644
--- a/src/libsystemd/libsystemd-internal/Makefile
+++ b/src/libsystemd/libsystemd-internal/Makefile
@@ -114,19 +114,23 @@ libsystemd_internal_la_SOURCES = \
src/libsystemd/sd-resolve/sd-resolve.c
libsystemd_internal_la_LIBADD = \
- libbasic.la \
+ $(topoutdir)/src/libbasic/libbasic.la \
-lresolv
noinst_LTLIBRARIES += \
libsystemd-internal.la
+automake_sources = $(patsubst src/libsystemd/%,$(outdir)/%,$(filter %.c,$($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))
$(eval $(value automake2autothing))
-std.out_files += libsystemd-internal.la
-CPPFLAGS += $(libsystemd.CPPFLAGS) $(libbasic.CPPFLAGS) $(libshared.CPPFLAGS)
-CPPFLAGS += -DLIBDIR=\"$(libdir)\" -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
-am.subdirs += $(dir $(patsubst src/libsystemd/%.c,$(outdir)/%.lo,$(filter %.c,$(libsystemd_internal_la_SOURCES))))
-$(outdir)/libsystemd-internal.la: \
- $(patsubst src/libsystemd/%.c,$(outdir)/%.lo,$(filter %.c,$(libsystemd_internal_la_SOURCES))) \
- $(libbasic.DEPENDS) -lresolv
+_subdirs := $(patsubst %/,%,$(dir $(call automake_sources,libsystemd-internal.la)))
+automake_sources = $(addprefix $(outdir)/,$(notdir $($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))
+
+at.subdirs += $(_subdirs)
+
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += -DLIBDIR=\"$(libdir)\"
+AM_CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/libsystemd-internal/subdir.mk b/src/libsystemd/libsystemd-internal/subdir.mk
index 69eb85a4d7..96b7145434 100644
--- a/src/libsystemd/libsystemd-internal/subdir.mk
+++ b/src/libsystemd/libsystemd-internal/subdir.mk
@@ -1,7 +1,10 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
-include $(topsrcdir)/automake.head.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
-#CPPFLAGS += $(libsystemd.CPPFLAGS) $(libbasic.CPPFLAGS) $(libshared.CPPFLAGS)
-#CPPFLAGS += -DLIBDIR=\"$(libdir)\" -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += -DLIBDIR=\"$(libdir)\"
+AM_CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
-include $(topsrcdir)/automake.tail.mk
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libudev/Makefile b/src/libudev/Makefile
index fb53230e1b..2531355907 100644
--- a/src/libudev/Makefile
+++ b/src/libudev/Makefile
@@ -37,4 +37,6 @@ test_libudev_sym_LDADD = \
libudev.la
$(eval $(value automake2autothing))
+at.subdirs += src
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libudev/src/Makefile b/src/libudev/src/Makefile
index d802aeb490..76dc8dd295 100644
--- a/src/libudev/src/Makefile
+++ b/src/libudev/src/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
LIBUDEV_CURRENT=7
@@ -68,15 +68,8 @@ libudev-install-hook:
libudev-uninstall-hook:
rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
-INSTALL_EXEC_HOOKS += libudev-install-hook
-UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
-
-# ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
- libudev-internal.la
-
-libudev_internal_la_SOURCES =\
- $(libudev_la_SOURCES)
-
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+
include $(topsrcdir)/build-aux/Makefile.tail.mk