chiark / gitweb /
core: check the right variable for failed open()
[elogind.git] / Makefile.am
index 27c7685..669eb33 100644 (file)
@@ -59,9 +59,9 @@ LIBSYSTEMD_JOURNAL_CURRENT=11
 LIBSYSTEMD_JOURNAL_REVISION=5
 LIBSYSTEMD_JOURNAL_AGE=11
 
-LIBSYSTEMD_CURRENT=0
-LIBSYSTEMD_REVISION=2
-LIBSYSTEMD_AGE=0
+LIBSYSTEMD_CURRENT=1
+LIBSYSTEMD_REVISION=0
+LIBSYSTEMD_AGE=1
 
 # Dirs of external packages
 dbuspolicydir=@dbuspolicydir@
@@ -101,6 +101,7 @@ udevrulesdir=$(udevlibexecdir)/rules.d
 udevhwdbdir=$(udevlibexecdir)/hwdb.d
 catalogdir=$(prefix)/lib/systemd/catalog
 kernelinstalldir = $(prefix)/lib/kernel/install.d
+ntpunitsdir=$(prefix)/lib/systemd/ntp-units.d
 
 # And these are the special ones for /
 rootprefix=@rootprefix@
@@ -128,6 +129,7 @@ polkitpolicy_in_files =
 polkitpolicy_files =
 dist_udevrules_DATA =
 nodist_udevrules_DATA =
+nodist_pkgsysconf_DATA =
 dist_pkgsysconf_DATA =
 dist_pkgdata_DATA =
 dist_dbuspolicy_DATA =
@@ -187,6 +189,7 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/login \
        -I $(top_srcdir)/src/journal \
        -I $(top_srcdir)/src/timedate \
+       -I $(top_srcdir)/src/timesync \
        -I $(top_srcdir)/src/systemd \
        -I $(top_builddir)/src/core \
        -I $(top_srcdir)/src/core \
@@ -797,7 +800,9 @@ libsystemd_shared_la_SOURCES = \
        src/shared/clean-ipc.h \
        src/shared/clean-ipc.c \
        src/shared/login-shared.c \
-       src/shared/login-shared.h
+       src/shared/login-shared.h \
+       src/shared/async.c \
+       src/shared/async.h
 
 nodist_libsystemd_shared_la_SOURCES = \
        src/shared/errno-from-name.h \
@@ -1027,8 +1032,6 @@ libsystemd_core_la_SOURCES = \
        src/core/killall.c \
        src/core/audit-fd.c \
        src/core/audit-fd.h \
-       src/core/async.c \
-       src/core/async.h \
        src/core/show-status.c \
        src/core/show-status.h
 
@@ -1095,7 +1098,7 @@ BUILT_SOURCES += \
 
 src/shared/errno-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }'  > $@
 
 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
        $(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1107,7 +1110,7 @@ src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
 
 src/shared/errno-to-name.h: src/shared/errno-list.txt
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
 
 src/shared/af-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1172,11 +1175,16 @@ manual_tests += \
        test-hostname \
        test-daemon \
        test-cgroup \
+       test-cgroup-mask \
        test-install \
        test-watchdog \
        test-log \
-       test-ipcrm \
+       test-ipcrm
+
+if HAVE_KMOD
+manual_tests += \
        test-rtnl-manual
+endif
 
 tests += \
        test-job-type \
@@ -1199,7 +1207,6 @@ tests += \
        test-calendarspec \
        test-strip-tab-ansi \
        test-cgroup-util \
-       test-cgroup-mask \
        test-prioq \
        test-fileio \
        test-time \
@@ -1402,10 +1409,14 @@ test_ipcrm_LDADD = \
 test_rtnl_manual_SOURCES = \
        src/test/test-rtnl-manual.c
 
+test_rtnl_manual_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(KMOD_CFLAGS)
+
 test_rtnl_manual_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la \
-       -lkmod
+       $(KMOD_LIBS)
 
 test_ellipsize_SOURCES = \
        src/test/test-ellipsize.c
@@ -1961,6 +1972,7 @@ systemd_cgls_SOURCES = \
        src/cgls/cgls.c
 
 systemd_cgls_LDADD = \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -2107,10 +2119,10 @@ libsystemd_internal_la_SOURCES = \
        src/libsystemd/sd-rtnl/sd-rtnl.c \
        src/libsystemd/sd-rtnl/rtnl-internal.h \
        src/libsystemd/sd-rtnl/rtnl-message.c \
+       src/libsystemd/sd-rtnl/rtnl-types.h \
+       src/libsystemd/sd-rtnl/rtnl-types.c \
        src/libsystemd/sd-rtnl/rtnl-util.h \
        src/libsystemd/sd-rtnl/rtnl-util.c \
-       src/libsystemd/sd-resolve/sd-resolve.c \
-       src/libsystemd/sd-resolve/resolve-util.h \
        src/libsystemd/sd-id128/sd-id128.c \
        src/libsystemd/sd-daemon/sd-daemon.c \
        src/libsystemd/sd-login/sd-login.c
@@ -2126,8 +2138,20 @@ libsystemd_internal_la_CFLAGS = \
 libsystemd_internal_la_LIBADD = \
        $(RT_LIBS)
 
+libsystemd_resolve_la_SOURCES = \
+       src/libsystemd/sd-resolve/sd-resolve.c \
+       src/libsystemd/sd-resolve/resolve-util.h
+
+libsystemd_resolve_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+libsystemd_resolve_la_LIBADD = \
+       -lresolv
+
 noinst_LTLIBRARIES += \
-       libsystemd-internal.la
+       libsystemd-internal.la \
+       libsystemd-resolve.la
 
 libsystemd_dump_la_SOURCES = \
        src/libsystemd/sd-bus/bus-dump.c \
@@ -2156,6 +2180,7 @@ BUILT_SOURCES += \
 
 libsystemd_la_SOURCES = \
        $(libsystemd_internal_la_SOURCES) \
+       $(libsystemd_resolve_la_SOURCES) \
        $(libsystemd_journal_internal_la_SOURCES)
 
 nodist_libsystemd_la_SOURCES = \
@@ -2163,6 +2188,7 @@ nodist_libsystemd_la_SOURCES = \
 
 libsystemd_la_CFLAGS = \
        $(libsystemd_internal_la_CFLAGS) \
+       $(libsystemd_resolve_la_CFLAGS) \
        $(libsystemd_journal_internal_la_CFLAGS)
 
 libsystemd_la_LDFLAGS = \
@@ -2172,9 +2198,9 @@ libsystemd_la_LDFLAGS = \
 
 libsystemd_la_LIBADD = \
        libsystemd-shared.la \
+       $(libsystemd_internal_la_LIBADD) \
        $(libsystemd_journal_internal_la_LIBADD) \
-       $(RT_LIBS) \
-       -lresolv
+       $(libsystemd_resolve_la_LIBADD)
 
 libsystemd-install-hook:
        libname=libsystemd.so && $(move-to-rootlibdir)
@@ -2415,13 +2441,12 @@ test_rtnl_LDADD = \
        libsystemd-shared.la
 
 test_resolve_SOURCES = \
-       src/systemd/sd-resolve.h \
        src/libsystemd/sd-resolve/test-resolve.c
 
 test_resolve_LDADD = \
+       libsystemd-resolve.la \
        libsystemd-internal.la \
-       libsystemd-shared.la \
-       -lresolv
+       libsystemd-shared.la
 
 test_resolve_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2494,9 +2519,21 @@ test_dhcp_client_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
+test_ipv4ll_SOURCES = \
+        src/systemd/sd-ipv4ll.h \
+        src/libsystemd-network/ipv4ll-internal.h \
+        src/libsystemd-network/test-ipv4ll.c
+
+test_ipv4ll_LDADD = \
+        libsystemd-network.la \
+        libsystemd-label.la \
+        libsystemd-internal.la \
+        libsystemd-shared.la
+
 tests += \
        test-dhcp-option \
-       test-dhcp-client
+       test-dhcp-client \
+       test-ipv4ll
 
 # ------------------------------------------------------------------------------
 if ENABLE_GTK_DOC
@@ -2575,8 +2612,7 @@ noinst_LTLIBRARIES += \
 
 libudev_internal_la_SOURCES =\
        $(libudev_la_SOURCES) \
-       src/libudev/libudev-device-private.c \
-       src/libudev/libudev-queue-private.c
+       src/libudev/libudev-device-private.c
 
 libudev_internal_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -3519,8 +3555,8 @@ systemd_coredump_SOURCES = \
 systemd_coredump_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-label.la \
-       libsystemd-shared.la \
-       libsystemd-internal.la
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 rootlibexec_PROGRAMS += \
        systemd-coredump
@@ -3843,41 +3879,13 @@ EXTRA_DIST += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_KDBUS
-systemd_bus_driverd_SOURCES = \
-       src/bus-driverd/bus-driverd.c
-
-systemd_bus_driverd_LDADD = \
-       libsystemd-internal.la \
-       libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
-       systemd-bus-driverd
-
-nodist_systemunit_DATA += \
-       units/systemd-bus-driverd.service
-
 dist_systemunit_DATA += \
-       units/org.freedesktop.DBus.busname      \
        units/org.freedesktop.systemd1.busname
 
 BUSNAMES_TARGET_WANTS += \
-       org.freedesktop.DBus.busname    \
        org.freedesktop.systemd1.busname
-
-nodist_userunit_DATA += \
-       units/user/systemd-bus-driverd.service
-
-USER_BUSNAMES_TARGET_WANTS += \
-       org.freedesktop.DBus.busname
-
-USER_UNIT_ALIASES += \
-       $(systemunitdir)/org.freedesktop.DBus.busname org.freedesktop.DBus.busname
 endif
 
-EXTRA_DIST += \
-       units/systemd-bus-driverd.service.in \
-       units/user/systemd-bus-driverd.service.in
-
 # ------------------------------------------------------------------------------
 if ENABLE_LOCALED
 systemd_localed_SOURCES = \
@@ -3949,24 +3957,13 @@ EXTRA_DIST += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_TIMEDATED
-libsystemd_timedated_core_la_SOURCES = \
-       src/timedate/timedate-sntp.c \
-       src/timedate/timedate-sntp.h
-
-libsystemd_timedated_core_la_LIBADD = \
-       libsystemd-label.la \
-       libsystemd-internal.la \
-       libsystemd-shared.la \
-       -lm
-
-noinst_LTLIBRARIES += \
-       libsystemd-timedated-core.la
-
 systemd_timedated_SOURCES = \
        src/timedate/timedated.c
 
 systemd_timedated_LDADD = \
-       libsystemd-timedated-core.la
+       libsystemd-label.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 rootlibexec_PROGRAMS += \
        systemd-timedated
@@ -4011,15 +4008,6 @@ dist_bashcompletion_DATA += \
 
 dist_zshcompletion_DATA += \
        shell-completion/zsh/_timedatectl
-
-test_timedate_sntp_SOURCES = \
-       src/timedate/test-timedate-sntp.c
-
-test_timedate_sntp_LDADD = \
-       libsystemd-timedated-core.la
-
-manual_tests += \
-       test-timedate-sntp
 endif
 
 polkitpolicy_in_files += \
@@ -4029,6 +4017,51 @@ EXTRA_DIST += \
        units/systemd-timedated.service.in
 
 # ------------------------------------------------------------------------------
+if ENABLE_TIMESYNCD
+systemd_timesyncd_SOURCES = \
+       src/timesync/timesyncd.c \
+       src/timesync/timesyncd.h
+
+nodist_systemd_timesyncd_SOURCES = \
+       src/timesync/timesyncd-gperf.c
+
+EXTRA_DIST += \
+       src/timesync/timesyncd-gperf.gperf
+
+CLEANFILES += \
+       src/timesync/timesyncd-gperf.c
+
+systemd_timesyncd_LDADD = \
+       libsystemd-label.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       libsystemd-resolve.la \
+       -lm
+
+rootlibexec_PROGRAMS += \
+       systemd-timesyncd
+
+nodist_systemunit_DATA += \
+       units/systemd-timesyncd.service
+
+EXTRA_DIST += \
+       units/systemd-timesyncd.service.in
+
+nodist_pkgsysconf_DATA += \
+       src/timesync/timesyncd.conf
+
+EXTRA_DIST += \
+       src/timesync/timesyncd.conf.in
+
+CLEANFILES += \
+       src/timesync/timesyncd.conf
+
+dist_ntpunits_DATA = \
+       src/timesync/90-systemd.list
+
+endif
+
+# ------------------------------------------------------------------------------
 if HAVE_MYHOSTNAME
 libnss_myhostname_la_SOURCES = \
        src/nss-myhostname/nss-myhostname.c \
@@ -4043,6 +4076,10 @@ libnss_myhostname_la_LDFLAGS = \
        -shared \
        -shrext .so.2
 
+libnss_myhostname_la_LIBADD = \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
 lib_LTLIBRARIES += \
        libnss_myhostname.la
 endif
@@ -4139,6 +4176,7 @@ noinst_LTLIBRARIES += \
        libsystemd-networkd-core.la
 
 libsystemd_networkd_core_la_SOURCES = \
+       src/libsystemd-network/network-internal.h \
        src/network/networkd.h \
        src/network/networkd-link.c \
        src/network/networkd-netdev.c \
@@ -4159,20 +4197,26 @@ libsystemd_networkd_core_la_LIBADD = \
        libsystemd-shared.la
 
 nodist_systemunit_DATA += \
-       units/systemd-networkd.service
+       units/systemd-networkd.service \
+       units/systemd-networkd-wait-online.service
 
 GENERAL_ALIASES += \
-       $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service
+       $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
+       $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
 
 rootlibexec_PROGRAMS += \
        systemd-networkd-wait-online
 
 systemd_networkd_wait_online_SOURCES = \
-       src/network/networkd-wait-online.c
+       src/libsystemd-network/network-internal.h \
+       src/network/networkd-wait-online.c \
+       src/network/networkd-wait-online.h
 
 systemd_networkd_wait_online_LDADD = \
+       libsystemd-network.la \
+       libudev-internal.la \
        libsystemd-internal.la \
-       libsystemd-network.la
+       libsystemd-shared.la
 
 test_network_SOURCES = \
        src/network/test-network.c
@@ -4186,7 +4230,8 @@ tests += \
 EXTRA_DIST += \
        src/network/networkd-network-gperf.gperf \
        src/network/networkd-netdev-gperf.gperf \
-       units/systemd-networkd.service.in
+       units/systemd-networkd.service.in \
+       units/systemd-networkd-wait-online.service.in
 
 CLEANFILES += \
        src/network/networkd-network-gperf.c \
@@ -4743,7 +4788,8 @@ substitutions = \
        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
        '|PYTHON=$(PYTHON)|' \
-       '|PYTHON_BINARY=$(PYTHON_BINARY)|'
+       '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
+       '|NTP_SERVERS=$(NTP_SERVERS)|'
 
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -4771,6 +4817,9 @@ src/%.policy.in: src/%.policy.in.in
 %.rules: %.rules.in
        $(SED_PROCESS)
 
+%.conf: %.conf.in
+       $(SED_PROCESS)
+
 %.sh: %.sh.in
        $(SED_PROCESS)
        $(AM_V_GEN)chmod +x $@
@@ -5024,6 +5073,11 @@ DISTCHECK_CONFIGURE_FLAGS += \
        --enable-gtk-doc
 endif
 
+# check "broken" platforms limited toolchains for link breakage before we release
+.PHONY: linkcheck
+linkcheck:
+       $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
+
 .PHONY: hwdb-update
 hwdb-update:
        ( cd $(top_srcdir)/hwdb && \
@@ -5035,16 +5089,18 @@ hwdb-update:
 
 .PHONY: kdbus-update
 kdbus-update:
-       ( cd $(top_srcdir)/src/libsystemd/ && \
+       ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
        wget -N https://d-bus.googlecode.com/git/kdbus.h )
 
+.PHONY: git-tag
+git-tag:
+       git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
+
+www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
 .PHONY: upload
 upload: all check dist
-       cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
-       scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
-       scp man/*.html tango:public/systemd-man/
+       scp systemd-$(VERSION).tar.xz $(www_target)
 
-www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
 .PHONY: doc-sync
 doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/libudev/html --online
@@ -5054,9 +5110,10 @@ doc-sync: all destdir-sphinx
        rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
        rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
 
-.PHONY: git-tag
-git-tag:
-       git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
+.PHONY: tango
+tango: upload
+       cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
+       scp man/*.html tango:public/systemd-man/
 
 .PHONY: install-tree
 install-tree: all
@@ -5134,7 +5191,8 @@ test-libsystemd-sym.c: \
                src/systemd/sd-daemon.h \
                src/systemd/sd-login.h \
                src/systemd/sd-bus.h \
-               src/systemd/sd-utf8.h
+               src/systemd/sd-utf8.h \
+               src/systemd/sd-resolve.h
        $(generate-sym-test)
 
 test-libudev-sym.c: \
@@ -5149,6 +5207,9 @@ test_libsystemd_sym_LDADD = \
 
 test_libudev_sym_SOURCES = \
        test-libudev-sym.c
+test_libudev_sym_CFLAGS = \
+       $(AM_CFLAGS) \
+       -Wno-deprecated-declarations
 test_libudev_sym_LDADD = \
        libudev.la