summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-08-10 11:22:38 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-08-10 11:22:38 -0400
commitf22246a490fcb1e8d60f8ae0759b3f1daca7c061 (patch)
tree6ddfb70728fbc2a4920da544c5d4971958bea900 /src/libsystemd
parent1cfeca882ebbd2de350a62e97e7ace35d3a57644 (diff)
fix build system
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/Makefile14
-rw-r--r--src/libsystemd/src/Makefile165
-rw-r--r--src/libsystemd/src/sd-journal/Makefile5
-rw-r--r--src/libsystemd/src/test.mk152
4 files changed, 185 insertions, 151 deletions
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile
index 61bf856c96..5c5d03a51d 100644
--- a/src/libsystemd/Makefile
+++ b/src/libsystemd/Makefile
@@ -52,10 +52,12 @@ libsystemd_la_LDFLAGS = \
$(libsystemd_internal_la_LIBADD) \
$(libsystemd_journal_internal_la_LIBADD)
+libsystemd_la_LIBADD = $(libsystemd-internal.DEPENDS)
+
pkgconfiglib_DATA += \
src/libsystemd/libsystemd.pc
-pkginclude_HEADERS += \
+_pkginclude_HEADERS += \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
src/systemd/sd-bus-vtable.h \
@@ -64,6 +66,11 @@ pkginclude_HEADERS += \
src/systemd/sd-id128.h \
src/systemd/sd-daemon.h
+_pkginclude_HEADERS += \
+ src/systemd/sd-journal.h \
+ src/systemd/sd-messages.h \
+ src/systemd/_sd-common.h
+
rootlib_LTLIBRARIES += \
libsystemd.la
@@ -105,6 +112,11 @@ nodist_test_libsystemd_sym_SOURCES = \
test_libsystemd_sym_LDADD = \
libsystemd.la
+$(DESTDIR)$(pkgincludedir)/%.h: $(srcdir)/include/systemd/%.h
+ @$(NORMAL_INSTALL)
+ $(am.INSTALL_HEADERS)
+
+files.sys.all += $(addprefix $(pkgincludedir)/,$(notdir $(_pkginclude_HEADERS)))
$(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym
nested.subdirs += src
sd.sed_files += libsystemd.pc
diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile
index 759c484bc9..10d3e668e8 100644
--- a/src/libsystemd/src/Makefile
+++ b/src/libsystemd/src/Makefile
@@ -116,141 +116,6 @@ libsystemd_internal_la_LIBADD = \
noinst_LTLIBRARIES += \
libsystemd-internal.la
-test_bus_marshal_SOURCES = \
- src/libsystemd/sd-bus/test-bus-marshal.c
-
-test_bus_marshal_LDADD = \
- libshared.la \
- $(GLIB_LIBS) \
- $(DBUS_LIBS)
-
-test_bus_marshal_CFLAGS = \
- $(AM_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(DBUS_CFLAGS)
-
-test_bus_signature_SOURCES = \
- src/libsystemd/sd-bus/test-bus-signature.c
-
-test_bus_signature_LDADD = \
- libshared.la
-
-test_bus_chat_SOURCES = \
- src/libsystemd/sd-bus/test-bus-chat.c
-
-test_bus_chat_LDADD = \
- libshared.la
-
-test_bus_cleanup_SOURCES = \
- src/libsystemd/sd-bus/test-bus-cleanup.c
-
-test_bus_cleanup_CFLAGS = \
- $(AM_CFLAGS) \
- $(SECCOMP_CFLAGS)
-
-test_bus_cleanup_LDADD = \
- libshared.la
-
-test_bus_server_SOURCES = \
- src/libsystemd/sd-bus/test-bus-server.c
-
-test_bus_server_LDADD = \
- libshared.la
-
-test_bus_objects_SOURCES = \
- src/libsystemd/sd-bus/test-bus-objects.c
-
-test_bus_objects_LDADD = \
- libshared.la
-
-test_bus_error_SOURCES = \
- src/libsystemd/sd-bus/test-bus-error.c
-
-test_bus_error_LDADD = \
- libshared.la
-
-test_bus_gvariant_SOURCES = \
- src/libsystemd/sd-bus/test-bus-gvariant.c
-
-test_bus_gvariant_LDADD = \
- libshared.la \
- $(GLIB_LIBS)
-
-test_bus_gvariant_CFLAGS = \
- $(AM_CFLAGS) \
- $(GLIB_CFLAGS)
-
-test_bus_creds_SOURCES = \
- src/libsystemd/sd-bus/test-bus-creds.c
-
-test_bus_creds_LDADD = \
- libshared.la
-
-test_bus_match_SOURCES = \
- src/libsystemd/sd-bus/test-bus-match.c
-
-test_bus_match_LDADD = \
- libshared.la
-
-test_bus_kernel_SOURCES = \
- src/libsystemd/sd-bus/test-bus-kernel.c
-
-test_bus_kernel_LDADD = \
- libshared.la
-
-test_bus_kernel_bloom_SOURCES = \
- src/libsystemd/sd-bus/test-bus-kernel-bloom.c
-
-test_bus_kernel_bloom_LDADD = \
- libshared.la
-
-test_bus_benchmark_SOURCES = \
- src/libsystemd/sd-bus/test-bus-benchmark.c
-
-test_bus_benchmark_LDADD = \
- libshared.la
-
-test_bus_zero_copy_SOURCES = \
- src/libsystemd/sd-bus/test-bus-zero-copy.c
-
-test_bus_zero_copy_LDADD = \
- libshared.la
-
-test_bus_introspect_SOURCES = \
- src/libsystemd/sd-bus/test-bus-introspect.c
-
-test_bus_introspect_LDADD = \
- libshared.la
-
-test_event_SOURCES = \
- src/libsystemd/sd-event/test-event.c
-
-test_event_LDADD = \
- libshared.la
-
-test_netlink_SOURCES = \
- src/libsystemd/sd-netlink/test-netlink.c
-
-test_netlink_LDADD = \
- libshared.la
-
-test_local_addresses_SOURCES = \
- src/libsystemd/sd-netlink/test-local-addresses.c
-
-test_local_addresses_LDADD = \
- libshared.la
-
-test_resolve_SOURCES = \
- src/libsystemd/sd-resolve/test-resolve.c
-
-test_resolve_LDADD = \
- libshared.la
-
-pkginclude_HEADERS += \
- src/systemd/sd-journal.h \
- src/systemd/sd-messages.h \
- src/systemd/_sd-common.h
-
_libsystemd_journal_internal_la_SOURCES = \
src/journal/sd-journal.c \
src/systemd/sd-journal.h \
@@ -276,7 +141,7 @@ _libsystemd_journal_internal_la_SOURCES = \
src/shared/gcrypt-util.h \
src/shared/gcrypt-util.c
-nodist_libsystemd_journal_internal_la_SOURCES = \
+#nodist_libsystemd_journal_internal_la_SOURCES = \
src/journal/audit_type-to-name.h
gperf_txt_sources += \
@@ -314,23 +179,25 @@ _libsystemd_journal_internal_la_SOURCES += \
libsystemd_journal_internal_la_LIBADD += \
$(GCRYPT_LIBS)
-# fsprg.c is a drop-in file using void pointer arithmetic
libsystemd_journal_internal_la_CFLAGS += \
- $(GCRYPT_CFLAGS) \
- -Wno-pointer-arith
+ $(GCRYPT_CFLAGS)
endif # HAVE_GCRYPT
-_noinst_LTLIBRARIES += \
+#noinst_LTLIBRARIES += \
libsystemd-journal-internal.la
-libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS)
-libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD)
-libsystemd_internal_la_LDADD += $(libsystemd_journal_internal_la_LDADD)
-
-libsystemd-internal.la.SOURCES =
-libsystemd-internal.la.SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES)))
-libsystemd-internal.la.SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES))))
-libsystemd-internal.la.DEPENDS = $(addprefix $(outdir)/,$(libsystemd-internal.la.SOURCES:.c=.lo))
-nested.subdirs += $(sort $(dir $(libsystemd-internal.la.SOURCES)))
+# Hook into the `am` module
+libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS)
+libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD)
+
+# Don't bother trying to hook into the `am` module for the sources; the only
+# thing it adds over declaring the dependencies is adding the appropriate
+# directories to am.subdirs=>at.subdirs; but we can do that here just as easily
+# with nested.subdirs.
+sd.libsystemd_SOURCES =
+sd.libsystemd_SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES)))
+sd.libsystemd_SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES))))
+$(outdir)/libsystemd-internal.la: $(addprefix $(outdir)/,$(sd.libsystemd_SOURCES:.c=.lo))
+nested.subdirs += $(sort $(dir $(sd.libsystemd_SOURCES)))
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/sd-journal/Makefile b/src/libsystemd/src/sd-journal/Makefile
index c9d5c3dcd8..f13c2b51fa 100644
--- a/src/libsystemd/src/sd-journal/Makefile
+++ b/src/libsystemd/src/sd-journal/Makefile
@@ -29,11 +29,14 @@ audit_list_includes += -include libaudit.h
endif # HAVE_AUDIT
$(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/include/basic/missing.h)
- $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
+ $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
$(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
+# fsprg.c is a drop-in file using void pointer arithmetic
+$(outdir)/fsprg.lo: sd.ALL_CFLAGS += -Wno-pointer-arith
+
sd.CPPFLAGS += $(libbasic.CPPFLAGS)
sd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\"
$(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h
diff --git a/src/libsystemd/src/test.mk b/src/libsystemd/src/test.mk
new file mode 100644
index 0000000000..0290b33f6b
--- /dev/null
+++ b/src/libsystemd/src/test.mk
@@ -0,0 +1,152 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+test_bus_marshal_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-marshal.c
+
+test_bus_marshal_LDADD = \
+ libshared.la \
+ $(GLIB_LIBS) \
+ $(DBUS_LIBS)
+
+test_bus_marshal_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(DBUS_CFLAGS)
+
+test_bus_signature_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-signature.c
+
+test_bus_signature_LDADD = \
+ libshared.la
+
+test_bus_chat_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-chat.c
+
+test_bus_chat_LDADD = \
+ libshared.la
+
+test_bus_cleanup_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-cleanup.c
+
+test_bus_cleanup_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+
+test_bus_cleanup_LDADD = \
+ libshared.la
+
+test_bus_server_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-server.c
+
+test_bus_server_LDADD = \
+ libshared.la
+
+test_bus_objects_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-objects.c
+
+test_bus_objects_LDADD = \
+ libshared.la
+
+test_bus_error_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-error.c
+
+test_bus_error_LDADD = \
+ libshared.la
+
+test_bus_gvariant_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-gvariant.c
+
+test_bus_gvariant_LDADD = \
+ libshared.la \
+ $(GLIB_LIBS)
+
+test_bus_gvariant_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(GLIB_CFLAGS)
+
+test_bus_creds_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-creds.c
+
+test_bus_creds_LDADD = \
+ libshared.la
+
+test_bus_match_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-match.c
+
+test_bus_match_LDADD = \
+ libshared.la
+
+test_bus_kernel_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-kernel.c
+
+test_bus_kernel_LDADD = \
+ libshared.la
+
+test_bus_kernel_bloom_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-kernel-bloom.c
+
+test_bus_kernel_bloom_LDADD = \
+ libshared.la
+
+test_bus_benchmark_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-benchmark.c
+
+test_bus_benchmark_LDADD = \
+ libshared.la
+
+test_bus_zero_copy_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-zero-copy.c
+
+test_bus_zero_copy_LDADD = \
+ libshared.la
+
+test_bus_introspect_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-introspect.c
+
+test_bus_introspect_LDADD = \
+ libshared.la
+
+test_event_SOURCES = \
+ src/libsystemd/sd-event/test-event.c
+
+test_event_LDADD = \
+ libshared.la
+
+test_netlink_SOURCES = \
+ src/libsystemd/sd-netlink/test-netlink.c
+
+test_netlink_LDADD = \
+ libshared.la
+
+test_local_addresses_SOURCES = \
+ src/libsystemd/sd-netlink/test-local-addresses.c
+
+test_local_addresses_LDADD = \
+ libshared.la
+
+test_resolve_SOURCES = \
+ src/libsystemd/sd-resolve/test-resolve.c
+
+test_resolve_LDADD = \
+ libshared.la