chiark / gitweb /
core: check the right variable for failed open()
[elogind.git] / Makefile.am
index f261c47..669eb33 100644 (file)
@@ -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 $@)
@@ -2143,6 +2146,9 @@ libsystemd_resolve_la_CFLAGS = \
        $(AM_CFLAGS) \
        -pthread
 
+libsystemd_resolve_la_LIBADD = \
+       -lresolv
+
 noinst_LTLIBRARIES += \
        libsystemd-internal.la \
        libsystemd-resolve.la
@@ -2182,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 = \
@@ -2191,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)
@@ -2434,14 +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-internal.la \
        libsystemd-resolve.la \
-       libsystemd-shared.la \
-       -lresolv
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 test_resolve_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2514,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
@@ -3940,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
@@ -4002,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 += \
@@ -4020,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 \
@@ -4170,12 +4212,11 @@ systemd_networkd_wait_online_SOURCES = \
        src/network/networkd-wait-online.c \
        src/network/networkd-wait-online.h
 
-nodist_systemd_networkd_wait_online_SOURCES = \
-       src/network/networkd-wait-online-gperf.c
-
 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,19 +4227,15 @@ test_network_LDADD = \
 tests += \
        test-network
 
-dist_pkgsysconf_DATA += \
-       src/network/networkd-wait-online.conf
-
 EXTRA_DIST += \
        src/network/networkd-network-gperf.gperf \
        src/network/networkd-netdev-gperf.gperf \
-       src/network/networkd-wait-online-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 \
-       src/network/networkd-netdev-gperf.c \
-       src/network/networkd-wait-online-gperf.c
+       src/network/networkd-netdev-gperf.c
 endif
 
 # ------------------------------------------------------------------------------
@@ -4751,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 $@) && \
@@ -4779,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 $@
@@ -5150,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: \