chiark / gitweb /
nspawn: introduce new --link-journal= switch to link container journals into host
[elogind.git] / Makefile.am
index a06b0ca..985e8ef 100644 (file)
@@ -23,6 +23,9 @@ AM_MAKEFLAGS = --no-print-directory
 
 SUBDIRS = . po
 
+# remove targets if the command fails
+.DELETE_ON_ERROR:
+
 LIBUDEV_CURRENT=1
 LIBUDEV_REVISION=2
 LIBUDEV_AGE=0
@@ -79,7 +82,7 @@ rootprefix=@rootprefix@
 rootbindir=$(rootprefix)/bin
 rootlibexecdir=$(rootprefix)/lib/systemd
 
-CLEANFILES =
+CLEANFILES = BUILT_SOURCES
 EXTRA_DIST =
 BUILT_SOURCES =
 INSTALL_EXEC_HOOKS =
@@ -141,6 +144,7 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/login \
        -I $(top_srcdir)/src/journal \
        -I $(top_srcdir)/src/systemd \
+       -I $(top_builddir)/src/core \
        -I $(top_srcdir)/src/core \
        -I $(top_srcdir)/src/libudev \
        -I $(top_srcdir)/src/udev
@@ -498,8 +502,19 @@ MANPAGES = \
        man/sd-id128.3 \
        man/sd_id128_to_string.3 \
        man/sd_id128_randomize.3 \
+       man/sd_id128_get_machine.3 \
        man/sd-journal.3 \
-       man/sd_journal_print.3
+       man/sd_journal_print.3 \
+       man/sd_journal_stream_fd.3 \
+       man/sd_journal_open.3 \
+       man/sd_journal_next.3 \
+       man/sd_journal_get_data.3 \
+       man/sd_journal_get_realtime_usec.3 \
+       man/sd_journal_get_cutoff_realtime_usec.3 \
+       man/sd_journal_get_cursor.3 \
+       man/sd_journal_get_fd.3 \
+       man/sd_journal_add_match.3 \
+       man/sd_journal_seek_head.3
 
 MANPAGES_ALIAS = \
        man/reboot.8 \
@@ -529,17 +544,44 @@ MANPAGES_ALIAS = \
        man/systemd-tmpfiles-setup.service.8 \
        man/systemd-tmpfiles-clean.service.8 \
        man/systemd-tmpfiles-clean.timer.8 \
-       man/sd_id128_t.7 \
-       man/SD_ID128_MAKE.7 \
-       man/SD_ID128_FORMAT_STR.7 \
-       man/SD_ID128_FORMAT_VAL.7 \
-       man/sd_id128_equal.7 \
+       man/sd_id128_t.3 \
+       man/SD_ID128_MAKE.3 \
+       man/SD_ID128_FORMAT_STR.3 \
+       man/SD_ID128_FORMAT_VAL.3 \
+       man/sd_id128_equal.3 \
        man/sd_id128_from_string.3 \
-       man/sd_id128_get_machine.3 \
        man/sd_id128_get_boot.3 \
        man/sd_journal_printv.3 \
        man/sd_journal_send.3 \
-       man/sd_journal_sendv.3
+       man/sd_journal_sendv.3 \
+       man/SD_JOURNAL_SUPPRESS_LOCATION.3 \
+       man/sd_journal_open_directory.3 \
+       man/sd_journal_close.3 \
+       man/sd_journal.3 \
+       man/SD_JOURNAL_RUNTIME_ONLY.3 \
+       man/SD_JOURNAL_SYSTEM_ONLY.3 \
+       man/SD_JOURNAL_LOCAL_ONLY.3 \
+       man/sd_journal_previous.3 \
+       man/sd_journal_next_skip.3 \
+       man/sd_journal_previous_skip.3 \
+       man/SD_JOURNAL_FOREACH.3 \
+       man/SD_JOURNAL_FOREACH_BACKWARDS.3 \
+       man/sd_journal_enumerate_data.3 \
+       man/sd_journal_restart_data.3 \
+       man/SD_JOURNAL_FOREACH_DATA.3 \
+       man/sd_journal_get_monotonic_usec.3 \
+       man/sd_journal_get_cutoff_monotonic_usec.3 \
+       man/sd_journal_process.3 \
+       man/sd_journal_wait.3 \
+       man/SD_JOURNAL_NOP.3 \
+       man/SD_JOURNAL_APPEND.3 \
+       man/SD_JOURNAL_INVALIDATE.3 \
+       man/sd_journal_add_disjunction.3 \
+       man/sd_journal_flush_matches.3 \
+       man/sd_journal_seek_tail.3 \
+       man/sd_journal_seek_monotonic_usec.3 \
+       man/sd_journal_seek_realtime_usec.3 \
+       man/sd_journal_seek_cursor.3
 
 man/reboot.8: man/halt.8
 man/poweroff.8: man/halt.8
@@ -574,11 +616,38 @@ man/SD_ID128_FORMAT_STR.3: man/sd-id128.3
 man/SD_ID128_FORMAT_VAL.3: man/sd-id128.3
 man/sd_id128_equal.3: man/sd-id128.3
 man/sd_id128_from_string.3: man/sd_id128_to_string.3
-man/sd_id128_get_machine.3: man/sd_id128_randomize.3
-man/sd_id128_get_boot.3: man/sd_id128_randomize.3
+man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
 man/sd_journal_printv.3: man/sd_journal_print.3
 man/sd_journal_send.3: man/sd_journal_print.3
 man/sd_journal_sendv.3: man/sd_journal_print.3
+man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3
+man/sd_journal_open_directory.3: man/sd_journal_open.3
+man/sd_journal_close.3: man/sd_journal_open.3
+man/sd_journal.3: man/sd_journal_open.3
+man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3
+man/SD_JOURNAL_SYSTEM_ONLY.3: man/sd_journal_open.3
+man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3
+man/sd_journal_previous.3: man/sd_journal_next.3
+man/sd_journal_next_skip.3: man/sd_journal_next.3
+man/sd_journal_previous_skip.3: man/sd_journal_next.3
+man/SD_JOURNAL_FOREACH.3: man/sd_journal_next.3
+man/SD_JOURNAL_FOREACH_BACKWARDS.3: man/sd_journal_next.3
+man/sd_journal_enumerate_data.3: man/sd_journal_get_data.3
+man/sd_journal_restart_data.3: man/sd_journal_get_data.3
+man/SD_JOURNAL_FOREACH_DATA.3: man/sd_journal_get_data.3
+man/sd_journal_get_monotonic_usec.3: man/sd_journal_get_realtime_usec.3
+man/sd_journal_get_cutoff_monotonic_usec.3: man/sd_journal_get_cutoff_realtime_usec.3
+man/sd_journal_process.3: man/sd_journal_get_fd.3
+man/sd_journal_wait.3: man/sd_journal_get_fd.3
+man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3
+man/SD_JOURNAL_APPEND.3: man/sd_journal_get_fd.3
+man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3
+man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
+man/sd_journal_flush_matches.3: man/sd_journal_add_match.3
+man/sd_journal_seek_tail.3: man/sd_journal_seek_head.3
+man/sd_journal_seek_monotonic_usec.3: man/sd_journal_seek_head.3
+man/sd_journal_seek_realtime_usec.3: man/sd_journal_seek_head.3
+man/sd_journal_seek_cursor.3: man/sd_journal_seek_head.3
 
 XML_FILES = \
        ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
@@ -590,13 +659,35 @@ man_MANS = \
 
 noinst_DATA = \
        ${XML_FILES:.xml=.html}
+
+CLEANFILES += \
+       $(MANPAGES) \
+       $(MANPAGES_ALIAS) \
+       ${XML_FILES:.xml=.html}
+
+if HAVE_PYTHON
+noinst_DATA += \
+       man/index.html
+
+CLEANFILES += \
+       man/index.html
+
+$(builddir)/man/index.html: $(XML_FILES:.xml=.html) $(top_srcdir)/make-man-index.py
+       $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+       $(PYTHON) $(top_srcdir)/make-man-index.py $(XML_FILES) > $@
+
+EXTRA_DIST += \
+       man/index.html
+endif
+
 endif
 
 EXTRA_DIST += \
        $(XML_FILES) \
        ${XML_FILES:.xml=.html} \
        $(MANPAGES) \
-       $(MANPAGES_ALIAS)
+       $(MANPAGES_ALIAS) \
+       make-man-index.py
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -605,6 +696,8 @@ noinst_LTLIBRARIES += \
 libsystemd_shared_la_SOURCES = \
        src/shared/linux/auto_dev-ioctl.h \
        src/shared/linux/fanotify.h \
+       src/shared/linux/seccomp.h \
+       src/shared/linux/seccomp-bpf.h \
        src/shared/missing.h \
        src/shared/list.h \
        src/shared/macro.h \
@@ -876,11 +969,17 @@ libsystemd_core_la_SOURCES = \
        src/core/build.h \
        src/core/sysfs-show.h \
        src/core/switch-root.h \
-       src/core/switch-root.c
+       src/core/switch-root.c \
+       src/core/killall.h \
+       src/core/killall.c \
+       src/core/syscall-list.c \
+       src/core/syscall-list.h
 
 nodist_libsystemd_core_la_SOURCES = \
        src/core/load-fragment-gperf.c \
-       src/core/load-fragment-gperf-nulstr.c
+       src/core/load-fragment-gperf-nulstr.c \
+       src/core/syscall-from-name.h \
+       src/core/syscall-to-name.h
 
 libsystemd_core_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -905,7 +1004,7 @@ libsystemd_core_la_LIBADD = \
 
 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@ || rm $@
+       $(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
 
 EXTRA_DIST += \
        src/core/load-fragment-gperf.gperf.m4
@@ -913,7 +1012,25 @@ EXTRA_DIST += \
 CLEANFILES += \
        src/core/load-fragment-gperf.gperf \
        src/core/load-fragment-gperf.c \
-       src/core/load-fragment-gperf-nulstr.c
+       src/core/load-fragment-gperf-nulstr.c \
+       src/core/syscall-list.txt \
+       src/core/syscall-from-name.gperf
+
+BUILT_SOURCES += \
+       src/core/syscall-from-name.h \
+       src/core/syscall-to-name.h
+
+src/core/syscall-list.txt: Makefile
+       $(AM_V_GEN)cpp $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9]/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
+
+src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
+
+src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
+       $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
+
+src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[__NR_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
 
 # ------------------------------------------------------------------------------
 systemd_SOURCES = \
@@ -993,7 +1110,8 @@ noinst_PROGRAMS += \
 TESTS += \
        test-job-type \
        test-env-replace \
-       test-strv
+       test-strv \
+       test-unit-name
 
 test_engine_SOURCES = \
        src/test/test-engine.c
@@ -1132,7 +1250,9 @@ systemd_shutdown_SOURCES = \
        src/core/umount.h \
        src/core/shutdown.c \
        src/core/mount-setup.c \
-       src/core/mount-setup.h
+       src/core/mount-setup.h \
+       src/core/killall.h \
+       src/core/killall.c
 
 systemd_shutdown_LDADD = \
        libsystemd-label.la \
@@ -1348,7 +1468,8 @@ systemd_nspawn_LDADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
        libsystemd-shared.la \
-       libsystemd-daemon.la
+       libsystemd-daemon.la \
+       libsystemd-id128-internal.la
 
 # ------------------------------------------------------------------------------
 systemd_stdio_bridge_SOURCES = \
@@ -1420,13 +1541,31 @@ MANPAGES_ALIAS += \
        man/sd_is_socket_unix.3 \
        man/sd_is_socket_inet.3 \
        man/sd_is_mq.3 \
-       man/sd_notifyf.3
+       man/sd_notifyf.3 \
+       man/SD_LISTEN_FDS_START.3 \
+       man/SD_EMERG.3 \
+       man/SD_ALERT.3 \
+       man/SD_CRIT.3 \
+       man/SD_ERR.3 \
+       man/SD_WARNING.3 \
+       man/SD_NOTICE.3 \
+       man/SD_INFO.3 \
+       man/SD_DEBUG.3
 
 man/sd_is_socket.3: man/sd_is_fifo.3
 man/sd_is_socket_unix.3: man/sd_is_fifo.3
 man/sd_is_socket_inet.3: man/sd_is_fifo.3
 man/sd_is_mq.3: man/sd_is_fifo.3
 man/sd_notifyf.3: man/sd_notify.3
+man/SD_LISTEN_FDS_START.3: man/sd_listen_fds.3
+man/SD_EMERG.3: man/sd-daemon.3
+man/SD_ALERT.3: man/sd-daemon.3
+man/SD_CRIT.3: man/sd-daemon.3
+man/SD_ERR.3: man/sd-daemon.3
+man/SD_WARNING.3: man/sd-daemon.3
+man/SD_NOTICE.3: man/sd-daemon.3
+man/SD_INFO.3: man/sd-daemon.3
+man/SD_DEBUG.3: man/sd-daemon.3
 
 EXTRA_DIST += \
        src/libsystemd-daemon/libsystemd-daemon.pc.in \
@@ -1664,22 +1803,10 @@ test_libudev_LDADD = \
        libudev.la
 
 test_udev_SOURCES = \
-       src/test/test-udev.c \
-       $(libudev_core_la_SOURCES) \
-       $(libudev_private_la_SOURCES)
-
-# The test-udev program needs everything compiled with relative path
-# names for /sys, /dev, /run prefixed, pointing to our test/ directory.
-test_udev_CFLAGS = \
-       -DTEST_PREFIX=\"test\" \
-       $(libudev_core_la_CFLAGS) \
-       $(libudev_private_la_CFLAGS)
-
-test_udev_CPPFLAGS =\
-       $(libudev_core_la_CPPFLAGS)
+       src/test/test-udev.c
 
 test_udev_LDADD = \
-       libsystemd-label.la \
+       libudev-core.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS) \
@@ -1871,9 +1998,6 @@ EXTRA_DIST += \
        src/gudev/seed-example-enum.js \
        src/gudev/seed-example.js
 
-CLEANFILES += \
-       $(nodist_libgudev_1_0_la_SOURCES)
-
 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
        $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
 
@@ -1994,7 +2118,6 @@ EXTRA_DIST += \
        src/udev/keymap/keyboard-force-release.sh.in
 
 CLEANFILES += \
-       $(nodist_keymap_SOURCES) \
        src/udev/keymap/keys.txt \
        src/udev/keymap/keys-from-name.gperf \
        src/udev/keymap/keyboard-force-release.sh
@@ -2069,11 +2192,11 @@ dist_udevkeymapforcerel_DATA = \
        keymaps-force-release/samsung-90x3a \
        keymaps-force-release/common-volume-keys
 
-src/udev/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h
+src/udev/keymap/keys.txt: Makefile
        $(AM_V_at)mkdir -p src/udev/keymap
-       $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
+       $(AM_V_GEN)cpp $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
 
-src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt
+src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
 
 src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
@@ -2332,6 +2455,11 @@ noinst_PROGRAMS += \
        test-journal-match \
        test-journal-stream
 
+TESTS += \
+       test-journal \
+       test-journal-match \
+       test-journal-stream
+
 pkginclude_HEADERS += \
        src/systemd/sd-journal.h \
        src/systemd/sd-messages.h
@@ -2513,7 +2641,8 @@ systemd_readahead_LDADD = \
        libsystemd-daemon.la \
        libudev.la
 
-pkginclude_HEADERS += \
+dist_doc_DATA += \
+       src/readahead/sd-readahead.c \
        src/systemd/sd-readahead.h
 
 rootlibexec_PROGRAMS += \
@@ -3114,6 +3243,7 @@ MANPAGES_ALIAS += \
        man/sd_login_monitor_unref.3 \
        man/sd_login_monitor_flush.3 \
        man/sd_login_monitor_get_fd.3 \
+       man/sd_login_monitor.3 \
        man/sd_session_get_uid.3 \
        man/sd_session_get_seat.3 \
        man/sd_session_get_service.3 \
@@ -3135,6 +3265,7 @@ man/systemd-logind.8: man/systemd-logind.service.8
 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
+man/sd_login_monitor.3: man/sd_login_monitor_new.3
 man/sd_session_get_uid.3: man/sd_session_is_active.3
 man/sd_session_get_seat.3: man/sd_session_is_active.3
 man/sd_session_get_service.3: man/sd_session_is_active.3
@@ -3191,7 +3322,7 @@ SED_PROCESS = \
                -e 's,@rootprefix\@,$(rootprefix),g' \
                -e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \
                -e 's,@sushell\@,$(sushell),g' \
-               < $< > $@ || rm $@
+               < $< > $@
 
 units/%: units/%.in Makefile
        $(SED_PROCESS)
@@ -3224,15 +3355,15 @@ src/%.c: src/%.gperf
 
 src/%: src/%.m4
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(M4) -P $(M4_DEFINES) < $< > $@ || rm $@
+       $(M4) -P $(M4_DEFINES) < $< > $@
 
 M4_PROCESS_SYSTEM = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@ || rm $@
+       $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
 
 M4_PROCESS_USER = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@ || rm $@
+       $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
 
 units/%: units/%.m4 Makefile
        $(M4_PROCESS_SYSTEM)
@@ -3260,7 +3391,10 @@ if HAVE_XSLTPROC
 XSLTPROC_FLAGS = \
        --nonet \
        --stringparam man.output.quietly 1 \
-       --stringparam funcsynopsis.style ansi
+       --stringparam funcsynopsis.style ansi \
+       --stringparam man.th.extra1.suppress 1 \
+       --stringparam man.authors.section.enabled 0 \
+       --stringparam man.copyright.section.enabled 0
 
 XSLTPROC_PROCESS_MAN = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -3285,7 +3419,7 @@ man/%.7: man/%.xml
 man/%.8: man/%.xml
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.html: man/%.xml
+man/%.html: man/%.xml man/custom-html.xsl
        $(XSLTPROC_PROCESS_HTML)
 
 CLEANFILES += \