chiark / gitweb /
build-sys: move acl searching code into libsystemd-acl
[elogind.git] / Makefile.am
index bea545259dc7f6716a0cc0dbf7fef34bdf99606f..93583a686a47d908316dc44621c8aeef62134e8a 100644 (file)
@@ -31,9 +31,9 @@ SUBDIRS = . po
 # keep intermediate files
 .SECONDARY:
 
-LIBUDEV_CURRENT=3
-LIBUDEV_REVISION=2
-LIBUDEV_AGE=2
+LIBUDEV_CURRENT=4
+LIBUDEV_REVISION=0
+LIBUDEV_AGE=3
 
 LIBGUDEV_CURRENT=1
 LIBGUDEV_REVISION=3
@@ -177,7 +177,7 @@ define move-to-rootlibdir
                $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
                so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
                so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
-               ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+               $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
                mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
        fi
 endef
@@ -330,6 +330,9 @@ dist_tmpfiles_DATA = \
        tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf
 
+dist_sysctl_DATA = \
+       sysctl.d/50-default.conf
+
 if HAVE_SYSV_COMPAT
 dist_tmpfiles_DATA += \
        tmpfiles.d/legacy.conf
@@ -347,6 +350,9 @@ dist_systemunit_DATA = \
        units/kexec.target \
        units/local-fs.target \
        units/local-fs-pre.target \
+       units/initrd.target \
+       units/initrd-fs.target \
+       units/initrd-root-fs.target \
        units/remote-fs.target \
        units/remote-fs-pre.target \
        units/network.target \
@@ -469,8 +475,7 @@ EXTRA_DIST += \
        units/initrd-cleanup.service.in \
        units/initrd-udevadm-cleanup-db.service.in \
        units/initrd-switch-root.service.in \
-       introspect.awk \
-       man/custom-html.xsl
+       introspect.awk
 
 CLEANFILES += \
        units/console-shell.service.m4 \
@@ -615,6 +620,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/set.h \
        src/shared/fdset.c \
        src/shared/fdset.h \
+       src/shared/prioq.c \
+       src/shared/prioq.h \
        src/shared/strv.c \
        src/shared/strv.h \
        src/shared/env-util.c \
@@ -652,8 +659,6 @@ libsystemd_shared_la_SOURCES = \
        src/shared/watchdog.h \
        src/shared/spawn-ask-password-agent.c \
        src/shared/spawn-ask-password-agent.h \
-       src/shared/specifier.c \
-       src/shared/specifier.h \
        src/shared/replace-var.c \
        src/shared/replace-var.h \
        src/shared/spawn-polkit-agent.c \
@@ -697,7 +702,9 @@ libsystemd_units_la_SOURCES = \
        src/shared/install-printf.c \
        src/shared/install-printf.h \
        src/shared/path-lookup.c \
-       src/shared/path-lookup.h
+       src/shared/path-lookup.h \
+       src/shared/specifier.c \
+       src/shared/specifier.h
 
 libsystemd_units_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -786,7 +793,8 @@ libsystemd_acl_la_CFLAGS = \
        $(ACL_CFLAGS)
 
 libsystemd_acl_la_LIBADD = \
-       $(ACL_LIBS)
+       $(ACL_LIBS) \
+       libsystemd-shared.la
 endif
 
 # ------------------------------------------------------------------------------
@@ -1070,7 +1078,8 @@ noinst_tests += \
        test-sched-prio \
        test-calendarspec \
        test-strip-tab-ansi \
-       test-cgroup-util
+       test-cgroup-util \
+       test-prioq
 
 EXTRA_DIST += \
        test/sched_idle_bad.service \
@@ -1161,6 +1170,15 @@ test_util_CFLAGS = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_prioq_SOURCES = \
+       src/test/test-prioq.c
+
+test_prioq_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_prioq_LDADD = \
+       libsystemd-core.la
+
 test_log_SOURCES = \
        src/test/test-log.c
 
@@ -1235,6 +1253,7 @@ test_strv_SOURCES = \
 
 test_strv_LDADD = \
        libsystemd-shared.la \
+       libsystemd-units.la \
        libsystemd-id128-internal.la
 
 test_strxcpyx_SOURCES = \
@@ -1346,12 +1365,10 @@ rootlibexec_PROGRAMS += \
 
 nodist_systemunit_DATA += \
        units/systemd-modules-load.service
+
 SYSINIT_TARGET_WANTS += \
        systemd-modules-load.service
 
-dist_udevrules_DATA += \
-       rules/80-drivers.rules
-
 endif
 
 EXTRA_DIST += \
@@ -1596,7 +1613,7 @@ libsystemd_daemon_la_SOURCES = \
        src/libsystemd-daemon/sd-daemon.c
 
 libsystemd_daemon_internal_la_SOURCES = \
-        $(libsystemd_daemon_la_SOURCES)
+       $(libsystemd_daemon_la_SOURCES)
 
 libsystemd_daemon_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -1625,7 +1642,7 @@ lib_LTLIBRARIES += \
        libsystemd-daemon.la
 
 noinst_LTLIBRARIES += \
-        libsystemd-daemon-internal.la
+       libsystemd-daemon-internal.la
 
 pkgconfiglib_DATA += \
        src/libsystemd-daemon/libsystemd-daemon.pc
@@ -1634,6 +1651,78 @@ EXTRA_DIST += \
        src/libsystemd-daemon/libsystemd-daemon.pc.in \
        src/libsystemd-daemon/libsystemd-daemon.sym
 
+# ------------------------------------------------------------------------------
+libsystemd_bus_la_SOURCES = \
+       src/libsystemd-bus/sd-bus.c \
+       src/libsystemd-bus/sd-bus.h \
+       src/libsystemd-bus/sd-bus-protocol.h \
+       src/libsystemd-bus/bus-control.c \
+       src/libsystemd-bus/bus-error.c \
+       src/libsystemd-bus/bus-error.h \
+       src/libsystemd-bus/bus-internal.c \
+       src/libsystemd-bus/bus-internal.h \
+       src/libsystemd-bus/bus-message.c \
+       src/libsystemd-bus/bus-message.h \
+       src/libsystemd-bus/bus-signature.c \
+       src/libsystemd-bus/bus-signature.h \
+       src/libsystemd-bus/bus-type.c \
+       src/libsystemd-bus/bus-type.h
+
+libsystemd_bus_la_LIBADD =  \
+       libsystemd-id128-internal.la \
+       libsystemd-shared.la
+
+noinst_LTLIBRARIES += \
+       libsystemd-bus.la
+
+noinst_tests += \
+       test-bus-marshal \
+       test-bus-signature \
+       test-bus-chat
+
+noinst_PROGRAMS += \
+       busctl
+
+test_bus_marshal_SOURCES = \
+       src/libsystemd-bus/test-bus-marshal.c
+
+test_bus_marshal_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       $(GLIB_LIBS) \
+       $(DBUS_LIBS)
+
+test_bus_marshal_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+test_bus_signature_SOURCES = \
+       src/libsystemd-bus/test-bus-signature.c
+
+test_bus_signature_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la
+
+test_bus_chat_SOURCES = \
+       src/libsystemd-bus/test-bus-chat.c
+
+test_bus_chat_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+test_bus_chat_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
+busctl_SOURCES = \
+       src/libsystemd-bus/busctl.c
+
+busctl_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la
+
 # ------------------------------------------------------------------------------
 if ENABLE_GTK_DOC
 SUBDIRS += \
@@ -1785,7 +1874,7 @@ SYSINIT_TARGET_WANTS += \
        systemd-udevd.service \
        systemd-udev-trigger.service
 
-bin_PROGRAMS += \
+rootbin_PROGRAMS += \
        udevadm
 
 rootlibexec_PROGRAMS += \
@@ -1803,7 +1892,6 @@ libudev_core_la_SOURCES = \
        src/udev/udev-ctrl.c \
        src/udev/udev-builtin.c \
        src/udev/udev-builtin-btrfs.c \
-       src/udev/udev-builtin-firmware.c \
        src/udev/udev-builtin-hwdb.c \
        src/udev/udev-builtin-input_id.c \
        src/udev/udev-builtin-net_id.c \
@@ -1827,9 +1915,20 @@ libudev_core_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
 
+if ENABLE_FIRMWARE
+libudev_core_la_SOURCES += \
+       src/udev/udev-builtin-firmware.c
+
+dist_udevrules_DATA += \
+       rules/50-firmware.rules
+endif
+
 if HAVE_KMOD
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-kmod.c
+
+dist_udevrules_DATA += \
+       rules/80-drivers.rules
 endif
 
 if HAVE_BLKID
@@ -1871,7 +1970,7 @@ udevadm_LDADD = \
 # Update hwdb on installation. Do not bother if installing
 # in DESTDIR, since this is likely for packaging purposes.
 hwdb-update-hook:
-       -test -n "$(DESTDIR)" || $(bindir)/udevadm hwdb --update
+       -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
 
 INSTALL_DATA_HOOKS += \
        hwdb-update-hook
@@ -2405,6 +2504,11 @@ journalctl_LDADD = \
        libsystemd-id128-internal.la \
        libsystemd-logs.la
 
+if HAVE_ACL
+journalctl_LDADD += \
+       libsystemd-acl.la
+endif
+
 if HAVE_QRENCODE
 journalctl_SOURCES += \
        src/journal/journal-qrcode.c \
@@ -2773,14 +2877,14 @@ dist_bashcompletion_DATA += \
        shell-completion/bash/systemd-coredumpctl
 
 sysctl_DATA = \
-       sysctl.d/coredump.conf
+       sysctl.d/50-coredump.conf
 
 CLEANFILES += \
-       sysctl.d/coredump.conf
+       sysctl.d/50-coredump.conf
 endif
 
 EXTRA_DIST += \
-       sysctl.d/coredump.conf.in
+       sysctl.d/50-coredump.conf.in
 
 # ------------------------------------------------------------------------------
 if ENABLE_BINFMT
@@ -2877,8 +2981,10 @@ if ENABLE_BOOTCHART
 systemd_bootchart_SOURCES = \
        src/bootchart/bootchart.c \
        src/bootchart/bootchart.h \
-       src/bootchart/log.c \
-       src/bootchart/svg.c
+       src/bootchart/store.c \
+       src/bootchart/store.h \
+       src/bootchart/svg.c \
+       src/bootchart/svg.h
 
 systemd_bootchart_LDADD = \
        libsystemd-shared.la
@@ -3352,7 +3458,8 @@ libsystemd_login_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
 
 libsystemd_login_la_LIBADD = \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-daemon-internal.la
 
 libsystemd_login_internal_la_SOURCES = \
        $(libsystemd_login_la_SOURCES)
@@ -3475,6 +3582,7 @@ if HAVE_PYTHON_DEVEL
 pkgpyexec_LTLIBRARIES = \
        _journal.la \
        id128.la \
+       _daemon.la \
        _reader.la
 
 _journal_la_SOURCES = \
@@ -3482,7 +3590,7 @@ _journal_la_SOURCES = \
 
 _journal_la_CFLAGS = \
        $(AM_CFLAGS) \
-        -fvisibility=default \
+       -fvisibility=default \
        $(PYTHON_CFLAGS)
 
 _journal_la_LDFLAGS = \
@@ -3503,7 +3611,7 @@ id128_la_SOURCES = \
 
 id128_la_CFLAGS = \
        $(AM_CFLAGS) \
-        -fvisibility=default \
+       -fvisibility=default \
        $(PYTHON_CFLAGS) \
        -I$(top_builddir)/src/python-systemd
 
@@ -3517,6 +3625,27 @@ id128_la_LIBADD = \
        $(PYTHON_LIBS) \
        libsystemd-id128.la
 
+_daemon_la_SOURCES = \
+       src/python-systemd/_daemon.c \
+       src/python-systemd/pyutil.c \
+       src/python-systemd/pyutil.h
+
+_daemon_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -fvisibility=default \
+       $(PYTHON_CFLAGS) \
+       -I$(top_builddir)/src/python-systemd
+
+_daemon_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -shared \
+       -module \
+       -avoid-version
+
+_daemon_la_LIBADD = \
+       $(PYTHON_LIBS) \
+       libsystemd-daemon.la
+
 _reader_la_SOURCES = \
        src/python-systemd/_reader.c \
        src/python-systemd/pyutil.c \
@@ -3524,7 +3653,7 @@ _reader_la_SOURCES = \
 
 _reader_la_CFLAGS = \
        $(AM_CFLAGS) \
-        -fvisibility=default \
+       -fvisibility=default \
        $(PYTHON_CFLAGS)
 
 _reader_la_LDFLAGS = \
@@ -3541,6 +3670,7 @@ _reader_la_LIBADD = \
 
 dist_pkgpyexec_PYTHON = \
        src/python-systemd/journal.py \
+       src/python-systemd/daemon.py \
        src/python-systemd/__init__.py
 
 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
@@ -3551,7 +3681,7 @@ BUILT_SOURCES += \
        src/python-systemd/id128-constants.h
 
 PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
-SPHINXOPTS = -D latex_paper_size=$(PAPER)
+SPHINXOPTS = -D latex_paper_size=$(PAPER) -D version=$(VERSION) -D release=$(VERSION)
 sphinx-%:
        $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
        $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
@@ -3560,7 +3690,7 @@ sphinx-%:
 destdir-sphinx: all
        dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
                $(MAKE) DESTDIR="$$dir" install && \
-               $(MAKE) DESTDIR="$$dir" sphinx-html && \
+               $(MAKE) DESTDIR="$$dir" sphinx-html && \
                rm -rf "$$dir"
 
 endif
@@ -3678,42 +3808,46 @@ XSLTPROC_FLAGS = \
        --nonet \
        --stringparam man.output.quietly 1 \
        --stringparam funcsynopsis.style ansi \
-       --stringparam man.th.extra1.suppress 1 \
        --stringparam man.authors.section.enabled 0 \
-       --stringparam man.copyright.section.enabled 0
+       --stringparam man.copyright.section.enabled 0 \
+       --stringparam systemd.version $(VERSION)
 
 XSLTPROC_PROCESS_MAN = \
        $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
-       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
 
 XSLTPROC_PROCESS_HTML = \
        $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
        $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
 
-man/%.1: man/%.xml
+man/%.1: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.3: man/%.xml
+man/%.3: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.5: man/%.xml
+man/%.5: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.7: man/%.xml
+man/%.7: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.8: man/%.xml
+man/%.8: man/%.xml man/custom-man.xsl
        $(XSLTPROC_PROCESS_MAN)
 
 man/%.html: man/%.xml man/custom-html.xsl
        $(XSLTPROC_PROCESS_HTML)
 
 define html-alias
-       $(AM_V_LN)$(LN_S) $(notdir $<) $@
+       $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
 endef
 
 endif
 
+EXTRA_DIST += \
+       man/custom-html.xsl \
+       man/custom-man.xsl
+
 # ------------------------------------------------------------------------------
 DBUS_PREPROCESS = $(CPP) -P $(CFLAGS) $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
 
@@ -3851,7 +3985,7 @@ distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
 clean-local: $(CLEAN_LOCAL_HOOKS)
        rm -rf $(abs_srcdir)/install-tree
        rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
-              $(abs_srcdir)/hwdb/iab.txt
+             $(abs_srcdir)/hwdb/iab.txt
 
 DISTCHECK_CONFIGURE_FLAGS = \
        --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
@@ -3882,7 +4016,7 @@ hwdb-update:
        ( cd $(top_srcdir)/hwdb && \
        wget -N http://www.linux-usb.org/usb.ids \
                http://pci-ids.ucw.cz/v2.2/pci.ids \
-               http://standards.ieee.org/develop/regauth/oui/oui.txt \
+               http://standards.ieee.org/develop/regauth/oui/oui.txt \
                http://standards.ieee.org/develop/regauth/iab/iab.txt && \
        ./ids-update.pl )
 
@@ -3898,7 +4032,7 @@ doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/gudev/html --online
        rsync -av --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
        rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
-       rsync -av --delete --omit-dir-times docs/python-systemd/ $(www_target)/python-systemd/
+       rsync -av --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
 
 git-tag:
        git tag "v$(VERSION)" -m "systemd $(VERSION)"