diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-11-12 17:29:07 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-11-14 23:39:53 +0100 |
commit | d025f1e4dca8fc1436aff76f9e6185fe3e728daa (patch) | |
tree | 7cddcd1bfeebe2f8e7bbac0ac249755aa91789e6 /Makefile.am | |
parent | be1015dd347edd9d72eebb444c88dddf92383c18 (diff) |
build-sys: store journald code in a noinst library
The point is to allow the use of journald functions by other binaries.
Before, journald code was split into multiple files (journald-*.[ch]),
but all those files all required functions from journald.c. And
journald.c has its own main(). Now, it is possible to link against
those functions, e.g. from test binaries.
This constitutes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=872638.
The patch does the following:
1. rename journald.h to journald-server.h and move corresponding code
to journald-server.c.
2. add journald-server.c and other journald-*.c parts to
libsystemd-journal-internal.
3. remove journald-syslog.c from test_journal_syslog_SOURCES, since
it is now contained in libsystemd-journal-internal.
There are no code changes, apart from the removal of a few static's,
to allow function calls between files.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/Makefile.am b/Makefile.am index 53a3bb9f90..e3b629f89e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2432,42 +2432,12 @@ EXTRA_DIST += \ # ------------------------------------------------------------------------------ systemd_journald_SOURCES = \ src/journal/journald.c \ - src/journal/journald.h \ - src/journal/journald-kmsg.c \ - src/journal/journald-kmsg.h \ - src/journal/journald-syslog.c \ - src/journal/journald-syslog.h \ - src/journal/journald-stream.c \ - src/journal/journald-stream.h \ - src/journal/journald-console.c \ - src/journal/journald-console.h \ - src/journal/journald-native.c \ - src/journal/journald-native.h \ - src/journal/journald-rate-limit.c \ - src/journal/journald-rate-limit.h \ - src/journal/journal-internal.h - -nodist_systemd_journald_SOURCES = \ - src/journal/journald-gperf.c + src/journal/journald-server.h systemd_journald_LDADD = \ - libsystemd-label.la \ - libsystemd-shared.la \ - libsystemd-audit.la \ - libsystemd-daemon.la \ - libsystemd-id128-internal.la \ libsystemd-journal-internal.la \ - libudev.la - -if ENABLE_LOGIND -systemd_journald_LDADD += \ - libsystemd-login-internal.la -endif - -if HAVE_ACL -systemd_journald_LDADD += \ - libsystemd-acl.la -endif + libsystemd-shared.la \ + libsystemd-id128-internal.la systemd_cat_SOURCES = \ src/journal/cat.c @@ -2524,12 +2494,11 @@ test_journal_send_LDADD = \ libsystemd-id128-internal.la test_journal_syslog_SOURCES = \ - src/journal/test-journal-syslog.c \ - src/journal/journald-syslog.c + src/journal/test-journal-syslog.c test_journal_syslog_LDADD = \ - libsystemd-shared.la \ libsystemd-journal-internal.la \ + libsystemd-shared.la \ libsystemd-id128-internal.la test_journal_match_SOURCES = \ @@ -2603,12 +2572,44 @@ libsystemd_journal_la_LIBADD = \ libsystemd-id128-internal.la libsystemd_journal_internal_la_SOURCES = \ - $(libsystemd_journal_la_SOURCES) + $(libsystemd_journal_la_SOURCES) \ + src/journal/journald-kmsg.c \ + src/journal/journald-kmsg.h \ + src/journal/journald-syslog.c \ + src/journal/journald-syslog.h \ + src/journal/journald-stream.c \ + src/journal/journald-stream.h \ + src/journal/journald-server.c \ + src/journal/journald-server.h \ + src/journal/journald-console.c \ + src/journal/journald-console.h \ + src/journal/journald-native.c \ + src/journal/journald-native.h \ + src/journal/journald-rate-limit.c \ + src/journal/journald-rate-limit.h \ + src/journal/journal-internal.h libsystemd_journal_internal_la_CFLAGS = \ $(AM_CFLAGS) -libsystemd_journal_internal_la_LIBADD = +libsystemd_journal_internal_la_LIBADD = \ + libsystemd-label.la \ + libsystemd-audit.la \ + libsystemd-daemon.la \ + libudev.la + +nodist_libsystemd_journal_internal_la_SOURCES = \ + src/journal/journald-gperf.c + +if ENABLE_LOGIND +libsystemd_journal_internal_la_LIBADD += \ + libsystemd-login-internal.la +endif + +if HAVE_ACL +libsystemd_journal_internal_la_LIBADD += \ + libsystemd-acl.la +endif if HAVE_XZ libsystemd_journal_la_SOURCES += \ |