summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore11
-rw-r--r--Makefile.am818
-rw-r--r--build-aux/Makefile.each.head/.gitignore0
-rw-r--r--build-aux/Makefile.each.tail/.gitignore0
-rw-r--r--build-aux/Makefile.once.head/.gitignore0
-rw-r--r--build-aux/Makefile.once.tail/.gitignore0
-rwxr-xr-xbuild-aux/write-ifchanged25
-rw-r--r--system-preset/90-journald.preset10
-rw-r--r--system-preset/90-networkd.preset10
-rw-r--r--system-preset/90-resolved.preset11
-rw-r--r--system-preset/90-systemd.preset8
-rw-r--r--system-preset/90-timesyncd.preset8
-rw-r--r--sysusers.d/systemd-coredump.conf8
-rw-r--r--sysusers.d/systemd-journal-gatewayd.conf (renamed from sysusers.d/systemd-remote.conf.m4)6
-rw-r--r--sysusers.d/systemd-journal-remote.conf8
-rw-r--r--sysusers.d/systemd-journal-upload.conf8
-rw-r--r--sysusers.d/systemd-journald.conf8
-rw-r--r--sysusers.d/systemd-networkd.conf8
-rw-r--r--sysusers.d/systemd-resolved.conf8
-rw-r--r--sysusers.d/systemd-timesyncd.conf (renamed from sysusers.d/systemd.conf.m4)12
-rw-r--r--tmpfiles.d/.gitignore2
-rw-r--r--tmpfiles.d/etc.conf.m43
-rw-r--r--tmpfiles.d/systemd-coredump.conf10
-rw-r--r--tmpfiles.d/systemd-journald.conf.m4 (renamed from tmpfiles.d/systemd.conf.m4)18
-rw-r--r--tmpfiles.d/systemd-networkd.conf12
-rw-r--r--tmpfiles.d/systemd-resolved.conf10
-rw-r--r--tmpfiles.d/systemd-tmpfs.conf14
-rw-r--r--tmpfiles.d/systemd.conf20
-rw-r--r--tmpfiles.d/tmp.conf6
-rwxr-xr-xtools/git-setup23
-rwxr-xr-xtools/notsd-find-includes52
-rwxr-xr-xtools/notsd-fixup45
-rwxr-xr-xtools/notsd-fixup--includes240
-rwxr-xr-xtools/notsd-move822
-rwxr-xr-xtools/notsd-reset6
-rw-r--r--tools/test-header.c1
-rwxr-xr-xtools/test-header.sh2
37 files changed, 1934 insertions, 319 deletions
diff --git a/.gitignore b/.gitignore
index f7db68b4a6..e51f9cc2dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,11 +22,12 @@
/GRTAGS
/GSYMS
/GTAGS
-/Makefile
/TAGS
/ata_id
/bootctl
-/build-aux
+/build-aux/*
+!/build-aux/Makefile*
+!/build-aux/write-ifchanged
/busctl
/cdrom_id
/collect
@@ -303,3 +304,9 @@ config.log
config.status
configure
stamp-*
+.tmp*
+/autoconf.mk
+/automake.mk.in
+/automake.mk
+/config.mk
+/gnustandards.mk
diff --git a/Makefile.am b/Makefile.am
index 0c27f81986..b1c28551a4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,4 @@
+#@all
# -*- Mode: makefile; indent-tabs-mode: t -*-
#
# This file is part of systemd.
@@ -6,6 +7,7 @@
# Copyright 2010-2012 Kay Sievers
# Copyright 2013 Zbigniew Jędrzejewski-Szmek
# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
@@ -19,7 +21,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+#@build-aux/Makefile.once.head/20-sd.mk
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
AUTOMAKE_OPTIONS = color-tests parallel-tests
@@ -38,14 +43,17 @@ SUBDIRS = . po
# Keep the test-suite.log
.PRECIOUS: $(TEST_SUITE_LOG) Makefile
+#@src/libudev/Makefile
LIBUDEV_CURRENT=7
LIBUDEV_REVISION=5
LIBUDEV_AGE=6
+#@src/libsystemd/Makefile
LIBSYSTEMD_CURRENT=16
LIBSYSTEMD_REVISION=0
LIBSYSTEMD_AGE=16
+#@config.mk.in
# Dirs of external packages
dbuspolicydir=@dbuspolicydir@
dbussessionservicedir=@dbussessionservicedir@
@@ -97,6 +105,7 @@ rootprefix=@rootprefix@
rootbindir=$(rootprefix)/bin
rootlibexecdir=$(rootprefix)/lib/systemd
+#@discard.mk
EXTRA_DIST =
BUILT_SOURCES =
INSTALL_EXEC_HOOKS =
@@ -142,7 +151,7 @@ endif
else
noinst_PROGRAMS =
TESTS =
-endif
+endif # ENABLE_TESTS
AM_TESTS_ENVIRONMENT = \
export SYSTEMD_KBD_MODEL_MAP=$(abs_top_srcdir)/src/locale/kbd-model-map; \
export SYSTEMD_LANGUAGE_FALLBACK_MAP=$(abs_top_srcdir)/src/locale/language-fallback-map;
@@ -150,11 +159,11 @@ AM_TESTS_ENVIRONMENT = \
if ENABLE_BASH_COMPLETION
dist_bashcompletion_DATA = $(dist_bashcompletion_data)
nodist_bashcompletion_DATA = $(nodist_bashcompletion_data)
-endif
+endif # ENABLE_BASH_COMPLETION
if ENABLE_ZSH_COMPLETION
dist_zshcompletion_DATA = $(dist_zshcompletion_data)
nodist_zshcompletion_DATA = $(nodist_zshcompletion_data)
-endif
+endif # ENABLE_ZSH_COMPLETION
udevlibexec_PROGRAMS =
gperf_gperf_sources =
@@ -346,47 +355,103 @@ INSTALL_EXEC_HOOKS += \
INSTALL_EXEC_HOOKS += \
install-busnames-target-wants-hook
-# ------------------------------------------------------------------------------
+#@build-aux/Makefile.once.head/20-sd.mk ----------------------------------------
+V ?=
+
AM_V_M4 = $(AM_V_M4_$(V))
AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
AM_V_M4_0 = @echo " M4 " $@;
+AM_V_M4_1 =
AM_V_XSLT = $(AM_V_XSLT_$(V))
AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
AM_V_XSLT_0 = @echo " XSLT " $@;
+AM_V_XSLT_1 =
AM_V_GPERF = $(AM_V_GPERF_$(V))
AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
AM_V_GPERF_0 = @echo " GPERF " $@;
+AM_V_GPERF_1 =
AM_V_LN = $(AM_V_LN_$(V))
AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
AM_V_LN_0 = @echo " LN " $@;
+AM_V_LN_1 =
AM_V_RM = $(AM_V_RM_$(V))
AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
AM_V_RM_0 = @echo " RM " $@;
-
-# ------------------------------------------------------------------------------
-rootbin_PROGRAMS = \
- systemctl \
- systemd-notify \
- systemd-ask-password \
- systemd-tty-ask-password-agent \
- systemd-machine-id-setup \
- systemd-escape
-
-bin_PROGRAMS = \
- systemd-cgls \
- systemd-cgtop \
- systemd-nspawn \
- systemd-detect-virt \
- systemd-delta \
- systemd-analyze \
- systemd-run \
- systemd-stdio-bridge \
- systemd-path
-
+AM_V_RM_1 =
+
+AM_V_CC = $(AM_V_CC_$(V))
+AM_V_CC_ = $(AM_V_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC_0 = @echo " CC " $@;
+AM_V_CC_1 =
+
+AM_V_CCLD = $(AM_V_CCLD_$(V))
+AM_V_CCLD_ = $(AM_V_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD_0 = @echo " CCLD " $@;
+AM_V_CCLD_1 =
+
+AM_V_P = $(AM_V_P_$(V))
+AM_V_P_ = $(AM_V_P_$(AM_DEFAULT_VERBOSITY))
+AM_V_P_0 = false
+AM_V_P_1 = :
+
+AM_V_GEN = $(AM_V_GEN_$(V))
+AM_V_GEN_ = $(AM_V_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN_0 = @echo " GEN " $@;
+AM_V_GEN_1 =
+
+AM_V_at = $(AM_V_at_$(V))
+AM_V_at_ = $(AM_V_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at_0 = @
+AM_V_at_1 =
+
+AM_V_lt = $(AM_V_lt_$(V))
+AM_V_lt_ = $(AM_V_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt_0 = --silent
+AM_V_lt_1 =
+
+INTLTOOL_V_MERGE = $(INTLTOOL_V_MERGE_$(V))
+INTLTOOL_V_MERGE_OPTIONS = $(intltool_v_merge_options_$(V))
+INTLTOOL_V_MERGE_ = $(INTLTOOL_V_MERGE_$(AM_DEFAULT_VERBOSITY))
+INTLTOOL_V_MERGE_0 = @echo " ITMRG " $@;
+INTLTOOL_V_MERGE_1 =
+
+#@auto/systemctl/Makefile
+rootbin_PROGRAMS += systemctl
+#@auto/systemd-notify/Makefile
+rootbin_PROGRAMS += systemd-notify
+#@auto/systemd-ask-password/Makefile
+rootbin_PROGRAMS += systemd-ask-password
+#@auto/systemd-tty-ask-password-agent/Makefile
+rootbin_PROGRAMS += systemd-tty-ask-password-agent
+#@auto/systemd-machine-id-setup/Makefile
+rootbin_PROGRAMS += systemd-machine-id-setup
+#@auto/systemd-escape/Makefile
+rootbin_PROGRAMS += systemd-escape
+
+#@auto/systemd-cgls/Makefile
+bin_PROGRAMS += systemd-cgls
+#@auto/systemd-cgtop/Makefile
+bin_PROGRAMS += systemd-cgtop
+#@auto/systemd-nspawn/Makefile
+bin_PROGRAMS += systemd-nspawn
+#@auto/systemd-detect-virt/Makefile
+bin_PROGRAMS += systemd-detect-virt
+#@auto/systemd-delta/Makefile
+bin_PROGRAMS += systemd-delta
+#@auto/systemd-analyze/Makefile
+bin_PROGRAMS += systemd-analyze
+#@auto/systemd-run/Makefile
+bin_PROGRAMS += systemd-run
+#@auto/systemd-stdio-bridge/Makefile
+bin_PROGRAMS += systemd-stdio-bridge
+#@auto/systemd-path/Makefile
+bin_PROGRAMS += systemd-path
+
+#@auto/kernel-install/Makefile
dist_bin_SCRIPTS = \
src/kernel-install/kernel-install
@@ -394,31 +459,47 @@ dist_kernelinstall_SCRIPTS = \
src/kernel-install/50-depmod.install \
src/kernel-install/90-loaderentry.install
-rootlibexec_PROGRAMS = \
- systemd \
- systemd-cgroups-agent \
- systemd-initctl \
- systemd-shutdown \
- systemd-remount-fs \
- systemd-reply-password \
- systemd-fsck \
- systemd-ac-power \
- systemd-sysctl \
- systemd-sleep \
- systemd-socket-proxyd \
- systemd-update-done
-
+#@src/grp-system/systemd/Makefile
+rootlibexec_PROGRAMS += systemd
+#@auto/systemd-cgroups-agent/Makefile
+rootlibexec_PROGRAMS += systemd-cgroups-agent
+#@auto/systemd-initctl/Makefile
+rootlibexec_PROGRAMS += systemd-initctl
+#@auto/systemd-shutdown/Makefile
+rootlibexec_PROGRAMS += systemd-shutdown
+#@auto/systemd-remount-fs/Makefile
+rootlibexec_PROGRAMS += systemd-remount-fs
+#@auto/systemd-reply-password/Makefile
+rootlibexec_PROGRAMS += systemd-reply-password
+#@auto/systemd-fsck/Makefile
+rootlibexec_PROGRAMS += systemd-fsck
+#@auto/systemd-ac-power/Makefile
+rootlibexec_PROGRAMS += systemd-ac-power
+#@auto/systemd-sysctl/Makefile
+rootlibexec_PROGRAMS += systemd-sysctl
+#@auto/systemd-sleep/Makefile
+rootlibexec_PROGRAMS += systemd-sleep
+#@auto/systemd-socket-proxyd/Makefile
+rootlibexec_PROGRAMS += systemd-socket-proxyd
+#@auto/systemd-update-done/Makefile
+rootlibexec_PROGRAMS += systemd-update-done
+
+#@auto/systemd-update-utmp/Makefile
if HAVE_UTMP
rootlibexec_PROGRAMS += \
systemd-update-utmp
-endif
-
-systemgenerator_PROGRAMS = \
- systemd-getty-generator \
- systemd-fstab-generator \
- systemd-system-update-generator \
- systemd-debug-generator
-
+endif # HAVE_UTMP
+
+#@auto/systemd-getty-generator/Makefile
+systemgenerator_PROGRAMS += systemd-getty-generator
+#@auto/systemd-fstab-generator/Makefile
+systemgenerator_PROGRAMS += systemd-fstab-generator
+#@auto/systemd-system-update-generator/Makefile
+systemgenerator_PROGRAMS += systemd-system-update-generator
+#@auto/systemd-debug-generator/Makefile
+systemgenerator_PROGRAMS += systemd-debug-generator
+
+#@discard.mk
dist_bashcompletion_data = \
shell-completion/bash/busctl \
shell-completion/bash/journalctl \
@@ -568,7 +649,7 @@ if HAVE_UTMP
nodist_systemunit_DATA += \
units/systemd-update-utmp.service \
units/systemd-update-utmp-runlevel.service
-endif
+endif # HAVE_UTMP
dist_userunit_DATA = \
units/user/basic.target \
@@ -625,7 +706,7 @@ nodist_systemunit_DATA += \
systemgenerator_PROGRAMS += \
systemd-sysv-generator \
systemd-rc-local-generator
-endif
+endif # HAVE_SYSV_COMPAT
EXTRA_DIST += \
src/systemctl/systemd-sysv-install.SKELETON \
@@ -666,7 +747,7 @@ EXTRA_DIST += \
@INTLTOOL_POLICY_RULE@
-# ------------------------------------------------------------------------------
+#@build-aux/Makefile.each.tail/70-man.mk ---------------------------------------
MANPAGES =
MANPAGES_ALIAS =
@@ -692,7 +773,7 @@ noinst_DATA += \
$(HTML_FILES) \
$(HTML_ALIAS) \
docs/html/man
-endif
+endif # ENABLE_MANPAGES
CLEANFILES += \
$(man_MANS) \
@@ -710,7 +791,7 @@ man/index.html: man/systemd.index.html
if HAVE_PYTHON
noinst_DATA += \
man/index.html
-endif
+endif # HAVE_PYTHON
CLEANFILES += \
man/index.html
@@ -747,7 +828,9 @@ EXTRA_DIST += \
tools/xml_helper.py \
man/glib-event-glue.c
-# ------------------------------------------------------------------------------
+#@src/libbasic/Makefile --------------------------------------------------------
+nested.subdirs += src include
+#@src/libbasic/src/Makefile
noinst_LTLIBRARIES += \
libbasic.la
@@ -964,7 +1047,9 @@ libbasic_la_LIBADD = \
-lrt \
-lm
-# -----------------------------------------------------------------------------
+#@src/libshared/Makefile -------------------------------------------------------
+nested.subdirs += src
+#@src/libshared/src/Makefile
noinst_LTLIBRARIES += \
libshared.la
@@ -1058,19 +1143,19 @@ libshared_la_SOURCES = \
if HAVE_UTMP
libshared_la_SOURCES += \
src/shared/utmp-wtmp.c
-endif
+endif # HAVE_UTMP
if HAVE_SECCOMP
libshared_la_SOURCES += \
src/shared/seccomp-util.h \
src/shared/seccomp-util.c
-endif
+endif # HAVE_SECCOMP
if HAVE_ACL
libshared_la_SOURCES += \
src/shared/acl-util.c \
src/shared/acl-util.h
-endif
+endif # HAVE_ACL
libshared_la_CFLAGS = \
$(AM_CFLAGS) \
@@ -1124,8 +1209,7 @@ libsystemd_shared_la_LDFLAGS = \
$(AM_LDFLAGS) \
-release $(PACKAGE_VERSION)
-
-# -----------------------------------------------------------------------------
+#@auto/libfirewall/Makefile ----------------------------------------------------
if HAVE_LIBIPTC
noinst_LTLIBRARIES += \
libfirewall.la
@@ -1140,18 +1224,18 @@ libfirewall_la_CFLAGS = \
libfirewall_la_LIBADD = \
$(LIBIPTC_LIBS)
-endif
+endif # HAVE_LIBIPTC
-# -----------------------------------------------------------------------------
+#@discard.mk -------------------------------------------------------------------
if ENABLE_LDCONFIG
dist_systemunit_DATA += \
units/ldconfig.service
SYSINIT_TARGET_WANTS += \
ldconfig.service
-endif
+endif # ENABLE_LDCONFIG
-# ------------------------------------------------------------------------------
+#@auto/libcore/Makefile --------------------------------------------------------
noinst_LTLIBRARIES += \
libcore.la
@@ -1296,6 +1380,7 @@ src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(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 ";" }' < $< > $@
+#@discard.mk
gperf_gperf_m4_sources = \
src/core/load-fragment-gperf.gperf.m4
@@ -1324,6 +1409,7 @@ EXTRA_DIST += \
CLEANFILES += \
$(gperf_txt_sources)
+#@build-aux/Makefile.each.tail/50-sd.mk
%-from-name.gperf: %-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
@@ -1332,7 +1418,9 @@ CLEANFILES += \
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
-
+#@src/libbasic/include/Makefile
+nested.subdirs += basic
+#@src/libbasic/include/basic/Makefile
src/basic/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]+/ { print $$2; }' >$@
@@ -1380,10 +1468,11 @@ src/basic/cap-from-name.h: src/basic/cap-from-name.gperf
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
+#@src/libsystemd/src/sd-journal/Makefile
audit_list_includes = -include linux/audit.h -include missing.h
if HAVE_AUDIT
audit_list_includes += -include libaudit.h
-endif
+endif # HAVE_AUDIT
src/journal/audit_type-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1393,6 +1482,7 @@ src/journal/audit_type-to-name.h: src/journal/audit_type-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
+#@auto/libbasic-dns/Makefile
src/resolve/dns_type-list.txt: src/resolve/dns-type.h
$(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1406,7 +1496,7 @@ src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
-# ------------------------------------------------------------------------------
+#@src/grp-system/systemd/Makefile ----------------------------------------------
systemd_SOURCES = \
src/core/main.c
@@ -1445,7 +1535,7 @@ EXTRA_DIST += \
src/core/macros.systemd.in \
src/core/triggers.systemd.in
-# ------------------------------------------------------------------------------
+#@test/Makefile ----------------------------------------------------------------
manual_tests += \
test-ns \
@@ -1463,12 +1553,12 @@ unsafe_tests = \
if HAVE_LIBIPTC
manual_tests += \
test-firewall-util
-endif
+endif # HAVE_LIBIPTC
if HAVE_KMOD
manual_tests += \
test-netlink-manual
-endif
+endif # HAVE_KMOD
tests += \
test-daemon \
@@ -1561,7 +1651,7 @@ tests += \
if HAVE_ACL
tests += \
test-acl-util
-endif
+endif # HAVE_ACL
EXTRA_DIST += \
test/a.service \
@@ -1741,7 +1831,7 @@ test_boot_timestamps_SOURCES = \
test_boot_timestamps_LDADD = \
libsystemd-shared.la
-endif
+endif # ENABLE_EFI
test_unit_name_SOURCES = \
src/test/test-unit-name.c
@@ -2177,7 +2267,7 @@ test_firewall_util_LDADD = \
libfirewall.la \
libsystemd-shared.la \
$(LIBIPTC_LIBS)
-endif
+endif # HAVE_LIBIPTC
test_netlink_manual_SOURCES = \
src/test/test-netlink-manual.c
@@ -2364,7 +2454,7 @@ test_arphrd_list_SOURCES = \
test_arphrd_list_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@discard.mk -------------------------------------------------------------------
## .PHONY so it always rebuilds it
.PHONY: coverage lcov-run lcov-report coverage-sync
@@ -2401,9 +2491,9 @@ coverage-sync: coverage
else
lcov-run lcov-report:
echo "Need to reconfigure with --enable-coverage"
-endif
+endif # ENABLE_COVERAGE
-# ------------------------------------------------------------------------------
+#@auto/systemd-analyze/Makefile ------------------------------------------------
systemd_analyze_SOURCES = \
src/analyze/analyze.c \
src/analyze/analyze-verify.c \
@@ -2417,14 +2507,14 @@ systemd_analyze_CFLAGS = \
systemd_analyze_LDADD = \
libcore.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-initctl/Makefile ------------------------------------------------
systemd_initctl_SOURCES = \
src/initctl/initctl.c
systemd_initctl_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-update-utmp/Makefile --------------------------------------------
systemd_update_utmp_SOURCES = \
src/update-utmp/update-utmp.c
@@ -2436,14 +2526,14 @@ systemd_update_utmp_LDADD = \
libsystemd-shared.la \
$(AUDIT_LIBS)
-# ------------------------------------------------------------------------------
+#@auto/systemd-update-done/Makefile --------------------------------------------
systemd_update_done_SOURCES = \
src/update-done/update-done.c
systemd_update_done_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-shutdown/Makefile -----------------------------------------------
systemd_shutdown_SOURCES = \
src/core/umount.c \
src/core/umount.h \
@@ -2456,7 +2546,7 @@ systemd_shutdown_SOURCES = \
systemd_shutdown_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-modules-load/Makefile -------------------------------------------
if HAVE_KMOD
systemd_modules_load_SOURCES = \
src/modules-load/modules-load.c
@@ -2484,14 +2574,14 @@ nodist_systemunit_DATA += \
SYSINIT_TARGET_WANTS += \
kmod-static-nodes.service
-endif
-endif
+endif # ENABLE_TMPFILES
+endif # HAVE_KMOD
EXTRA_DIST += \
units/systemd-modules-load.service.in \
units/kmod-static-nodes.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-tmpfiles/Makefile -----------------------------------------------
if ENABLE_TMPFILES
systemd_tmpfiles_SOURCES = \
src/tmpfiles/tmpfiles.c
@@ -2531,7 +2621,7 @@ dist_tmpfiles_DATA = \
if HAVE_SYSV_COMPAT
dist_tmpfiles_DATA += \
tmpfiles.d/legacy.conf
-endif
+endif # HAVE_SYSV_COMPAT
SYSINIT_TARGET_WANTS += \
systemd-tmpfiles-setup-dev.service \
@@ -2546,7 +2636,7 @@ TIMERS_TARGET_WANTS += \
INSTALL_DIRS += \
$(tmpfilesdir) \
$(sysconfdir)/tmpfiles.d
-endif
+endif # ENABLE_TMPFILES
EXTRA_DIST += \
tmpfiles.d/systemd.conf.m4 \
@@ -2555,7 +2645,7 @@ EXTRA_DIST += \
units/systemd-tmpfiles-setup.service.in \
units/systemd-tmpfiles-clean.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-sysusers/Makefile -----------------------------------------------
if ENABLE_SYSUSERS
systemd_sysusers_SOURCES = \
src/sysusers/sysusers.c
@@ -2576,14 +2666,16 @@ nodist_sysusers_DATA = \
sysusers.d/systemd.conf \
sysusers.d/basic.conf
+#@discard.mk
if HAVE_REMOTE
nodist_sysusers_DATA += \
sysusers.d/systemd-remote.conf
-endif
+endif # HAVE_REMOTE
+#@auto/systemd-sysusers/Makefile
INSTALL_DIRS += \
$(sysusersdir)
-endif
+endif # ENABLE_SYSUSERS
EXTRA_DIST += \
units/systemd-sysusers.service.in \
@@ -2591,7 +2683,7 @@ EXTRA_DIST += \
sysusers.d/systemd-remote.conf.m4 \
sysusers.d/basic.conf.in
-# ------------------------------------------------------------------------------
+#@discard.mk -------------------------------------------------------------------
dist_factory_etc_DATA = \
factory/etc/nsswitch.conf
@@ -2599,9 +2691,9 @@ if HAVE_PAM
dist_factory_pam_DATA = \
factory/etc/pam.d/system-auth \
factory/etc/pam.d/other
-endif
+endif # HAVE_PAM
-# ------------------------------------------------------------------------------
+#@auto/systemd-firstboot/Makefile ----------------------------------------------
if ENABLE_FIRSTBOOT
systemd_firstboot_SOURCES = \
src/firstboot/firstboot.c
@@ -2618,12 +2710,12 @@ nodist_systemunit_DATA += \
SYSINIT_TARGET_WANTS += \
systemd-firstboot.service
-endif
+endif # ENABLE_FIRSTBOOT
EXTRA_DIST += \
units/systemd-firstboot.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-machine-id-setup/Makefile ---------------------------------------
systemd_machine_id_setup_SOURCES = \
src/machine-id-setup/machine-id-setup-main.c \
src/core/machine-id-setup.c \
@@ -2635,35 +2727,35 @@ systemd_machine_id_setup_LDADD = \
SYSINIT_TARGET_WANTS += \
systemd-machine-id-commit.service
-# ------------------------------------------------------------------------------
+#@auto/systemd-sysctl/Makefile -------------------------------------------------
systemd_sysctl_SOURCES = \
src/sysctl/sysctl.c
systemd_sysctl_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-sleep/Makefile --------------------------------------------------
systemd_sleep_SOURCES = \
src/sleep/sleep.c
systemd_sleep_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-fsck/Makefile ---------------------------------------------------
systemd_fsck_SOURCES = \
src/fsck/fsck.c
systemd_fsck_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-ac-power/Makefile -----------------------------------------------
systemd_ac_power_SOURCES = \
src/ac-power/ac-power.c
systemd_ac_power_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-detect-virt/Makefile --------------------------------------------
systemd_detect_virt_SOURCES = \
src/detect-virt/detect-virt.c
@@ -2673,28 +2765,28 @@ systemd_detect_virt_LDADD = \
INSTALL_EXEC_HOOKS += \
systemd-detect-virt-install-hook
-# ------------------------------------------------------------------------------
+#@auto/systemd-delta/Makefile --------------------------------------------------
systemd_delta_SOURCES = \
src/delta/delta.c
systemd_delta_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-getty-generator/Makefile ----------------------------------------
systemd_getty_generator_SOURCES = \
src/getty-generator/getty-generator.c
systemd_getty_generator_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-debug-generator/Makefile ----------------------------------------
systemd_debug_generator_SOURCES = \
src/debug-generator/debug-generator.c
systemd_debug_generator_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-fstab-generator/Makefile ----------------------------------------
systemd_fstab_generator_SOURCES = \
src/fstab-generator/fstab-generator.c \
src/core/mount-setup.c
@@ -2702,18 +2794,21 @@ systemd_fstab_generator_SOURCES = \
systemd_fstab_generator_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-system-update-generator/Makefile --------------------------------
systemd_system_update_generator_SOURCES = \
src/system-update-generator/system-update-generator.c
systemd_system_update_generator_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-hibernate-resume-generator/Makefile -----------------------------
if ENABLE_HIBERNATE
systemgenerator_PROGRAMS += \
systemd-hibernate-resume-generator
+#@auto/systemd-hibernate-resume/Makefile
+if ENABLE_HIBERNATE
+
rootlibexec_PROGRAMS += \
systemd-hibernate-resume
@@ -2723,28 +2818,40 @@ systemd_hibernate_resume_SOURCES = \
systemd_hibernate_resume_LDADD = \
libsystemd-shared.la
+nodist_systemunit_DATA += \
+ units/systemd-hibernate-resume@.service
+
+endif # ENABLE_HIBERNATE
+
+EXTRA_DIST += \
+ units/systemd-hibernate-resume@.service.in
+
+#@auto/systemd-hibernate-resume-generator/Makefile
systemd_hibernate_resume_generator_SOURCES = \
src/hibernate-resume/hibernate-resume-generator.c
systemd_hibernate_resume_generator_LDADD = \
libsystemd-shared.la
+endif # ENABLE_HIBERNATE
+#@auto/systemd-sleep/Makefile
+if ENABLE_HIBERNATE
+
dist_systemunit_DATA += \
units/hibernate.target \
units/hybrid-sleep.target
nodist_systemunit_DATA += \
units/systemd-hibernate.service \
- units/systemd-hibernate-resume@.service \
units/systemd-hybrid-sleep.service
-endif
+
+endif # ENABLE_HIBERNATE
EXTRA_DIST += \
units/systemd-hibernate.service.in \
- units/systemd-hibernate-resume@.service.in \
units/systemd-hybrid-sleep.service.in
-# ------------------------------------------------------------------------------
+#@auto/bootctl/Makefile --------------------------------------------------------
if ENABLE_EFI
if HAVE_BLKID
bootctl_SOURCES = \
@@ -2771,9 +2878,11 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_bootctl
-endif
+endif # HAVE_BLKID
+endif # ENABLE_EFI
-# ------------------------------------------------------------------------------
+#@auto/systemd-boot/Makefile ---------------------------------------------------
+if ENABLE_EFI
if HAVE_GNUEFI
efi_cppflags = \
$(EFI_CPPFLAGS) \
@@ -2805,13 +2914,13 @@ efi_cflags += \
-mno-mmx \
-DEFI_FUNCTION_WRAPPER \
-DGNU_EFI_USE_MS_ABI
-endif
+endif # ARCH_X86_64
if ARCH_IA32
efi_cflags += \
-mno-sse \
-mno-mmx
-endif
+endif # ARCH_IA32
efi_ldflags = \
$(EFI_LDFLAGS) \
@@ -2830,9 +2939,9 @@ efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
EFI_FORMAT = -O binary
else
EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
-endif
-endif
-endif
+endif # ARCH_AARCH64
+endif # HAVE_GNUEFI
+endif # ENABLE_EFI
# ------------------------------------------------------------------------------
systemd_boot_headers = \
@@ -2874,8 +2983,8 @@ $(systemd_boot_solib): $(systemd_boot_objects)
$(systemd_boot): $(systemd_boot_solib)
$(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
-j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
-endif
-endif
+endif # HAVE_GNUEFI
+endif # ENABLE_EFI
CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
@@ -2924,8 +3033,8 @@ $(stub_solib): $(stub_objects)
$(stub): $(stub_solib)
$(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
-j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
-endif
-endif
+endif # HAVE_GNUEFI
+endif # ENABLE_EFI
CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
@@ -2941,7 +3050,7 @@ test-efi: test-efi-disk.img
EXTRA_DIST += test/test-efi-create-disk.sh
-# ------------------------------------------------------------------------------
+#@auto/systemd-gpt-auto-generator/Makefile -------------------------------------
if HAVE_BLKID
systemgenerator_PROGRAMS += \
systemd-gpt-auto-generator
@@ -2957,27 +3066,27 @@ systemd_gpt_auto_generator_LDADD = \
systemd_gpt_auto_generator_CFLAGS = \
$(AM_CFLAGS) \
$(BLKID_CFLAGS)
-endif
+endif # HAVE_BLKID
-# ------------------------------------------------------------------------------
+#@src/grp-system/systemd/Makefile ----------------------------------------------
dist_xinitrc_SCRIPTS = \
xorg/50-systemd-user.sh
-# ------------------------------------------------------------------------------
+#@auto/systemd-sysv-generator/Makefile -----------------------------------------
systemd_sysv_generator_SOURCES = \
src/sysv-generator/sysv-generator.c
systemd_sysv_generator_LDADD = \
libcore.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-rc-local-generator/Makefile -------------------------------------
systemd_rc_local_generator_SOURCES = \
src/rc-local-generator/rc-local-generator.c
systemd_rc_local_generator_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-remount-fs/Makefile ---------------------------------------------
systemd_remount_fs_SOURCES = \
src/remount-fs/remount-fs.c \
src/core/mount-setup.c \
@@ -2986,70 +3095,70 @@ systemd_remount_fs_SOURCES = \
systemd_remount_fs_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-cgroups-agent/Makefile ------------------------------------------
systemd_cgroups_agent_SOURCES = \
src/cgroups-agent/cgroups-agent.c
systemd_cgroups_agent_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-escape/Makefile -------------------------------------------------
systemd_escape_SOURCES = \
src/escape/escape.c
systemd_escape_LDADD = \
libsystemd-shared.la
-# -----------------------------------------------------------------------------
+#@auto/systemctl/Makefile ------------------------------------------------------
systemctl_SOURCES = \
src/systemctl/systemctl.c
systemctl_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-notify/Makefile -------------------------------------------------
systemd_notify_SOURCES = \
src/notify/notify.c
systemd_notify_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-path/Makefile ---------------------------------------------------
systemd_path_SOURCES = \
src/path/path.c
systemd_path_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-ask-password/Makefile -------------------------------------------
systemd_ask_password_SOURCES = \
src/ask-password/ask-password.c
systemd_ask_password_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-reply-password/Makefile -----------------------------------------
systemd_reply_password_SOURCES = \
src/reply-password/reply-password.c
systemd_reply_password_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-cgls/Makefile ---------------------------------------------------
systemd_cgls_SOURCES = \
src/cgls/cgls.c
systemd_cgls_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-cgtop/Makefile --------------------------------------------------
systemd_cgtop_SOURCES = \
src/cgtop/cgtop.c
systemd_cgtop_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-nspawn/Makefile -------------------------------------------------
systemd_nspawn_SOURCES = \
src/nspawn/nspawn.c \
src/nspawn/nspawn-settings.c \
@@ -3100,7 +3209,7 @@ systemd_nspawn_LDADD = \
if HAVE_LIBIPTC
systemd_nspawn_LDADD += \
libfirewall.la
-endif
+endif # HAVE_LIBIPTC
test_patch_uid_SOURCES = \
src/nspawn/nspawn-patch-uid.c \
@@ -3118,28 +3227,28 @@ test_patch_uid_LDADD = \
manual_tests += \
test-patch-uid
-# ------------------------------------------------------------------------------
+#@auto/systemd-run/Makefile ----------------------------------------------------
systemd_run_SOURCES = \
src/run/run.c
systemd_run_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-stdio-bridge/Makefile -------------------------------------------
systemd_stdio_bridge_SOURCES = \
src/stdio-bridge/stdio-bridge.c
systemd_stdio_bridge_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-tty-ask-password-agent/Makefile ---------------------------------
systemd_tty_ask_password_agent_SOURCES = \
src/tty-ask-password-agent/tty-ask-password-agent.c
systemd_tty_ask_password_agent_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@src/libsystemd/src/Makefile --------------------------------------------------
libsystemd_internal_la_SOURCES = \
src/systemd/sd-bus.h \
src/systemd/sd-bus-protocol.h \
@@ -3238,6 +3347,7 @@ libsystemd_internal_la_LIBADD = \
noinst_LTLIBRARIES += \
libsystemd-internal.la
+#@src/libsystemd/Makefile
EXTRA_DIST += \
src/libsystemd/libsystemd.pc.in \
src/libsystemd/sd-bus/DIFFERENCES \
@@ -3255,6 +3365,7 @@ libsystemd_la_LIBADD = \
libbasic.la \
libsystemd-journal-internal.la
+#@discard.mk
libsystemd-install-hook:
libname=libsystemd.so && $(move-to-rootlibdir)
@@ -3264,6 +3375,7 @@ libsystemd-uninstall-hook:
INSTALL_EXEC_HOOKS += libsystemd-install-hook
UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
+#@src/libsystemd/Makefile
pkgconfiglib_DATA += \
src/libsystemd/libsystemd.pc
@@ -3279,6 +3391,8 @@ pkginclude_HEADERS += \
lib_LTLIBRARIES += \
libsystemd.la
+# ------------------------------------------------------------------------------
+
tests += \
test-bus-marshal \
test-bus-signature \
@@ -3300,9 +3414,11 @@ tests += \
test-local-addresses \
test-resolve
+#@auto/busctl/Makefile
bin_PROGRAMS += \
busctl
+#@src/libsystemd/src/test.mk
test_bus_marshal_SOURCES = \
src/libsystemd/sd-bus/test-bus-marshal.c
@@ -3434,6 +3550,7 @@ test_resolve_SOURCES = \
test_resolve_LDADD = \
libsystemd-shared.la
+#@auto/busctl/Makefile
busctl_SOURCES = \
src/libsystemd/sd-bus/busctl.c \
src/libsystemd/sd-bus/busctl-introspect.c \
@@ -3442,7 +3559,9 @@ busctl_SOURCES = \
busctl_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@src/libsystemd-network/Makefile ----------------------------------------------
+nested.subdirs += src test
+#@src/libsystemd-network/src/Makefile
noinst_LTLIBRARIES += \
libsystemd-network.la
@@ -3501,6 +3620,7 @@ libsystemd_network_la_SOURCES = \
libsystemd_network_la_LIBADD = \
$(KMOD_LIBS)
+#@src/libsystemd-network/test/Makefile
test_dhcp_option_SOURCES = \
src/libsystemd-network/dhcp-protocol.h \
src/libsystemd-network/dhcp-internal.h \
@@ -3593,13 +3713,15 @@ tests += \
test-dhcp6-client \
test-lldp
-# ------------------------------------------------------------------------------
+#@src/libudev/Makefile ---------------------------------------------------------
+
include_HEADERS += \
src/libudev/libudev.h
-lib_LTLIBRARIES += \
+rootlib_LTLIBRARIES += \
libudev.la
+#@src/libudev/src/Makefile
libudev_la_SOURCES =\
src/libudev/libudev.sym \
src/libudev/libudev-private.h \
@@ -3613,6 +3735,7 @@ libudev_la_SOURCES =\
src/libudev/libudev-monitor.c \
src/libudev/libudev-queue.c \
src/libudev/libudev-hwdb.c
+#@src/libudev/Makefile
libudev_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -3629,6 +3752,7 @@ pkgconfiglib_DATA += \
EXTRA_DIST += \
src/libudev/libudev.pc.in
+#@discard.mk
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
libudev-install-hook:
libname=libudev.so && $(move-to-rootlibdir)
@@ -3639,23 +3763,25 @@ libudev-uninstall-hook:
INSTALL_EXEC_HOOKS += libudev-install-hook
UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
-# ------------------------------------------------------------------------------
+#@src/libudev/src/Makefile -----------------------------------------------------
noinst_LTLIBRARIES += \
libudev-internal.la
libudev_internal_la_SOURCES =\
$(libudev_la_SOURCES)
-# ------------------------------------------------------------------------------
+#@src/grp-udev/Makefile --------------------------------------------------------
INSTALL_DIRS += \
$(sysconfdir)/udev/rules.d
+#@src/grp-network/Makefile
dist_network_DATA = \
network/99-default.link \
network/80-container-host0.network \
network/80-container-ve.network \
network/80-container-vz.network
+#@src/grp-udev/Makefile
dist_udevrules_DATA += \
rules/50-udev-default.rules \
rules/60-block.rules \
@@ -3700,12 +3826,15 @@ SYSINIT_TARGET_WANTS += \
systemd-udevd.service \
systemd-udev-trigger.service
+#@auto/udevadm/Makefile
rootbin_PROGRAMS += \
udevadm
+#@auto/systemd-udevd/Makefile
rootlibexec_PROGRAMS += \
systemd-udevd
+#@auto/libudev-core/Makefile
noinst_LTLIBRARIES += \
libudev-core.la
@@ -3764,15 +3893,18 @@ libudev_core_la_LIBADD = \
if HAVE_KMOD
libudev_core_la_SOURCES += \
src/udev/udev-builtin-kmod.c
-
+endif # HAVE_KMOD
+#@src/grp-udev/Makefile
+if HAVE_KMOD
dist_udevrules_DATA += \
rules/80-drivers.rules
-endif
+endif # HAVE_KMOD
+#@auto/libudev-core/Makefile
if HAVE_BLKID
libudev_core_la_SOURCES += \
src/udev/udev-builtin-blkid.c
-endif
+endif # HAVE_BLKID
if HAVE_ACL
libudev_core_la_SOURCES += \
@@ -3780,8 +3912,9 @@ libudev_core_la_SOURCES += \
src/login/logind-acl.c \
src/libsystemd/sd-login/sd-login.c \
src/systemd/sd-login.h
-endif
+endif # HAVE_ACL
+#@auto/systemd-udevd/Makefile
systemd_udevd_SOURCES = \
src/udev/udevd.c
@@ -3789,6 +3922,7 @@ systemd_udevd_LDADD = \
libudev-core.la \
libbasic.la
+#@auto/udevadm/Makefile
udevadm_SOURCES = \
src/udev/udevadm.c \
src/udev/udevadm-info.c \
@@ -3806,7 +3940,7 @@ udevadm_LDADD = \
libudev-core.la \
libbasic.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-hwdb/Makefile ---------------------------------------------------
if ENABLE_HWDB
INSTALL_DIRS += \
$(sysconfdir)/udev/hwdb.d
@@ -3851,14 +3985,14 @@ INSTALL_DATA_HOOKS += \
hwdb-remove-hook:
-test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
-endif
+endif # ENABLE_HWDB
EXTRA_DIST += \
units/systemd-hwdb-update.service.in \
hwdb/ids-update.pl \
hwdb/sdio.ids
-# ------------------------------------------------------------------------------
+#@discard.mk -------------------------------------------------------------------
if ENABLE_TESTS
TESTS += \
test/udev-test.pl
@@ -3870,9 +4004,9 @@ TESTS += \
if HAVE_SYSV_COMPAT
TESTS += \
test/sysv-generator-test.py
-endif
-endif
-endif
+endif # HAVE_SYSV_COMPAT
+endif # HAVE_PYTHON
+endif # ENABLE_TESTS
tests += \
test-libudev
@@ -3899,7 +4033,7 @@ test_udev_LDADD = \
if ENABLE_TESTS
check_DATA += \
test/sys
-endif
+endif # ENABLE_TESTS
# packed sysfs test tree
test/sys: test/sys.tar.xz
@@ -3919,7 +4053,7 @@ EXTRA_DIST += \
test/sysv-generator-test.py \
test/mocks/fsck
-# ------------------------------------------------------------------------------
+#@auto/ata_id/Makefile ---------------------------------------------------------
ata_id_SOURCES = \
src/udev/ata_id/ata_id.c
@@ -3929,7 +4063,7 @@ ata_id_LDADD = \
udevlibexec_PROGRAMS += \
ata_id
-# ------------------------------------------------------------------------------
+#@auto/cdrom_id/Makefile -------------------------------------------------------
cdrom_id_SOURCES = \
src/udev/cdrom_id/cdrom_id.c
@@ -3942,7 +4076,7 @@ udevlibexec_PROGRAMS += \
dist_udevrules_DATA += \
rules/60-cdrom_id.rules
-# ------------------------------------------------------------------------------
+#@auto/collect/Makefile --------------------------------------------------------
collect_SOURCES = \
src/udev/collect/collect.c
@@ -3952,7 +4086,7 @@ collect_LDADD = \
udevlibexec_PROGRAMS += \
collect
-# ------------------------------------------------------------------------------
+#@auto/scsi_id/Makefile --------------------------------------------------------
scsi_id_SOURCES =\
src/udev/scsi_id/scsi_id.c \
src/udev/scsi_id/scsi_serial.c \
@@ -3968,7 +4102,7 @@ udevlibexec_PROGRAMS += \
EXTRA_DIST += \
src/udev/scsi_id/README
-# ------------------------------------------------------------------------------
+#@auto/v4l_id/Makefile ---------------------------------------------------------
v4l_id_SOURCES = \
src/udev/v4l_id/v4l_id.c
@@ -3981,7 +4115,7 @@ udevlibexec_PROGRAMS += \
dist_udevrules_DATA += \
rules/60-persistent-v4l.rules
-# ------------------------------------------------------------------------------
+#@auto/mtd_probe/Makefile ------------------------------------------------------
mtd_probe_SOURCES = \
src/udev/mtd_probe/mtd_probe.c \
src/udev/mtd_probe/mtd_probe.h \
@@ -3993,7 +4127,7 @@ dist_udevrules_DATA += \
udevlibexec_PROGRAMS += \
mtd_probe
-# ------------------------------------------------------------------------------
+#@src/test/Makefile ------------------------------------------------------------
test_id128_SOURCES = \
src/test/test-id128.c
@@ -4003,7 +4137,7 @@ test_id128_LDADD = \
tests += \
test-id128
-# ------------------------------------------------------------------------------
+#@auto/systemd-socket-activate/Makefile ----------------------------------------
bin_PROGRAMS += \
systemd-socket-activate
@@ -4014,7 +4148,7 @@ systemd_socket_activate_SOURCES = \
systemd_socket_activate_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-journald/Makefile -----------------------------------------------
systemd_journald_SOURCES = \
src/journal/journald.c \
src/journal/journald-server.h
@@ -4023,12 +4157,14 @@ systemd_journald_LDADD = \
libjournal-core.la \
libsystemd-shared.la
+#@auto/systemd-cat/Makefile
systemd_cat_SOURCES = \
src/journal/cat.c
systemd_cat_LDADD = \
libjournal-core.la
+#@auto/systemd-journal-upload/Makefile
if HAVE_LIBCURL
rootlibexec_PROGRAMS += \
systemd-journal-upload
@@ -4051,12 +4187,14 @@ nodist_systemunit_DATA += \
nodist_pkgsysconf_DATA += \
src/journal-remote/journal-upload.conf
-endif
+
+endif # HAVE_LIBCURL
EXTRA_DIST += \
units/systemd-journal-upload.service.in \
src/journal-remote/journal-upload.conf.in
+#@auto/systemd-journal-remote/Makefile
if HAVE_MICROHTTPD
rootlibexec_PROGRAMS += \
systemd-journal-remote
@@ -4086,12 +4224,12 @@ systemd_journal_remote_LDADD += \
if ENABLE_TMPFILES
dist_tmpfiles_DATA += \
tmpfiles.d/systemd-remote.conf
-endif
+endif # ENABLE_TMPFILES
if HAVE_GNUTLS
systemd_journal_remote_LDADD += \
$(GNUTLS_LIBS)
-endif
+endif # HAVE_GNUTLS
# systemd-journal-remote make sense mostly with full crypto stack
dist_systemunit_DATA += \
@@ -4114,8 +4252,9 @@ EXTRA_DIST += \
units/systemd-journal-remote.service.in \
src/journal-remote/journal-remote.conf.in \
src/journal-remote/log-generator.py
-endif
+endif # HAVE_MICROHTTPD
+#@auto/journalctl/Makefile
# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
journalctl_CFLAGS = \
$(AM_CFLAGS)
@@ -4137,8 +4276,9 @@ journalctl_CFLAGS += \
journalctl_LDADD += \
$(QRENCODE_LIBS)
-endif
+endif # HAVE_QRENCODE
+#@src/grp-journal/Makefile
test_journal_SOURCES = \
src/journal/test-journal.c
@@ -4238,6 +4378,7 @@ test_audit_type_SOURCES = \
test_audit_type_LDADD = \
libjournal-core.la
+#@auto/libjournal-core/Makefile
libjournal_core_la_SOURCES = \
src/journal/journald-kmsg.c \
src/journal/journald-kmsg.h \
@@ -4268,6 +4409,7 @@ libjournal_core_la_LIBADD = \
noinst_LTLIBRARIES += \
libjournal-core.la
+#@src/grp-journal/Makefile
journal-install-hook:
-$(MKDIR_P) $(DESTDIR)/var/log/journal
-chown 0:0 $(DESTDIR)/var/log/journal
@@ -4316,8 +4458,9 @@ if HAVE_COMPRESSION
tests += \
test-compress \
test-compress-benchmark
-endif
+endif # HAVE_COMPRESSION
+#@src/libsystemd/src/Makefile
pkginclude_HEADERS += \
src/systemd/sd-journal.h \
src/systemd/sd-messages.h \
@@ -4366,12 +4509,15 @@ libsystemd_journal_internal_la_CFLAGS += \
libsystemd_journal_internal_la_LIBADD += \
$(XZ_LIBS)
-endif
+endif # HAVE_XZ
if HAVE_LZ4
+libsystemd_journal_internal_la_CFLAGS += \
+ $(LZ4_CFLAGS)
+
libsystemd_journal_internal_la_LIBADD += \
- -llz4
-endif
+ $(LZ4_LIBS)
+endif # HAVE_LZ4
if HAVE_GCRYPT
libsystemd_journal_internal_la_SOURCES += \
@@ -4383,33 +4529,42 @@ libsystemd_journal_internal_la_SOURCES += \
libsystemd_journal_internal_la_LIBADD += \
$(GCRYPT_LIBS)
+#@src/libsystemd/src/sd-journal/Makefile
# fsprg.c is a drop-in file using void pointer arithmetic
libsystemd_journal_internal_la_CFLAGS += \
$(GCRYPT_CFLAGS) \
-Wno-pointer-arith
-endif
+#@src/libsystemd/src/Makefile
+endif # HAVE_GCRYPT
noinst_LTLIBRARIES += \
libsystemd-journal-internal.la
+#@auto/systemd-journald/Makefile
rootlibexec_PROGRAMS += \
systemd-journald
+#@auto/journalctl/Makefile
rootbin_PROGRAMS += \
journalctl
+#@auto/systemd-cat/Makefile
bin_PROGRAMS += \
systemd-cat
+#@auto/systemd-journald/Makefile
dist_systemunit_DATA += \
units/systemd-journald.socket \
units/systemd-journald-dev-log.socket \
units/systemd-journald-audit.socket
nodist_systemunit_DATA += \
- units/systemd-journald.service \
+ units/systemd-journald.service
+#@auto/journalctl/Makefile
+nodist_systemunit_DATA += \
units/systemd-journal-flush.service \
units/systemd-journal-catalog-update.service
+#@auto/systemd-journald/Makefile
dist_pkgsysconf_DATA += \
src/journal/journald.conf
@@ -4443,19 +4598,25 @@ SOCKETS_TARGET_WANTS += \
systemd-journald-audit.socket
SYSINIT_TARGET_WANTS += \
- systemd-journald.service \
+ systemd-journald.service
+#@auto/journalctl/Makefile
+SYSINIT_TARGET_WANTS += \
systemd-journal-flush.service \
systemd-journal-catalog-update.service
+#@auto/systemd-journald/Makefile
EXTRA_DIST += \
- units/systemd-journald.service.in \
+ units/systemd-journald.service.in
+#@auto/journalctl/Makefile
+EXTRA_DIST += \
units/systemd-journal-flush.service.in \
units/systemd-journal-catalog-update.service.in
+#@auto/systemd-journald/Makefile
gperf_gperf_sources += \
src/journal/journald-gperf.gperf
-# ------------------------------------------------------------------------------
+#@auto/systemd-journal-gatewayd/Makefile ---------------------------------------
if HAVE_MICROHTTPD
gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
@@ -4474,7 +4635,7 @@ systemd_journal_gatewayd_LDADD = \
if HAVE_GNUTLS
systemd_journal_gatewayd_LDADD += \
$(GNUTLS_LIBS)
-endif
+endif # HAVE_GNUTLS
systemd_journal_gatewayd_CFLAGS = \
$(AM_CFLAGS) \
@@ -4493,12 +4654,12 @@ nodist_systemunit_DATA += \
dist_gatewayddocumentroot_DATA = \
src/journal-remote/browse.html
-endif
+endif # HAVE_MICROHTTPD
EXTRA_DIST += \
units/systemd-journal-gatewayd.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-socket-proxyd/Makefile ------------------------------------------
systemd_socket_proxyd_SOURCES = \
src/socket-proxy/socket-proxyd.c
@@ -4506,7 +4667,7 @@ systemd_socket_proxyd_SOURCES = \
systemd_socket_proxyd_LDADD = \
libsystemd-shared.la
-# ------------------------------------------------------------------------------
+#@auto/systemd-coredump/Makefile -----------------------------------------------
if ENABLE_COREDUMP
systemd_coredump_SOURCES = \
src/coredump/coredump.c \
@@ -4528,7 +4689,7 @@ systemd_coredump_SOURCES += \
systemd_coredump_LDADD += \
$(ELFUTILS_LIBS)
-endif
+endif # HAVE_ELFUTILS
nodist_systemunit_DATA += \
units/systemd-coredump@.service
@@ -4545,6 +4706,7 @@ rootlibexec_PROGRAMS += \
dist_pkgsysconf_DATA += \
src/coredump/coredump.conf
+#@auto/coredumpctl/Makefile
coredumpctl_SOURCES = \
src/coredump/coredumpctl.c
@@ -4554,6 +4716,7 @@ coredumpctl_LDADD = \
bin_PROGRAMS += \
coredumpctl
+#@auto/systemd-coredump/Makefile
manual_tests += \
test-coredump-vacuum
@@ -4565,24 +4728,26 @@ test_coredump_vacuum_SOURCES = \
test_coredump_vacuum_LDADD = \
libsystemd-shared.la
+#@auto/coredumpctl/Makefile
dist_bashcompletion_data += \
shell-completion/bash/coredumpctl
dist_zshcompletion_data += \
shell-completion/zsh/_coredumpctl
+#@auto/systemd-coredump/Makefile
nodist_sysctl_DATA = \
sysctl.d/50-coredump.conf
CLEANFILES += \
sysctl.d/50-coredump.conf
-endif
+endif # ENABLE_COREDUMP
EXTRA_DIST += \
sysctl.d/50-coredump.conf.in \
units/systemd-coredump@.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-binfmt/Makefile -------------------------------------------------
if ENABLE_BINFMT
systemd_binfmt_SOURCES = \
src/binfmt/binfmt.c
@@ -4608,12 +4773,12 @@ SYSINIT_TARGET_WANTS += \
systemd-binfmt.service \
proc-sys-fs-binfmt_misc.automount
-endif
+endif # ENABLE_BINFMT
EXTRA_DIST += \
units/systemd-binfmt.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-vconsole-setup/Makefile -----------------------------------------
if ENABLE_VCONSOLE
systemd_vconsole_setup_SOURCES = \
src/vconsole/vconsole-setup.c
@@ -4632,13 +4797,13 @@ nodist_systemunit_DATA += \
SYSINIT_TARGET_WANTS += \
systemd-vconsole-setup.service
-endif
+endif # ENABLE_VCONSOLE
EXTRA_DIST += \
src/vconsole/90-vconsole.rules.in \
units/systemd-vconsole-setup.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-quotacheck/Makefile ---------------------------------------------
if ENABLE_QUOTACHECK
rootlibexec_PROGRAMS += \
systemd-quotacheck
@@ -4651,7 +4816,7 @@ systemd_quotacheck_SOURCES = \
systemd_quotacheck_LDADD = \
libsystemd-shared.la
-endif
+endif # ENABLE_QUOTACHECK
EXTRA_DIST += \
units/systemd-quotacheck.service.in
@@ -4659,7 +4824,7 @@ EXTRA_DIST += \
nodist_systemunit_DATA += \
units/quotaon.service
-# ------------------------------------------------------------------------------
+#@auto/systemd-random-seed/Makefile --------------------------------------------
if ENABLE_RANDOMSEED
rootlibexec_PROGRAMS += \
systemd-random-seed
@@ -4676,12 +4841,12 @@ systemd_random_seed_LDADD = \
SYSINIT_TARGET_WANTS += \
systemd-random-seed.service
-endif
+endif # ENABLE_RANDOMSEED
EXTRA_DIST += \
units/systemd-random-seed.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-backlight/Makefile ----------------------------------------------
if ENABLE_BACKLIGHT
rootlibexec_PROGRAMS += \
systemd-backlight
@@ -4694,12 +4859,12 @@ systemd_backlight_SOURCES = \
systemd_backlight_LDADD = \
libsystemd-shared.la
-endif
+endif # ENABLE_BACKLIGHT
EXTRA_DIST += \
units/systemd-backlight@.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-rfkill/Makefile -------------------------------------------------
if ENABLE_RFKILL
rootlibexec_PROGRAMS += \
systemd-rfkill
@@ -4715,12 +4880,12 @@ systemd_rfkill_SOURCES = \
systemd_rfkill_LDADD = \
libsystemd-shared.la
-endif
+endif # ENABLE_RFKILL
EXTRA_DIST += \
units/systemd-rfkill.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-cryptsetup/Makefile ---------------------------------------------
if HAVE_LIBCRYPTSETUP
rootlibexec_PROGRAMS += \
systemd-cryptsetup
@@ -4752,9 +4917,9 @@ systemd_cryptsetup_generator_LDADD = \
SYSINIT_TARGET_WANTS += \
cryptsetup.target
-endif
+endif # HAVE_LIBCRYPTSETUP
-# ------------------------------------------------------------------------------
+#@auto/systemd-hostnamed/Makefile ----------------------------------------------
if ENABLE_HOSTNAMED
systemd_hostnamed_SOURCES = \
src/hostname/hostnamed.c
@@ -4786,6 +4951,10 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.hostname1.busname
+endif # ENABLE_HOSTNAMED
+#@auto/hostnamectl/Makefile
+if ENABLE_HOSTNAMED
+
hostnamectl_SOURCES = \
src/hostname/hostnamectl.c
@@ -4800,22 +4969,23 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_hostnamectl
-endif
+endif # ENABLE_HOSTNAMED
+#@auto/systemd-hostnamed/Makefile
polkitpolicy_in_files += \
src/hostname/org.freedesktop.hostname1.policy.in
EXTRA_DIST += \
units/systemd-hostnamed.service.in
-# ------------------------------------------------------------------------------
+#@src/grp-system/systemd/Makefile ----------------------------------------------
dist_systemunit_DATA_busnames += \
units/org.freedesktop.systemd1.busname
BUSNAMES_TARGET_WANTS += \
org.freedesktop.systemd1.busname
-# ------------------------------------------------------------------------------
+#@auto/systemd-localed/Makefile ------------------------------------------------
if ENABLE_LOCALED
systemd_localed_SOURCES = \
src/locale/localed.c \
@@ -4870,6 +5040,10 @@ test_keymap_util_LDADD = \
tests += \
test-keymap-util
+endif # ENABLE_LOCALED
+#@auto/localectl/Makefile
+if ENABLE_LOCALED
+
localectl_SOURCES = \
src/locale/localectl.c
@@ -4884,7 +5058,8 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_localectl
-endif
+endif # ENABLE_LOCALED
+#@auto/systemd-localed/Makefile
.PHONY: update-kbd-model-map
@@ -4894,7 +5069,7 @@ polkitpolicy_in_files += \
EXTRA_DIST += \
units/systemd-localed.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-timedated/Makefile ----------------------------------------------
if ENABLE_TIMEDATED
systemd_timedated_SOURCES = \
src/timedate/timedated.c
@@ -4926,6 +5101,9 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.timedate1.busname
+endif # ENABLE_TIMEDATED
+#@auto/timedatectl/Makefile
+if ENABLE_TIMEDATED
timedatectl_SOURCES = \
src/timedate/timedatectl.c
@@ -4940,7 +5118,8 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_timedatectl
-endif
+endif # ENABLE_TIMEDATED
+#@auto/systemd-timedated/Makefile
polkitpolicy_in_files += \
src/timedate/org.freedesktop.timedate1.policy.in
@@ -4948,7 +5127,7 @@ polkitpolicy_in_files += \
EXTRA_DIST += \
units/systemd-timedated.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-timesyncd/Makefile ----------------------------------------------
if ENABLE_TIMESYNCD
systemd_timesyncd_SOURCES = \
src/timesync/timesyncd.c \
@@ -4979,7 +5158,7 @@ GENERAL_ALIASES += \
nodist_pkgsysconf_DATA += \
src/timesync/timesyncd.conf
-endif
+endif # ENABLE_TIMESYNCD
gperf_gperf_sources += \
src/timesync/timesyncd-gperf.gperf
@@ -4988,7 +5167,7 @@ EXTRA_DIST += \
units/systemd-timesyncd.service.in \
src/timesync/timesyncd.conf.in
-# ------------------------------------------------------------------------------
+#@discard.mk -------------------------------------------------------------------
test_nss_SOURCES = \
src/test/test-nss.c
@@ -5000,7 +5179,7 @@ test_nss_LDADD = \
manual_tests += \
test-nss
-# ------------------------------------------------------------------------------
+#@auto/nss-myhostname/Makefile -------------------------------------------------
if HAVE_MYHOSTNAME
libnss_myhostname_la_SOURCES = \
src/nss-myhostname/nss-myhostname.sym \
@@ -5021,10 +5200,9 @@ libnss_myhostname_la_LIBADD = \
lib_LTLIBRARIES += \
libnss_myhostname.la
-endif
+endif # HAVE_MYHOSTNAME
-# ------------------------------------------------------------------------------
-if ENABLE_MACHINED
+#@auto/systemd-machined/Makefile -----------------------------------------------
systemd_machined_SOURCES = \
src/machine/machined.c \
src/machine/machined.h
@@ -5052,6 +5230,7 @@ libmachine_core_la_LIBADD = \
noinst_LTLIBRARIES += \
libmachine-core.la
+#@auto/machinectl/Makefile
machinectl_SOURCES = \
src/machine/machinectl.c
@@ -5061,6 +5240,7 @@ machinectl_LDADD = \
rootbin_PROGRAMS += \
machinectl
+#@auto/systemd-machined/Makefile
test_machine_tables_SOURCES = \
src/machine/test-machine-tables.c
@@ -5088,6 +5268,7 @@ dist_dbuspolicy_DATA += \
polkitpolicy_files += \
src/machine/org.freedesktop.machine1.policy
+#@auto/machinectl/Makefile
dist_bashcompletion_data += \
shell-completion/bash/machinectl
@@ -5095,12 +5276,15 @@ dist_zshcompletion_data += \
shell-completion/zsh/_machinectl \
shell-completion/zsh/_sd_machines
+#@auto/systemd-machined/Makefile
SYSTEM_UNIT_ALIASES += \
systemd-machined.service dbus-org.freedesktop.machine1.service
BUSNAMES_TARGET_WANTS += \
org.freedesktop.machine1.busname
+#@auto/nss-mymachines/Makefile
+
libnss_mymachines_la_SOURCES = \
src/nss-mymachines/nss-mymachines.sym \
src/nss-mymachines/nss-mymachines.c
@@ -5121,7 +5305,7 @@ libnss_mymachines_la_LIBADD = \
lib_LTLIBRARIES += \
libnss_mymachines.la
-endif
+#@auto/systemd-machined/Makefile
polkitpolicy_in_files += \
src/machine/org.freedesktop.machine1.policy.in
@@ -5138,12 +5322,16 @@ if HAVE_ZLIB
if HAVE_BZIP2
if HAVE_GCRYPT
-rootlibexec_PROGRAMS += \
- systemd-importd \
- systemd-pull \
- systemd-import \
- systemd-export
+#@auto/systemd-importd/Makefile
+rootlibexec_PROGRAMS += systemd-importd
+#@auto/systemd-pull/Makefile
+rootlibexec_PROGRAMS += systemd-pull
+#@auto/systemd-import/Makefile
+rootlibexec_PROGRAMS += systemd-import
+#@auto/systemd-export/Makefile
+rootlibexec_PROGRAMS += systemd-export
+#@auto/systemd-importd/Makefile
systemd_importd_SOURCES = \
src/import/importd.c
@@ -5156,6 +5344,7 @@ systemd_importd_CFLAGS = \
systemd_importd_LDADD = \
libsystemd-shared.la
+#@auto/systemd-pull/Makefile
systemd_pull_SOURCES = \
src/import/pull.c \
src/import/pull-raw.c \
@@ -5180,6 +5369,7 @@ systemd_pull_CFLAGS = \
$(LIBCURL_CFLAGS) \
$(XZ_CFLAGS) \
$(ZLIB_CFLAGS) \
+ $(BZIP2_CFLAGS) \
$(GCRYPT_CFLAGS) \
-D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
-D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
@@ -5189,9 +5379,10 @@ systemd_pull_LDADD = \
$(LIBCURL_LIBS) \
$(XZ_LIBS) \
$(ZLIB_LIBS) \
- -lbz2 \
+ $(BZIP2_LIBS) \
$(GCRYPT_LIBS)
+#@auto/systemd-import/Makefile
systemd_import_SOURCES = \
src/import/import.c \
src/import/import-raw.c \
@@ -5208,14 +5399,16 @@ systemd_import_SOURCES = \
systemd_import_CFLAGS = \
$(AM_CFLAGS) \
$(XZ_CFLAGS) \
- $(ZLIB_CFLAGS)
+ $(ZLIB_CFLAGS) \
+ $(BZIP2_CFLAGS)
systemd_import_LDADD = \
libsystemd-shared.la \
$(XZ_LIBS) \
$(ZLIB_LIBS) \
- -lbz2
+ $(BZIP2_LIBS)
+#@auto/systemd-export/Makefile
systemd_export_SOURCES = \
src/import/export.c \
src/import/export-tar.c \
@@ -5230,14 +5423,16 @@ systemd_export_SOURCES = \
systemd_export_CFLAGS = \
$(AM_CFLAGS) \
$(XZ_CFLAGS) \
- $(ZLIB_CFLAGS)
+ $(ZLIB_CFLAGS) \
+ $(BZIP2_CFLAGS)
systemd_export_LDADD = \
libsystemd-shared.la \
$(XZ_LIBS) \
$(ZLIB_LIBS) \
- -lbz2
+ $(BZIP2_LIBS)
+#@auto/systemd-importd/Makefile
dist_rootlibexec_DATA += \
src/import/import-pubring.gpg
@@ -5262,6 +5457,7 @@ dist_dbuspolicy_DATA += \
polkitpolicy_files += \
src/import/org.freedesktop.import1.policy
+#@auto/libimport/Makefile
manual_tests += \
test-qcow2
@@ -5278,13 +5474,15 @@ test_qcow2_LDADD = \
libsystemd-shared.la \
$(ZLIB_LIBS)
-endif
-endif
-endif
-endif
-endif
+#@discard.mk
+endif # HAVE_GCRYPT
+endif # HAVE_BZIP2
+endif # HAVE_ZLIB
+endif # HAVE_XZ
+endif # HAVE_LIBCURL
-endif
+endif # ENABLE_IMPORTD
+#@auto/systemd-importd/Makefile
polkitpolicy_in_files += \
src/import/org.freedesktop.import1.policy.in
@@ -5293,7 +5491,7 @@ EXTRA_DIST += \
units/systemd-importd.service.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-resolved/Makefile -----------------------------------------------
if ENABLE_RESOLVED
basic_dns_sources = \
@@ -5399,6 +5597,7 @@ GENERAL_ALIASES += \
nodist_pkgsysconf_DATA += \
src/resolve/resolved.conf
+#@auto/nss-resolve/Makefile
libnss_resolve_la_SOURCES = \
src/nss-resolve/nss-resolve.sym \
src/nss-resolve/nss-resolve.c
@@ -5420,6 +5619,7 @@ libnss_resolve_la_LIBADD = \
lib_LTLIBRARIES += \
libnss_resolve.la
+#@auto/systemd-resolve/Makefile
systemd_resolve_SOURCES = \
src/resolve/resolve-tool.c \
$(basic_dns_sources) \
@@ -5448,6 +5648,7 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_systemd-resolve
+#@auto/libbasic-dns/Makefile
tests += \
test-dns-packet \
test-resolve-tables \
@@ -5523,11 +5724,14 @@ test_dnssec_complex_SOURCES = \
test_dnssec_complex_LDADD = \
libsystemd-shared.la
-endif
+#@auto/systemd-resolved/Makefile
+endif # ENABLE_RESOLVED
+#@auto/libbasic-dns/Makefile
gperf_txt_sources += \
src/resolve/dns_type-list.txt
+#@auto/systemd-resolved/Makefile
gperf_gperf_sources += \
src/resolve/resolved-gperf.gperf
@@ -5538,8 +5742,9 @@ EXTRA_DIST += \
dist_rootlibexec_DATA += \
src/resolve/resolv.conf
-# ------------------------------------------------------------------------------
+#@src/grp-network/Makefile -----------------------------------------------------
if ENABLE_NETWORKD
+#@src/grp-network/systemd-networkd/Makefile
rootlibexec_PROGRAMS += \
systemd-networkd
@@ -5552,8 +5757,9 @@ systemd_networkd_LDADD = \
if HAVE_LIBIPTC
systemd_networkd_LDADD += \
libfirewall.la
-endif
+endif # HAVE_LIBIPTC
+#@src/grp-network/libnetworkd-core/Makefile
noinst_LTLIBRARIES += \
libnetworkd-core.la
@@ -5626,6 +5832,7 @@ libnetworkd_core_la_LIBADD = \
libsystemd-network.la \
libsystemd-shared.la
+#@src/grp-network/systemd-networkd-wait-online/Makefile
rootlibexec_PROGRAMS += \
systemd-networkd-wait-online
@@ -5644,6 +5851,7 @@ systemd_networkd_wait_online_LDADD = \
libsystemd-network.la \
libsystemd-shared.la
+#@src/grp-network/networkctl/Makefile
rootbin_PROGRAMS += \
networkctl
@@ -5657,6 +5865,7 @@ networkctl_LDADD = \
dist_bashcompletion_data += \
shell-completion/bash/networkctl
+#@src/grp-network/Makefile
test_networkd_conf_SOURCES = \
src/network/test-networkd-conf.c
@@ -5672,7 +5881,7 @@ test_network_LDADD = \
if HAVE_LIBIPTC
test_network_LDADD += \
libfirewall.la
-endif
+endif # HAVE_LIBIPTC
test_network_tables_SOURCES = \
src/network/test-network-tables.c \
@@ -5685,13 +5894,14 @@ test_network_tables_LDADD = \
if HAVE_LIBIPTC
test_network_tables_LDADD += \
libfirewall.la
-endif
+endif # HAVE_LIBIPTC
tests += \
test-networkd-conf \
test-network \
test-network-tables
+#@auto/systemd-networkd/Makefile
dist_systemunit_DATA += \
units/systemd-networkd.socket
@@ -5719,7 +5929,8 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.network1.busname
-endif
+#@src/grp-network/Makefile
+endif # ENABLE_NETWORKD
gperf_gperf_sources += \
src/network/networkd-gperf.gperf \
@@ -5731,8 +5942,9 @@ EXTRA_DIST += \
units/systemd-networkd-wait-online.service.in \
test/networkd-test.py
-# ------------------------------------------------------------------------------
+#@auto/systemd-logind/Makefile -------------------------------------------------
if ENABLE_LOGIND
+
systemd_logind_SOURCES = \
src/login/logind.c \
src/login/logind.h
@@ -5774,14 +5986,16 @@ liblogind_core_la_LIBADD = \
if HAVE_ACL
liblogind_core_la_SOURCES += \
src/login/logind-acl.c
-endif
+endif # HAVE_ACL
noinst_LTLIBRARIES += \
liblogind-core.la
+#@src/grp-login/systemd-logind/Makefile
rootlibexec_PROGRAMS += \
systemd-logind
+#@src/grp-login/loginctl/Makefile
loginctl_SOURCES = \
src/login/loginctl.c \
src/login/sysfs-show.h \
@@ -5796,9 +6010,9 @@ rootbin_PROGRAMS += \
dist_bashcompletion_data += \
shell-completion/bash/loginctl
-dist_zshcompletion_data += \
- shell-completion/zsh/_loginctl \
- shell-completion/zsh/_systemd-inhibit
+dist_zshcompletion_data += shell-completion/zsh/_loginctl
+#@src/grp-login/systemd-inhibit/Makefile
+dist_zshcompletion_data += shell-completion/zsh/_systemd-inhibit
systemd_inhibit_SOURCES = \
src/login/inhibit.c
@@ -5809,6 +6023,7 @@ systemd_inhibit_LDADD = \
rootbin_PROGRAMS += \
systemd-inhibit
+#@src/grp-login/Makefile
test_login_SOURCES = \
src/libsystemd/sd-login/test-login.c
@@ -5841,6 +6056,7 @@ tests += \
test-login-tables \
test-login-shared
+#@src/grp-login/pam_systemd/Makefile
if HAVE_PAM
pam_systemd_la_SOURCES = \
src/login/pam_systemd.sym \
@@ -5870,7 +6086,8 @@ dist_pamconf_DATA = \
EXTRA_DIST += \
src/login/systemd-user.m4
-endif
+endif # HAVE_PAM
+#@auto/systemd-logind/Makefile
nodist_systemunit_DATA += \
units/systemd-logind.service
@@ -5913,7 +6130,7 @@ nodist_udevrules_DATA += \
src/login/71-seat.rules \
src/login/73-seat-late.rules
-endif
+endif # ENABLE_LOGIND
polkitpolicy_in_files += \
src/login/org.freedesktop.login1.policy.in
@@ -5927,7 +6144,7 @@ EXTRA_DIST += \
units/systemd-logind.service.in \
src/login/logind.conf.in
-# ------------------------------------------------------------------------------
+#@auto/systemd-user-sessions/Makefile ------------------------------------------
if HAVE_PAM
systemd_user_sessions_SOURCES = \
@@ -5945,12 +6162,12 @@ nodist_systemunit_DATA += \
MULTI_USER_TARGET_WANTS += \
systemd-user-sessions.service
-endif
+endif # HAVE_PAM
EXTRA_DIST += \
units/systemd-user-sessions.service.in
-# ------------------------------------------------------------------------------
+#@discard.mk -------------------------------------------------------------------
EXTRA_DIST += \
test/Makefile \
test/README.testsuite \
@@ -5998,7 +6215,7 @@ EXTRA_DIST += \
test/loopy.service.d \
test/loopy.service.d/compat.conf
-# ------------------------------------------------------------------------------
+#@build-aux/Makefile.once.head/20-sd.mk ----------------------------------------
substitutions = \
'|rootlibexecdir=$(rootlibexecdir)|' \
'|rootbindir=$(rootbindir)|' \
@@ -6066,15 +6283,18 @@ SED_PROCESS = \
$(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
< $< > $@
+#@discard.mk
units/%: units/%.in
$(SED_PROCESS)
man/%: man/%.in
$(SED_PROCESS)
+#@build-aux/Makefile.each.tail/50-sd.mk
sysctl.d/%: sysctl.d/%.in
$(SED_PROCESS)
+#@discard.mk
%.pc: %.pc.in
$(SED_PROCESS)
@@ -6096,6 +6316,7 @@ shell-completion/%: shell-completion/%.in
%.conf: %.conf.in
$(SED_PROCESS)
+#@build-aux/Makefile.each.tail/50-sd.mk
%.sh: %.sh.in
$(SED_PROCESS)
$(AM_V_GEN)chmod +x $@
@@ -6108,6 +6329,7 @@ src/%: src/%.m4 $(top_builddir)/config.status
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+#@discard.mk
sysusers.d/%: sysusers.d/%.m4 $(top_builddir)/config.status
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
@@ -6129,22 +6351,24 @@ if ENABLE_POLKIT
nodist_polkitpolicy_DATA = \
$(polkitpolicy_files) \
$(polkitpolicy_in_in_files:.policy.in.in=.policy)
-endif
+endif # ENABLE_POLKIT
EXTRA_DIST += \
$(polkitpolicy_in_files) \
$(polkitpolicy_in_in_files)
-# ------------------------------------------------------------------------------
+#@man/Makefile -----------------------------------------------------------------
man/custom-entities.ent: configure.ac
$(AM_V_GEN)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
> $@ # '
+#@discard.mk
CLEANFILES += \
man/custom-entities.ent
+#@build-aux/Makefile.once.head/20-sd.mk
XSLTPROC_FLAGS = \
--nonet \
--xinclude \
@@ -6162,6 +6386,7 @@ XSLTPROC_PROCESS_MAN = \
XSLTPROC_PROCESS_HTML = \
$(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
+#@build-aux/Makefile.each.tail/50-sd.mk
man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
$(XSLTPROC_PROCESS_MAN)
@@ -6180,37 +6405,47 @@ man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
$(XSLTPROC_PROCESS_HTML)
+#@build-aux/Makefile.once.head/20-sd.mk
define html-alias
$(AM_V_LN)$(LN_S) -f $(notdir $<) $@
endef
+#@discard.mk
EXTRA_DIST += \
man/custom-html.xsl \
man/custom-man.xsl
# ------------------------------------------------------------------------------
+#@auto/systemd-sysv-generator/Makefile
if HAVE_SYSV_COMPAT
sysvinit_DATA = \
docs/sysvinit/README
-varlog_DATA = \
- docs/var-log/README
-
docs/sysvinit/README: docs/sysvinit/README.in
$(SED_PROCESS)
+CLEANFILES += \
+ docs/sysvinit/README
+endif # HAVE_SYSV_COMPAT
+
+EXTRA_DIST += \
+ docs/sysvinit/README.in
+#@src/grp-journal/Makefile
+if HAVE_SYSV_COMPAT
+
+varlog_DATA = \
+ docs/var-log/README
+
docs/var-log/README: docs/var-log/README.in
$(SED_PROCESS)
CLEANFILES += \
- docs/sysvinit/README \
docs/var-log/README
-endif
+endif # HAVE_SYSV_COMPAT
EXTRA_DIST += \
- docs/sysvinit/README.in \
docs/var-log/README.in
-
+#@discard.mk
SOCKETS_TARGET_WANTS += \
systemd-initctl.socket
@@ -6222,11 +6457,11 @@ GRAPHICAL_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
RESCUE_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
-endif
+endif # HAVE_SYSV_COMPAT
SYSINIT_TARGET_WANTS += \
systemd-update-utmp.service
-endif
+endif # HAVE_UTMP
SYSINIT_TARGET_WANTS += \
systemd-update-done.service
@@ -6258,7 +6493,7 @@ SYSTEM_UNIT_ALIASES += \
multi-user.target runlevel4.target \
graphical.target runlevel5.target \
reboot.target runlevel6.target
-endif
+endif # HAVE_SYSV_COMPAT
SYSTEM_UNIT_ALIASES += \
graphical.target default.target \
@@ -6291,7 +6526,7 @@ INSTALL_DIRS += \
$(systemunitdir)/runlevel3.target.wants \
$(systemunitdir)/runlevel4.target.wants \
$(systemunitdir)/runlevel5.target.wants
-endif
+endif # HAVE_SYSV_COMPAT
INSTALL_DIRS += \
$(prefix)/lib/modules-load.d \
@@ -6347,7 +6582,7 @@ else
DISTCHECK_CONFIGURE_FLAGS += \
--with-sysvinit-path= \
--with-sysvrcnd-path=
-endif
+endif # HAVE_SYSV_COMPAT
if ENABLE_SPLIT_USR
DISTCHECK_CONFIGURE_FLAGS += \
@@ -6355,7 +6590,7 @@ DISTCHECK_CONFIGURE_FLAGS += \
else
DISTCHECK_CONFIGURE_FLAGS += \
--disable-split-usr
-endif
+endif # ENABLE_SPLIT_USR
.PHONY: dist-check-help
dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
@@ -6378,6 +6613,7 @@ dist-check-includes: $(public_headers)
done; \
done; exit $$res
+#@auto/hwdb/Makefile
.PHONY: hwdb-update
hwdb-update:
( cd $(top_srcdir)/hwdb && \
@@ -6392,6 +6628,7 @@ hwdb-update:
./acpi-update.py > 20-acpi-vendor.hwdb.base && \
patch -p0 -o- 20-acpi-vendor.hwdb.base < 20-acpi-vendor.hwdb.patch > 20-acpi-vendor.hwdb )
+#@discard.mk
.PHONY: built-sources
built-sources: $(BUILT_SOURCES)
@@ -6415,6 +6652,7 @@ install-tree: all
$(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
tree $(abs_srcdir)/install-tree
+#@build-aux/Makefile.once.tail/10-sd.mk
# Let's run all tests of the test suite, but under valgrind. Let's
# exclude perl/python/shell scripts we have in there
.PHONY: valgrind-tests
@@ -6467,6 +6705,7 @@ check-includes: $(top_srcdir)/tools/check-includes.pl
EXTRA_DIST += \
$(top_srcdir)/tools/check-includes.pl
+#@build-aux/Makefile.each.tail/50-sd.mk
# Stupid test that everything purported to be exported really is
define generate-sym-test
$(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -6479,6 +6718,7 @@ define generate-sym-test
$(AM_V_at)printf 'return 0; }\n' >> $@
endef
+#@src/libsystemd/Makefile
test-libsystemd-sym.c: \
$(top_builddir)/src/libsystemd/libsystemd.sym \
src/systemd/sd-journal.h \
@@ -6491,16 +6731,19 @@ test-libsystemd-sym.c: \
src/systemd/sd-event.h
$(generate-sym-test)
+#@src/libudev/Makefile
test-libudev-sym.c: \
src/libudev/libudev.sym \
src/udev/udev.h
$(generate-sym-test)
+#@src/libsystemd/Makefile
nodist_test_libsystemd_sym_SOURCES = \
test-libsystemd-sym.c
test_libsystemd_sym_LDADD = \
libsystemd.la
+#@src/libudev/Makefile
nodist_test_libudev_sym_SOURCES = \
test-libudev-sym.c
test_libudev_sym_CFLAGS = \
@@ -6509,6 +6752,7 @@ test_libudev_sym_CFLAGS = \
test_libudev_sym_LDADD = \
libudev.la
+#@discard.mk
BUILT_SOURCES += \
test-libsystemd-sym.c \
test-libudev-sym.c
@@ -6521,6 +6765,7 @@ tests += \
test-libsystemd-sym \
test-libudev-sym
+#@build-aux/Makefile.once.tail/10-sd.mk
.PHONY: cppcheck
cppcheck:
cppcheck --enable=all -q $(top_srcdir)
@@ -6540,3 +6785,50 @@ list-keys:
add-key:
gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -
+#@Makefile
+# intltoolize
+files.src.gen += m4/intltool.m4
+files.src.gen += po/Makefile.in.in
+# autoreconf
+files.src.gen += aclocal.m4
+files.src.gen += automake.mk.in
+files.src.gen += build-aux/compile
+files.src.gen += build-aux/config.guess
+files.src.gen += build-aux/config.sub
+files.src.gen += build-aux/install-sh
+files.src.gen += build-aux/ltmain.sh
+files.src.gen += build-aux/missing
+files.src.gen += m4/libtool.m4
+files.src.gen += m4/ltoptions.m4
+files.src.gen += m4/ltsugar.m4
+files.src.gen += m4/ltversion.m4
+files.src.gen += m4/lt~obsolete.m4
+files.src.gen += config.h.in
+files.src.gen += configure
+#@src/libsystemd/src/subdir.mk
+sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\"
+sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+#@src/grp-udev/libudev-core/net/Makefile
+sd.CPPFLAGS += $(libshared.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-network.CPPFLAGS)
+#@src/Makefile
+#@src/grp-boot/Makefile
+#@src/grp-coredump/Makefile
+#@src/grp-hostname/Makefile
+#@src/grp-initprogs/Makefile
+#@src/grp-initprogs/grp-sleep/Makefile
+#@src/grp-journal/grp-remote/Makefile
+#@src/grp-locale/Makefile
+#@src/grp-machine/Makefile
+#@src/grp-machine/grp-import/Makefile
+#@src/grp-machine/grp-import/libimport/Makefile
+#@src/grp-resolve/Makefile
+#@src/grp-resolve/libbasic-dns/Makefile
+#@src/grp-system/Makefile
+#@src/grp-system/grp-utils/Makefile
+#@src/grp-timedate/Makefile
+#@src/grp-utils/Makefile
+#@src/libudev/Makefile
+#@all
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/build-aux/Makefile.each.head/.gitignore b/build-aux/Makefile.each.head/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build-aux/Makefile.each.head/.gitignore
diff --git a/build-aux/Makefile.each.tail/.gitignore b/build-aux/Makefile.each.tail/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build-aux/Makefile.each.tail/.gitignore
diff --git a/build-aux/Makefile.once.head/.gitignore b/build-aux/Makefile.once.head/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build-aux/Makefile.once.head/.gitignore
diff --git a/build-aux/Makefile.once.tail/.gitignore b/build-aux/Makefile.once.tail/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/build-aux/Makefile.once.tail/.gitignore
diff --git a/build-aux/write-ifchanged b/build-aux/write-ifchanged
new file mode 100755
index 0000000000..185ceb0039
--- /dev/null
+++ b/build-aux/write-ifchanged
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# Copyright (C) 2015 Luke Shumaker
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+outfile=$1
+tmpfile="$(dirname "$outfile")/.tmp${outfile##*/}"
+
+cat > "$tmpfile" || exit $?
+if cmp -s "$tmpfile" "$outfile"; then
+ rm -f "$tmpfile" || :
+else
+ mv -f "$tmpfile" "$outfile"
+fi
diff --git a/system-preset/90-journald.preset b/system-preset/90-journald.preset
new file mode 100644
index 0000000000..6a8c17b1fa
--- /dev/null
+++ b/system-preset/90-journald.preset
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+disable syslog.socket
+
+disable systemd-journal-gatewayd.*
diff --git a/system-preset/90-networkd.preset b/system-preset/90-networkd.preset
new file mode 100644
index 0000000000..a053f7a4b1
--- /dev/null
+++ b/system-preset/90-networkd.preset
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+enable systemd-networkd.service
+
+disable systemd-networkd-wait-online.service
diff --git a/system-preset/90-resolved.preset b/system-preset/90-resolved.preset
new file mode 100644
index 0000000000..c5a5063cc1
--- /dev/null
+++ b/system-preset/90-resolved.preset
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# These ones should be enabled by default, even if distributions
+# generally follow a default-off policy.
+
+enable systemd-resolved.service
diff --git a/system-preset/90-systemd.preset b/system-preset/90-systemd.preset
index ee1b864bcf..138937011c 100644
--- a/system-preset/90-systemd.preset
+++ b/system-preset/90-systemd.preset
@@ -12,9 +12,6 @@ enable remote-fs.target
enable machines.target
enable getty@.service
-enable systemd-timesyncd.service
-enable systemd-networkd.service
-enable systemd-resolved.service
disable console-getty.service
disable console-shell.service
@@ -25,8 +22,3 @@ disable kexec.target
disable poweroff.target
disable reboot.target
disable rescue.target
-
-disable syslog.socket
-
-disable systemd-journal-gatewayd.*
-disable systemd-networkd-wait-online.service
diff --git a/system-preset/90-timesyncd.preset b/system-preset/90-timesyncd.preset
new file mode 100644
index 0000000000..d40b418358
--- /dev/null
+++ b/system-preset/90-timesyncd.preset
@@ -0,0 +1,8 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+enable systemd-timesyncd.service
diff --git a/sysusers.d/systemd-coredump.conf b/sysusers.d/systemd-coredump.conf
new file mode 100644
index 0000000000..bc0816ca5e
--- /dev/null
+++ b/sysusers.d/systemd-coredump.conf
@@ -0,0 +1,8 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+u systemd-coredump - "systemd Core Dumper"
diff --git a/sysusers.d/systemd-remote.conf.m4 b/sysusers.d/systemd-journal-gatewayd.conf
index 0e9d71cdd0..379be0852e 100644
--- a/sysusers.d/systemd-remote.conf.m4
+++ b/sysusers.d/systemd-journal-gatewayd.conf
@@ -5,10 +5,4 @@
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
-m4_ifdef(`HAVE_MICROHTTPD',
u systemd-journal-gateway - "systemd Journal Gateway"
-u systemd-journal-remote - "systemd Journal Remote"
-)m4_dnl
-m4_ifdef(`HAVE_LIBCURL',
-u systemd-journal-upload - "systemd Journal Upload"
-)m4_dnl
diff --git a/sysusers.d/systemd-journal-remote.conf b/sysusers.d/systemd-journal-remote.conf
new file mode 100644
index 0000000000..ca20c24896
--- /dev/null
+++ b/sysusers.d/systemd-journal-remote.conf
@@ -0,0 +1,8 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+u systemd-journal-remote - "systemd Journal Remote"
diff --git a/sysusers.d/systemd-journal-upload.conf b/sysusers.d/systemd-journal-upload.conf
new file mode 100644
index 0000000000..927d400279
--- /dev/null
+++ b/sysusers.d/systemd-journal-upload.conf
@@ -0,0 +1,8 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+u systemd-journal-upload - "systemd Journal Upload"
diff --git a/sysusers.d/systemd-journald.conf b/sysusers.d/systemd-journald.conf
new file mode 100644
index 0000000000..dcb01f606a
--- /dev/null
+++ b/sysusers.d/systemd-journald.conf
@@ -0,0 +1,8 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+g systemd-journal - -
diff --git a/sysusers.d/systemd-networkd.conf b/sysusers.d/systemd-networkd.conf
new file mode 100644
index 0000000000..208148d6b8
--- /dev/null
+++ b/sysusers.d/systemd-networkd.conf
@@ -0,0 +1,8 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+u systemd-network - "systemd Network Management"
diff --git a/sysusers.d/systemd-resolved.conf b/sysusers.d/systemd-resolved.conf
new file mode 100644
index 0000000000..5872bf2db7
--- /dev/null
+++ b/sysusers.d/systemd-resolved.conf
@@ -0,0 +1,8 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+u systemd-resolve - "systemd Resolver"
diff --git a/sysusers.d/systemd.conf.m4 b/sysusers.d/systemd-timesyncd.conf
index af97509c05..4d7af7b3ae 100644
--- a/sysusers.d/systemd.conf.m4
+++ b/sysusers.d/systemd-timesyncd.conf
@@ -5,16 +5,4 @@
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
-g systemd-journal - -
-m4_ifdef(`ENABLE_NETWORKD',
-u systemd-network - "systemd Network Management"
-)m4_dnl
-m4_ifdef(`ENABLE_RESOLVED',
-u systemd-resolve - "systemd Resolver"
-)m4_dnl
-m4_ifdef(`ENABLE_TIMESYNCD',
u systemd-timesync - "systemd Time Synchronization"
-)m4_dnl
-m4_ifdef(`ENABLE_COREDUMP',
-u systemd-coredump - "systemd Core Dumper"
-)m4_dnl
diff --git a/tmpfiles.d/.gitignore b/tmpfiles.d/.gitignore
index 4f0ecaa9c3..c8c9fe059b 100644
--- a/tmpfiles.d/.gitignore
+++ b/tmpfiles.d/.gitignore
@@ -1,2 +1,2 @@
/etc.conf
-/systemd.conf
+/systemd-journald.conf
diff --git a/tmpfiles.d/etc.conf.m4 b/tmpfiles.d/etc.conf.m4
index 064eae94f1..928105ea8d 100644
--- a/tmpfiles.d/etc.conf.m4
+++ b/tmpfiles.d/etc.conf.m4
@@ -13,9 +13,6 @@ L+ /etc/mtab - - - - ../proc/self/mounts
m4_ifdef(`HAVE_SMACK_RUN_LABEL',
t /etc/mtab - - - - security.SMACK64=_
)m4_dnl
-m4_ifdef(`ENABLE_RESOLVED',
-L! /etc/resolv.conf - - - - ../usr/lib/systemd/resolv.conf
-)m4_dnl
C /etc/nsswitch.conf - - - -
m4_ifdef(`HAVE_PAM',
C /etc/pam.d - - - -
diff --git a/tmpfiles.d/systemd-coredump.conf b/tmpfiles.d/systemd-coredump.conf
new file mode 100644
index 0000000000..02b052583d
--- /dev/null
+++ b/tmpfiles.d/systemd-coredump.conf
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+d /var/lib/systemd/coredump 0755 root root 3d
diff --git a/tmpfiles.d/systemd.conf.m4 b/tmpfiles.d/systemd-journald.conf.m4
index 2cd58e9121..2e8bd8cbef 100644
--- a/tmpfiles.d/systemd.conf.m4
+++ b/tmpfiles.d/systemd-journald.conf.m4
@@ -7,21 +7,6 @@
# See tmpfiles.d(5) for details
-d /run/user 0755 root root -
-F! /run/utmp 0664 root utmp -
-
-d /run/systemd/ask-password 0755 root root -
-d /run/systemd/seats 0755 root root -
-d /run/systemd/sessions 0755 root root -
-d /run/systemd/users 0755 root root -
-d /run/systemd/machines 0755 root root -
-d /run/systemd/shutdown 0755 root root -
-m4_ifdef(`ENABLE_NETWORKD',
-d /run/systemd/netif 0755 systemd-network systemd-network -
-d /run/systemd/netif/links 0755 systemd-network systemd-network -
-d /run/systemd/netif/leases 0755 systemd-network systemd-network -
-)m4_dnl
-
d /run/log 0755 root root -
z /run/log/journal 2755 root systemd-journal - -
@@ -68,6 +53,3 @@ a+ /var/log/journal/%m - - - - d:group:wheel:r-x
a+ /var/log/journal/%m - - - - group:wheel:r-x
a+ /var/log/journal/%m/system.journal - - - - group:wheel:r--
'')')')m4_dnl
-
-d /var/lib/systemd 0755 root root -
-d /var/lib/systemd/coredump 0755 root root 3d
diff --git a/tmpfiles.d/systemd-networkd.conf b/tmpfiles.d/systemd-networkd.conf
new file mode 100644
index 0000000000..24197555ee
--- /dev/null
+++ b/tmpfiles.d/systemd-networkd.conf
@@ -0,0 +1,12 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+d /run/systemd/netif 0755 systemd-network systemd-network -
+d /run/systemd/netif/links 0755 systemd-network systemd-network -
+d /run/systemd/netif/leases 0755 systemd-network systemd-network -
diff --git a/tmpfiles.d/systemd-resolved.conf b/tmpfiles.d/systemd-resolved.conf
new file mode 100644
index 0000000000..760fe11412
--- /dev/null
+++ b/tmpfiles.d/systemd-resolved.conf
@@ -0,0 +1,10 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+L! /etc/resolv.conf - - - - ../usr/lib/systemd/resolv.conf
diff --git a/tmpfiles.d/systemd-tmpfs.conf b/tmpfiles.d/systemd-tmpfs.conf
new file mode 100644
index 0000000000..98050d329d
--- /dev/null
+++ b/tmpfiles.d/systemd-tmpfs.conf
@@ -0,0 +1,14 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+# Exclude namespace mountpoints created with PrivateTmp=yes
+x /tmp/systemd-private-%b-*
+X /tmp/systemd-private-%b-*/tmp
+x /var/tmp/systemd-private-%b-*
+X /var/tmp/systemd-private-%b-*/tmp
diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf
new file mode 100644
index 0000000000..00951c92c9
--- /dev/null
+++ b/tmpfiles.d/systemd.conf
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+d /run/user 0755 root root -
+F! /run/utmp 0664 root utmp -
+
+d /run/systemd/ask-password 0755 root root -
+d /run/systemd/seats 0755 root root -
+d /run/systemd/sessions 0755 root root -
+d /run/systemd/users 0755 root root -
+d /run/systemd/machines 0755 root root -
+d /run/systemd/shutdown 0755 root root -
+
+d /var/lib/systemd 0755 root root -
diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
index 6bbd1aa341..fe5225d751 100644
--- a/tmpfiles.d/tmp.conf
+++ b/tmpfiles.d/tmp.conf
@@ -10,9 +10,3 @@
# Clear tmp directories separately, to make them easier to override
q /tmp 1777 root root 10d
q /var/tmp 1777 root root 30d
-
-# Exclude namespace mountpoints created with PrivateTmp=yes
-x /tmp/systemd-private-%b-*
-X /tmp/systemd-private-%b-*/tmp
-x /var/tmp/systemd-private-%b-*
-X /var/tmp/systemd-private-%b-*/tmp
diff --git a/tools/git-setup b/tools/git-setup
new file mode 100755
index 0000000000..f40a7724d9
--- /dev/null
+++ b/tools/git-setup
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+cd "$(dirname -- "$0")"
+cd "$(git rev-parse --show-toplevel)"
+
+if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
+ # This part is allowed to fail
+ cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
+ chmod +x .git/hooks/pre-commit && \
+ echo "Activated pre-commit hook." || :
+fi
+
+declare -A fetch
+git config -f .gitconfig --get-regexp '.*' | while read -r key val; do
+ if [[ $key = *.fetch ]]; then
+ if [[ -z "${fetch[$key]}" ]]; then
+ git config --local --unset-all "$key"
+ fetch[$key]='true'
+ fi
+ git config --local --add "$key" "$val"
+ else
+ git config --local "$key" "$val"
+ fi
+done
diff --git a/tools/notsd-find-includes b/tools/notsd-find-includes
new file mode 100755
index 0000000000..494398b082
--- /dev/null
+++ b/tools/notsd-find-includes
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+
+phase=phase0
+
+phase0() {
+ phase=phase0
+ local line="$1"
+ case "$line" in
+ '#include'*|'typedef '*';')
+ phase1 "$line"
+ ;;
+ *)
+ ;;
+ esac
+}
+
+phase1() {
+ phase=phase1
+ local line="$1"
+ case "$line" in
+ '')
+ ;;
+ '#include'*)
+ ;;
+ 'typedef '*';')
+ ;;
+ *)
+ phase2 "$line"
+ ;;
+ esac
+}
+
+phase2() {
+ phase=phase2
+ local line="$1"
+ printf '%s\n' "$line"
+ cat
+}
+
+main() {
+ current_file="$1"
+ set -o pipefail
+ {
+ IFS=''
+ while read -r line; do
+ "$phase" "$line"
+ IFS=''
+ done
+ } < "$current_file" | grep '^#include' | ifne printf '%s\n' "$current_file"
+}
+
+main "$@"
diff --git a/tools/notsd-fixup b/tools/notsd-fixup
new file mode 100755
index 0000000000..77df56fff4
--- /dev/null
+++ b/tools/notsd-fixup
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+# The reason we do `find`/`while read`-loops instead of `find -exec` commands
+# is that we want errors from the inner loop to bubble up.
+
+fixup_makefiles() (
+ find "$@" -type f -name Makefile | while read -r filename; do
+ {
+ <"$filename" sed -r \
+ -e "s|(/\.\.)*/config.mk|/$(realpath -ms --relative-to="$(dirname -- "$filename")" config.mk)|" \
+ -e '/^nested\.subdirs/d' \
+ -e '/^include \$\(topsrcdir\)\/build-aux\/Makefile\.tail\.mk$/d'
+ echo
+ find "$(dirname "$filename")" -mindepth 2 -maxdepth 2 -name Makefile -print0 |
+ xargs -r0 dirname -z -- |
+ xargs -r0 basename -a -z |
+ xargs -r0 printf 'nested.subdirs += %s\n' | sort
+ echo
+ echo 'include $(topsrcdir)/build-aux/Makefile.tail.mk'
+ } | cat -s | build-aux/write-ifchanged "$filename"
+ done
+)
+
+fixup_includes() (
+ find $(find . -type d -name include) -type d | while read -r dir; do
+ lib="${dir##*/}"
+ pushd "$dir" >/dev/null
+ find . -type f -exec sed -ri -e "s|$lib/||" -- {} +
+ popd >/dev/null
+ done
+
+ find "$@" \( -name '*.h' -o -name '*.c' -o -name '*.gperf' \) -type f | while read -r filename; do
+ "$0"--includes "$filename"
+ done
+)
+
+main() {
+ set -e
+ set -o pipefail
+ export LC_COLLATE=C
+ fixup_makefiles "$@"
+ fixup_includes "$@"
+}
+
+main "$@"
diff --git a/tools/notsd-fixup--includes b/tools/notsd-fixup--includes
new file mode 100755
index 0000000000..315be32c8d
--- /dev/null
+++ b/tools/notsd-fixup--includes
@@ -0,0 +1,240 @@
+#!/usr/bin/env bash
+
+panic() {
+ >&2 echo panic
+ exit 2
+}
+
+out() {
+ printf '%q ' "$@"
+}
+
+# system
+# linux
+# public
+# protected
+# private
+classify() {
+ local path=$1
+ if [[ "$path" = linux/* ]]; then
+ out linux "$path"
+ elif [[ -f "${current_file%/*}/${path}" ]]; then
+ out private "$path"
+ elif [[ "$path" != systemd/* ]] &&
+ [[ "$path" != libudev.h ]] &&
+ cpp -include "$path" <<<'' &>/dev/null; then
+ out system "$path"
+ else
+ case "$path" in
+ *-to-name.h|*-from-name.h)
+ base="${path##*/}"
+ base="${base%-to-name.h}"
+ base="${base%-from-name.h}"
+ case "$base" in
+ dns_type) d=src/grp-resolve/systemd-resolved;;
+ keyboard-keys) d=src/grp-udev/libudev-core;;
+ af|arphrd|cap|errno) d=src/libbasic/include/basic;;
+ audit_type) d=src/libsystemd/src/sd-journal;;
+ *)
+ >&2 printf 'Unknown gperf base: %q\n' "$base"
+ >&2 printf 'Cannot figure out: %q\n' "$path"
+ exit 2
+ ;;
+ esac
+ file="$d/${path##*/}"
+ if [[ "$current_file" = "$d"/* ]]; then
+ out private "${file##*/}"
+ elif [[ "$file" = */include/* ]]; then
+ out protected "${file##*/include/}"
+ else
+ out protected "${file##*/}"
+ fi
+ ;;
+ asm/sgidefs.h|dbus/dbus.h|efi.h|efilib.h|gio/gio.h|glib.h|libmount.h)
+ out system "$path"
+ ;;
+ util.h|*/util.h)
+ if [[ "$current_file" = */systemd-boot/* ]]; then
+ out private util.h
+ else
+ out protected basic/util.h
+ fi
+ ;;
+ *)
+ file=$(find src -type f -name "${path##*/}")
+ if [[ -f "$file" ]]; then
+ case "$file" in
+ */src/*)
+ if [[ "${current_file%/*}" = "${file%/*}" ]]; then
+ out private "${file##*/}"
+ else
+ out protected "${file##*/src/}"
+ fi
+ ;;
+ */libsystemd/include/*|*/libudev/include/*)
+ out public "${file##*/include/}"
+ ;;
+ */include/*)
+ out protected "${file##*/include/}"
+ ;;
+ *)
+ if [[ "${current_file%/*}" = "${file%/*}" ]]; then
+ out private "${file##*/}"
+ else
+ out protected "${file##*/}"
+ fi
+ ;;
+ esac
+ else
+ >&2 printf 'Cannot figure out: %q\n' "$path"
+ exit 2
+ fi
+ ;;
+ esac
+ fi
+}
+
+phase=phase0
+hook=:
+
+phase0() {
+ phase=phase0
+ hook=:
+ local line="$1"
+ case "$line" in
+ '#include'*|'typedef '*';')
+ phase1 "$line"
+ ;;
+ *)
+ printf '%s\n' "$line"
+ ;;
+ esac
+}
+
+phase1_init() {
+ phase1_tail=
+ system=()
+ linux=()
+ public=()
+ protected=()
+ typedef=(); typedef_last=true
+ private=()
+}
+phase1_init
+phase1_flush() {
+ local b=:
+ if [[ ${#system[@]} -gt 0 ]]; then
+ printf '%s\n' "${system[@]}" | sort -u
+ b=echo
+ fi
+ if [[ ${#linux[@]} -gt 0 ]]; then
+ $b
+ printf '%s\n' "${linux[@]}"
+ b=echo
+ fi
+ if [[ ${#public[@]} -gt 0 ]]; then
+ $b
+ printf '%s\n' "${public[@]}" | sort -u
+ b=echo
+ fi
+ if [[ ${#protected[@]} -gt 0 ]]; then
+ $b
+ printf '%s\n' "${protected[@]}" | sort -u
+ b=echo
+ fi
+ if [[ ${#typedef[@]} -gt 0 ]] && ! $typedef_last; then
+ $b
+ printf '%s\n' "${typedef[@]}" | sort -u
+ b=echo
+ fi
+ if [[ ${#private[@]} -gt 0 ]]; then
+ $b
+ printf '%s\n' "${private[@]}" | sort -u
+ b=echo
+ fi
+ if [[ ${#typedef[@]} -gt 0 ]] && $typedef_last; then
+ $b
+ printf '%s\n' "${typedef[@]}"
+ fi
+ printf '%s' "$phase1_tail"
+ phase1_init
+}
+phase1() {
+ phase=phase1
+ hook=phase1_flush
+ local line="$1"
+ case "$line" in
+ '')
+ phase1_tail+=$'\n'
+ ;;
+ '#include'*)
+ phase1_tail=''
+ local re='^#include [<"]([^">]*)[">](.*)'
+ if [[ "$line" =~ $re ]]; then
+ IFS=' '
+ local buf
+ buf="$(classify "${BASH_REMATCH[1]}")" || panic
+ read -r class path <<<"$buf"
+ case "$class" in
+ system)
+ printf -v line '#include <%s>%s' "$path" "${BASH_REMATCH[2]}"
+ system+=("$line")
+ ;;
+ linux)
+ printf -v line '#include <%s>%s' "$path" "${BASH_REMATCH[2]}"
+ linux+=("$line")
+ ;;
+ public)
+ printf -v line '#include <%s>%s' "$path" "${BASH_REMATCH[2]}"
+ public+=("$line")
+ ;;
+ protected)
+ printf -v line '#include "%s"%s' "$path" "${BASH_REMATCH[2]}"
+ protected+=("$line")
+ ;;
+ private)
+ if [[ ${#typedef[@]} -gt 0 ]]; then
+ typedef_last=false
+ fi
+ printf -v line '#include "%s"%s' "$path" "${BASH_REMATCH[2]}"
+ private+=("$line")
+ ;;
+ esac
+ else
+ panic
+ fi
+ ;;
+ 'typedef '*';')
+ phase1_tail=''
+ typedef+=("$line")
+ ;;
+ *)
+ phase1_flush
+ phase0 "$line"
+ ;;
+ esac
+}
+
+main() {
+ current_file="$1"
+ printf ' => %q %q\n' "$0" "$current_file"
+ set -o pipefail
+ trap 'rm -f -- "$current_file.tmp"' EXIT
+ {
+ IFS=''
+ while read -r line; do
+ "$phase" "$line"
+ IFS=''
+ done
+ "$hook"
+ } < "$current_file" > "$current_file.tmp"
+ # I specificially don't use write-ifchanged because I don't want the
+ # temporary file to have the .c suffix.
+ if cmp -s "$current_file.tmp" "$current_file"; then
+ rm -f "$current_file.tmp" || :
+ else
+ mv -Tf "$current_file.tmp" "$current_file"
+ fi
+}
+
+main "$@"
diff --git a/tools/notsd-move b/tools/notsd-move
new file mode 100755
index 0000000000..0e8cc0dd87
--- /dev/null
+++ b/tools/notsd-move
@@ -0,0 +1,822 @@
+#!/usr/bin/env bash
+
+in_array() (
+ set +x
+ local needle=$1; shift
+ local item
+ for item in "$@"; do
+ [[ $item = $needle ]] && return 0 # Found
+ done
+ return 1 # Not Found
+)
+
+split_lib() {
+ local d=$1
+
+ local t=("$d"/test-*)
+ if [[ -f ${t[0]} ]]; then
+ mkdir "$d/test"
+ mv "$d"/test-* -t "$d/test"
+ fi
+
+ mkdir "$d/src"
+ mv "$d"/*.c -t "$d/src"
+
+ local h=${d##*/lib}
+ mkdir "$d/include"
+ mkdir "$d/include/$h"
+ mv "$d"/*.h -t "$d/include/$h"
+}
+
+grp() {
+ local grp=$1
+ shift
+ if [[ -d "${grp}.d" ]]; then
+ mv -T "${grp}.d" "$grp"
+ else
+ mkdir "$grp"
+ fi
+ mv "$@" -t "$grp"
+}
+
+move_files() (
+ # first focus on getting directories to the right names.
+ mv -T src/{,systemd-}dbus1-generator
+ mv -T src/{,systemd-}debug-generator
+ mv -T src/{,systemd-}fstab-generator
+ mv -T src/{,systemd-}getty-generator
+ mv -T src/{,systemd-}gpt-auto-generator
+ mv -T src/{,systemd-}rc-local-generator
+ mv -T src/{,systemd-}system-update-generator
+ mv -T src/{,systemd-}sysv-generator
+
+ mv -T src/{,systemd-}ac-power
+ mv -T src/{,systemd-}analyze
+ mv -T src/{,systemd-}ask-password
+ mv -T src/{,systemd-}backlight
+ mv -T src/{,systemd-}binfmt
+ mv -T src/{,systemd-}cgls
+ mv -T src/{,systemd-}cgroups-agent
+ mv -T src/{,systemd-}cgtop
+ mv -T src/{,systemd-}cryptsetup
+ mv -T src/{,systemd-}delta
+ mv -T src/{,systemd-}detect-virt
+ mv -T src/{,systemd-}escape
+ mv -T src/{,systemd-}firstboot
+ mv -T src/{,systemd-}fsck
+ mv -T src/{,systemd-}hibernate-resume
+ mv -T src/{,systemd-}hwdb
+ mv -T src/{,systemd-}initctl
+ mv -T src/{,systemd-}machine-id-setup
+ mv -T src/{,systemd-}modules-load
+ mv -T src/{,systemd-}notify
+ mv -T src/{,systemd-}nspawn
+ mv -T src/{,systemd-}path
+ mv -T src/{,systemd-}quotacheck
+ mv -T src/{,systemd-}random-seed
+ mv -T src/{,systemd-}remount-fs
+ mv -T src/{,systemd-}reply-password
+ mv -T src/{,systemd-}rfkill
+ mv -T src/{,systemd-}run
+ mv -T src/{,systemd-}sleep
+ mv -T src/{,systemd-}stdio-bridge
+ mv -T src/{,systemd-}sysctl
+ mv -T src/{,systemd-}sysusers
+ mv -T src/{,systemd-}tmpfiles
+ mv -T src/{,systemd-}tty-ask-password-agent
+ mv -T src/{,systemd-}update-done
+ mv -T src/{,systemd-}update-utmp
+ mv -T src/{,systemd-}user-sessions
+ mv -T src/vconsole src/systemd-vconsole-setup
+ mv -T src/socket-proxy src/systemd-socket-proxyd
+ mv -T src/timesync src/systemd-timesyncd
+ mv -T src/activate src/systemd-socket-activate
+
+ mv src/udev/*_id -t src
+ mv src/udev/mtd_probe -t src
+ mv src/udev/collect -t src
+
+ mv -T src/boot/efi src/systemd-boot
+ mv -T src/boot src/bootctl
+
+ mkdir src/libsystemd/src
+ mv -t src/libsystemd/src src/libsystemd/sd-*
+ mkdir src/libsystemd/include
+ mv -T src/systemd src/libsystemd/include/systemd
+
+ mkdir src/busctl
+ mv src/libsystemd/src/sd-bus/busctl* -t src/busctl
+
+ mkdir src/systemd
+ mv -t src/systemd \
+ src/core/main* \
+ src/core/*systemd* \
+ src/core/system.conf \
+ src/core/user.conf
+ mkdir src/systemd-shutdown
+ mv -t src/systemd-shutdown \
+ src/core/shutdown* \
+ src/core/umount*
+ mv -T src/{,lib}core
+
+ mv -T src/{,lib}basic
+ mv -T src/{,lib}shared
+
+ mv -T src/lib{shared,core}/linux
+
+ mkdir src/libfirewall
+ mv -T src/lib{shared,firewall}/firewall-util.c
+ mv -T src/lib{shared,firewall}/firewall-util.h
+
+ split_lib src/libbasic
+ split_lib src/libsystemd-network
+
+ split_lib src/libshared
+ mv src/libshared/{test,include/shared}/test-tables.h
+ rmdir src/libshared/test
+
+ mkdir src/systemd-hibernate-resume-generator
+ mv -t src/systemd-hibernate-resume-generator \
+ src/systemd-hibernate-resume/*generator*
+
+ # src/resolve => src/{libbasic-dns,resolve,resolved}
+ mkdir src/libbasic-dns
+ mv -t src/libbasic-dns \
+ src/resolve/dns-type.{c,h} \
+ src/resolve/resolved-dns-{answer,dnssec,packet,question,rr}.{c,h} \
+ src/resolve/test-*
+ mkdir src/systemd-resolve
+ mv -t src/systemd-resolve \
+ src/resolve/resolve-tool.c
+ mkdir src/systemd-resolved
+ mv -t src/systemd-resolved \
+ src/resolve/.gitignore \
+ src/resolve/*
+ rmdir src/resolve
+
+ # src/import => src/{libimport,systemd-{export,importd,import}}
+ mkdir src/libimport
+ mv -t src/libimport \
+ src/import/import-common.{c,h} \
+ src/import/import-compress.{c,h} \
+ src/import/qcow2-util.{c,h} \
+ src/import/test-qcow2.c
+ mkdir src/systemd-export
+ mv -t src/systemd-export \
+ src/import/export*
+ mkdir src/systemd-importd
+ mv -t src/systemd-importd \
+ src/import/.gitignore \
+ src/import/importd.c \
+ src/import/org.*
+ mkdir src/systemd-import
+ mv -t src/systemd-import \
+ src/import/import*
+ mkdir src/systemd-pull
+ mv -t src/systemd-pull \
+ src/import/pull* \
+ src/import/curl-util*
+ rmdir src/import
+
+ # src/journal => src/..
+ mkdir src/libjournal-core
+ mv -t src/libjournal-core \
+ src/journal/.gitignore \
+ src/journal/journald-* \
+ src/journal/test-*
+ mkdir src/systemd-cat
+ mv -t src/systemd-cat \
+ src/journal/cat.c
+ mkdir src/journalctl
+ mv -t src/journalctl \
+ src/journal/journal-qrcode.{c,h} \
+ src/journal/journalctl.c
+ mkdir src/systemd-journald
+ mv -t src/systemd-journald \
+ src/journal/journald.*
+ mkdir src/libsystemd/src/sd-journal
+ mv -t src/libsystemd/src/sd-journal \
+ src/journal/audit-type.c \
+ src/journal/audit-type.h \
+ src/journal/catalog.c \
+ src/journal/catalog.h \
+ src/journal/compress.c \
+ src/journal/compress.h \
+ src/journal/fsprg.c \
+ src/journal/fsprg.h \
+ src/journal/journal-authenticate.c \
+ src/journal/journal-authenticate.h \
+ src/journal/journal-def.h \
+ src/journal/journal-file.c \
+ src/journal/journal-file.h \
+ src/journal/journal-internal.h \
+ src/journal/journal-send.c \
+ src/journal/journal-vacuum.c \
+ src/journal/journal-vacuum.h \
+ src/journal/journal-verify.c \
+ src/journal/journal-verify.h \
+ src/journal/lookup3.c \
+ src/journal/lookup3.h \
+ src/journal/mmap-cache.c \
+ src/journal/mmap-cache.h \
+ src/journal/sd-journal.c
+ rmdir src/journal
+
+ # src/network => src/...
+ mkdir src/systemd-networkd-wait-online
+ mv -t src/systemd-networkd-wait-online \
+ src/network/networkd-wait-online*
+ mkdir src/libnetworkd-core
+ mv -t src/libnetworkd-core \
+ src/network/.gitignore \
+ src/network/networkd-*
+ mkdir src/networkctl
+ mv -t src/networkctl \
+ src/network/networkctl.c
+ mkdir src/systemd-networkd
+ mv -t src/systemd-networkd \
+ src/network/networkd* \
+ src/network/org.*
+ mkdir src/grp-network.d
+ mv -t src/grp-network.d \
+ src/network/test-*
+ rmdir src/network
+
+ # src/machine => src/{machinectl,systemd-machined}
+ mkdir src/machinectl
+ mv -t src/machinectl \
+ src/machine/machinectl*
+ mkdir src/systemd-machined
+ mv -t src/systemd-machined \
+ src/machine/.gitignore \
+ src/machine/*
+ rmdir src/machine
+
+ # src/coredump => src/{coredumpctl,systemd-coredump}
+ mkdir src/coredumpctl
+ mv -t src/coredumpctl \
+ src/coredump/coredumpctl*
+ mkdir src/systemd-coredump
+ mv -t src/systemd-coredump \
+ src/coredump/*
+ rmdir src/coredump
+
+ # src/hostname => src/{hostnamectl,systemd-hostnamed}
+ mkdir src/hostnamectl
+ mv -t src/hostnamectl \
+ src/hostname/hostnamectl*
+ mkdir src/systemd-hostnamed
+ mv -t src/systemd-hostnamed \
+ src/hostname/.gitignore \
+ src/hostname/*
+ rmdir src/hostname
+
+ # src/journal-remote => src/...
+ mkdir src/systemd-journal-gatewayd
+ mv -t src/systemd-journal-gatewayd \
+ src/journal-remote/journal-gateway*
+ mkdir src/systemd-journal-remote
+ mv -t src/systemd-journal-remote \
+ src/journal-remote/journal-remote*
+ mkdir src/systemd-journal-upload
+ mv -t src/systemd-journal-upload \
+ src/journal-remote/journal-upload*
+ mkdir src/grp-remote.d
+ mv -t src/grp-remote.d \
+ src/journal-remote/.gitignore \
+ src/journal-remote/browse.html \
+ src/journal-remote/log-generator.py \
+ src/journal-remote/microhttpd*
+ rmdir src/journal-remote
+
+ # src/locale => src/...
+ mkdir src/localectl
+ mv -t src/localectl \
+ src/locale/localectl*
+ mkdir src/systemd-localed
+ mv -t src/systemd-localed \
+ src/locale/.gitignore \
+ src/locale/*
+ rmdir src/locale
+
+ # src/login => src/...
+ mkdir src/grp-login.d
+ mv -t src/grp-login.d \
+ src/login/.gitignore \
+ src/login/test-*
+ mkdir src/loginctl
+ mv -t src/loginctl \
+ src/login/loginctl* \
+ src/login/sysfs-show*
+ mkdir src/pam_systemd
+ mv -t src/pam_systemd \
+ src/login/pam*
+ mkdir src/systemd-inhibit
+ mv -t src/systemd-inhibit \
+ src/login/inhibit*
+ mkdir src/systemd-logind
+ mv -t src/systemd-logind \
+ src/login/logind* \
+ src/login/*.rules \
+ src/login/*.rules.in \
+ src/login/org.*
+ mv -T src/login/systemd-user.m4 src/systemd-logind/systemd-user.pam.m4
+ rmdir src/login
+
+ # src/timedate => src/...
+ mkdir src/timedatectl
+ mv -t src/timedatectl \
+ src/timedate/timedatectl*
+ mkdir src/systemd-timedated
+ mv -t src/systemd-timedated \
+ src/timedate/.gitignore \
+ src/timedate/timedated* \
+ src/timedate/org.*
+ rmdir src/timedate
+
+ # src/udev => src/...
+ mv -T src/udev/udev.h src/libudev/udev.h
+ mkdir src/udevadm
+ mv -t src/udevadm \
+ src/udev/udevadm*
+ mkdir src/libudev-core
+ mv -t src/libudev-core \
+ src/udev/net \
+ src/udev/udev-*
+ mkdir src/systemd-udevd
+ mv -t src/systemd-udevd \
+ src/udev/udev.conf* \
+ src/udev/udevd*
+ mkdir src/grp-udev.d
+ mv -t src/grp-udev.d \
+ src/udev/.gitignore \
+ src/udev/udev.*
+ rm src/udev/.vimrc
+ rmdir src/udev
+
+ # .conf is such a useless suffix
+ for ext in sysctl sysusers tmpfiles; do
+ for file in $ext.d/*.conf*; do
+ mv -T "$file" "${file/.conf/.$ext}"
+ done
+ done
+ for ext in xorg; do
+ for file in $ext/*.sh*; do
+ mv -T "$file" "${file/.sh/.$ext}"
+ done
+ done
+
+ # less obvious manpage groups
+ mv -T man/{glib-event-glue,sd_event_get_fd-glib-example}.c
+ mv -T man/systemd-{halt.service,shutdown}.xml
+ mv -T man/systemd-{suspend.service,sleep}.xml
+ mv -t src/libsystemd \
+ man/libsystemd* \
+ man/sd*
+ mv -t src/libudev \
+ man/udev_*
+ mkdir src/manpages
+ mv -t src/manpages \
+ man/daemon.xml \
+ man/file-hierarchy.xml \
+ man/hostname.xml \
+ man/locale.conf.xml \
+ man/localtime.xml \
+ man/machine-id.xml \
+ man/machine-info.xml \
+ man/os-release.xml
+ mv -t src/systemctl \
+ man/halt.xml \
+ man/runlevel.xml \
+ man/shutdown.xml \
+ man/telinit.xml \
+ man/systemd.preset.xml
+ mv -t src/systemd \
+ man/systemd-system.conf.xml
+ mkdir src/grp-system.d
+ mv -t src/grp-system.d \
+ man/bootup.xml \
+ man/kernel-command-line.xml
+ mv -t src/systemd-udevd \
+ man/udev.conf.xml
+ mv -t src/grp-udev.d \
+ man/udev.xml
+ mv -t src/systemd-cryptsetup \
+ man/*crypt*
+ mv -t src/systemd-machine-id-setup \
+ man/systemd-machine-id*
+ mv -t src/systemd-path src/libsystemd/include/systemd/sd-path*
+ mv -t src/systemd-path src/libsystemd/src/sd-path/*
+ rmdir src/libsystemd/src/sd-path
+ mv -t src/systemd-resolved \
+ man/dnssec-trust-anchors*
+ mv -t src/systemd-tty-ask-password-agent \
+ man/systemd-ask-password-console*
+
+ # less obvious unit groups
+ # suffix these with '*' in case they gain or lose the .in suffix.
+ for thing in hibernate hybrid-sleep suspend; do
+ mv -t src/systemd-sleep \
+ units/"$thing".target* \
+ units/systemd-"$thing".service*
+ done
+ for thing in halt kexec poweroff reboot; do
+ mv -t src/systemd-shutdown \
+ units/"$thing".target* \
+ units/systemd-"$thing".service*
+ done
+ mv -t src/systemd-binfmt \
+ units/*binfmt*
+ mv -t src/systemd-modules-load \
+ units/kmod*
+ mv -t src/systemd-quotacheck \
+ units/quota*
+ mv -t src/systemd-journald \
+ units/*journald*
+ mv -t src/systemd-cryptsetup \
+ units/cryptsetup*
+ mv -t src/systemd-logind \
+ units/user.slice*
+ mv -t src/systemd-machined \
+ units/machine.slice*
+
+ # muck
+ mv -t src/libbasic/include/basic src/libbasic/.gitignore
+ mv -T {test,src/systemd-boot}/test-efi-create-disk.sh
+ mv -t src/systemd-tmpfiles units/systemd-tmpfiles*
+ mv -t src/systemd-tmpfiles \
+ tmpfiles.d/tmp.* \
+ tmpfiles.d/var.* \
+ tmpfiles.d/etc.* \
+ tmpfiles.d/home.* \
+ tmpfiles.d/*nologin* \
+ tmpfiles.d/legacy.* \
+ tmpfiles.d/x11.*
+ mv -t src/systemd-sysusers \
+ sysusers.d/.gitignore \
+ sysusers.d/basic*
+ mkdir src/libudev/src
+ mv -t src/libudev/src src/libudev/*.{c,h}
+ mkdir src/libudev/include
+ mv -T src/libudev/{src,include}/libudev.h
+ mv -T src/{systemd-networkd,libnetworkd-core}/networkd.h
+ mv -T src/{systemd-resolved,libbasic-dns}/resolved-def.h
+ mv -t src/cdrom_id rules/*cdrom*
+ mv -t src/mtd_probe rules/*mtd*
+ mv -t src/v4l_id rules/*v4l*
+ mv -t src/libsystemd-network/include/systemd-network \
+ src/libsystemd/include/systemd/sd-dhcp* \
+ src/libsystemd/include/systemd/sd-ipv4* \
+ src/libsystemd/include/systemd/sd-lldp* \
+ src/libsystemd/include/systemd/sd-ndisc*
+ for l in device hwdb netlink network resolve; do
+ mv -T src/libsystemd/include/systemd/sd-$l.h src/libsystemd/src/sd-$l/sd-$l.h
+ done
+ mkdir src/grp-journal.d
+ mv -t src/grp-journal.d tmpfiles.d/journal-nocow.*
+ mv -t src/grp-remote.d tmpfiles.d/systemd-remote.*
+ mv -t src/systemd tmpfiles.d/systemd-tmpfs.tmpfiles*
+ mv -t src/systemd xorg/??-systemd-user.*; rmdir xorg
+ mv -t src/systemd-vconsole-setup man/vconsole.conf.xml
+ mv -t src/systemd-coredump \
+ sysctl.d/*coredump*
+ mv -t src/systemd-sysctl \
+ sysctl.d/??-default.*
+
+ mv -t src/systemd-sysv-generator \
+ docs/sysvinit/.gitignore \
+ docs/sysvinit/*
+ rmdir docs/sysvinit
+ mv -t src/grp-journal.d \
+ docs/var-log/.gitignore \
+ docs/var-log/*
+ rmdir docs/var-log
+ rm docs/.gitignore
+ rmdir docs
+
+ # auto-distribute the stuff
+ for d in man units sysusers.d tmpfiles.d; do
+ pushd $d >/dev/null
+ for file in *; do
+ base=${file%%.*}
+ base=${base%%@*}
+ if [[ -d ../src/"${base}" ]]; then
+ mv "$file" -t ../src/"${base}"
+ elif [[ -d ../src/"${base#systemd-}" ]]; then
+ mv "$file" -t ../src/"${base#systemd-}"
+ elif [[ -d ../src/systemd-"${base}" ]]; then
+ mv "$file" -t ../src/systemd-"${base}"
+ fi
+ done
+ popd >/dev/null
+ done
+ rmdir sysusers.d #tmpfiles.d
+
+ pushd shell-completion/bash >/dev/null
+ mv -T systemctl.in ../../src/systemctl/systemctl.completion.bash.in
+ cat .gitignore >> ../../src/systemctl/.gitignore
+ rm .gitignore
+ for file in *; do
+ if [[ -d ../../src/"$file" ]]; then
+ mv -T "$file" "../../src/$file/$file.completion.bash"
+ fi
+ done
+ popd >/dev/null
+ rmdir shell-completion/bash
+
+ pushd shell-completion/zsh >/dev/null
+ mv -T _systemctl.in ../../src/systemctl/systemctl.completion.zsh.in
+ cat .gitignore >> ../../src/systemctl/.gitignore
+ rm .gitignore
+ for file in _*; do
+ if [[ -d ../../src/"${file#_}" ]]; then
+ mv -T "$file" "../../src/${file#_}/${file#_}.completion.zsh"
+ fi
+ done
+ popd >/dev/null
+ mv -T shell-completion/zsh src/zsh-completion
+ rmdir shell-completion
+
+ # do this *after* auto-splitting, because of
+ # systemd-journal-{gatewayd,remote,upload}.
+ mv -t src/journalctl \
+ units/*journal*
+ # fix a false positive
+ mv -t units \
+ src/systemd-shutdown/shutdown.target
+
+ # categorize
+ grp src/grp-boot \
+ src/bootctl \
+ src/kernel-install \
+ src/systemd-boot
+ grp src/grp-coredump \
+ src/coredumpctl \
+ src/systemd-coredump
+ grp src/grp-hostname \
+ src/hostnamectl \
+ src/systemd-hostnamed
+ grp src/grp-initprogs \
+ src/systemd-backlight \
+ src/systemd-binfmt \
+ src/systemd-detect-virt \
+ src/systemd-firstboot \
+ src/systemd-fsck \
+ src/systemd-modules-load \
+ src/systemd-quotacheck \
+ src/systemd-random-seed \
+ src/systemd-rfkill \
+ src/systemd-sysctl \
+ src/systemd-sysusers \
+ src/systemd-tmpfiles \
+ src/systemd-update-done \
+ src/systemd-update-utmp \
+ src/systemd-user-sessions \
+ src/systemd-vconsole-setup
+ grp src/grp-initprogs/grp-sleep \
+ src/systemd-hibernate-resume \
+ src/systemd-hibernate-resume-generator \
+ src/systemd-sleep
+ grp src/grp-remote \
+ src/systemd-journal-gatewayd \
+ src/systemd-journal-remote \
+ src/systemd-journal-upload
+ grp src/grp-journal \
+ catalog \
+ src/grp-remote \
+ src/journalctl \
+ src/libjournal-core \
+ src/systemd-cat \
+ src/systemd-journald
+ grp src/grp-locale \
+ src/localectl \
+ src/systemd-localed
+ grp src/grp-login \
+ src/loginctl \
+ src/pam_systemd \
+ src/systemd-inhibit \
+ src/systemd-logind
+ grp src/grp-machine \
+ src/machinectl \
+ src/nss-mymachines \
+ src/systemd-machined
+ grp src/grp-machine/grp-import \
+ src/libimport \
+ src/systemd-export \
+ src/systemd-import \
+ src/systemd-importd \
+ src/systemd-pull
+ grp src/grp-network \
+ network \
+ src/libnetworkd-core \
+ src/networkctl \
+ src/systemd-networkd \
+ src/systemd-networkd-wait-online
+ grp src/grp-resolve \
+ src/libbasic-dns \
+ src/nss-resolve \
+ src/systemd-resolve \
+ src/systemd-resolved
+ grp src/grp-system \
+ src/libcore \
+ src/systemctl \
+ src/systemd \
+ src/systemd-shutdown
+ grp src/grp-system/grp-utils \
+ src/systemd-analyze \
+ src/systemd-delta \
+ src/systemd-fstab-generator \
+ src/systemd-run \
+ src/systemd-sysv-generator
+ grp src/grp-timedate \
+ src/systemd-timedated \
+ src/timedatectl
+ grp src/grp-udev \
+ rules \
+ hwdb \
+ src/libudev-core \
+ src/*_id \
+ src/collect \
+ src/mtd_probe \
+ src/systemd-hwdb \
+ src/systemd-udevd \
+ src/udevadm
+ grp src/grp-utils \
+ src/systemd-ac-power \
+ src/systemd-escape \
+ src/systemd-notify \
+ src/systemd-path \
+ src/systemd-socket-activate
+
+ mv -t src/systemd-timesyncd system-preset/??-timesyncd.preset
+ for file in system-preset/??-*.preset; do
+ base="${file##*/??-}"
+ base="${base%.preset}"
+ base="${base%d}"
+ mv -t src/grp-"$base" "$file"
+ done
+ rmdir system-preset
+)
+
+breakup_makefile() (
+ mkdir -p build-aux/Makefile.{once,each}.{head,tail}
+
+ touch .tmp.move.all
+ files=(.tmp.move.all)
+ file=/dev/null
+ IFS=''
+ declare -i i=0
+ trap 'printf "Makefile.am:%d:%s\n" $i "$line"' EXIT
+ while read -r line; do
+ i+=1
+ if [[ $line = '#@'* ]]; then
+ file="${line#'#@'}"
+ file="${file%% *}"
+ if [[ $file = auto/* ]]; then
+ IFS=/
+ read -r auto dir makefile <<<"$file"
+ IFS=''
+ [[ $auto = auto ]]
+ [[ $makefile = Makefile ]]
+ d="$(find src -type d -name "$dir")"
+ [[ -n "$d" ]]
+ [[ "$(wc -l <<<"$d")" = 1 ]]
+ file="$d/Makefile"
+ fi
+ if [[ "$file" != all ]] && ! in_array "$file" "${files[@]}"; then
+ cat .tmp.move.all > "$file"
+ files+=("$file")
+ fi
+ elif [[ $file = all ]]; then
+ printf '%s\n' "$line" | tee -a "${files[@]}" >/dev/null
+ else
+ printf '%s\n' "$line" >> "$file"
+ fi
+ done < <(fixup_makefile <Makefile.am)
+ trap -- EXIT
+ rm .tmp.move.all
+
+ sed -ri \
+ -e '/^ \$\(AM_V_at\)\$\(MKDIR_P\) \$\(dir \$@\)/d' \
+ -e 's/ \$\(CFLAGS\) / /g' \
+ -e 's/ \$\(CPPFLAGS\) / /g' \
+ -e 's/ \$\(AM_CPPFLAGS\) / $(sd.ALL_CPPFLAGS) /g' \
+ -e '/^[^# ]*:/ { s|\S+/|$(outdir)/|g }' \
+ src/libbasic/include/basic/Makefile \
+ src/libsystemd/src/Makefile \
+ src/libsystemd/src/sd-journal/Makefile \
+ src/grp-udev/libudev-core/Makefile
+
+ ln -sT ../grp-system/libcore/mount-setup.h src/systemd-remount-fs/mount-setup.h
+ ln -sT ../grp-system/libcore/mount-setup.c src/systemd-remount-fs/mount-setup.c
+ ln -sT ../libcore/mount-setup.h src/grp-system/systemd-shutdown/mount-setup.h
+ ln -sT ../libcore/mount-setup.c src/grp-system/systemd-shutdown/mount-setup.c
+ ln -sT ../libcore/killall.h src/grp-system/systemd-shutdown/killall.h
+ ln -sT ../libcore/killall.c src/grp-system/systemd-shutdown/killall.c
+ ln -sT ../../libcore/mount-setup.h src/grp-system/grp-utils/systemd-fstab-generator/mount-setup.h
+ ln -sT ../../libcore/mount-setup.c src/grp-system/grp-utils/systemd-fstab-generator/mount-setup.c
+ ln -sT ../grp-system/libcore/mount-setup.h src/systemd-nspawn/mount-setup.h
+ ln -sT ../grp-system/libcore/loopback-setup.h src/systemd-nspawn/loopback-setup.h
+ ln -sT ../grp-system/libcore/loopback-setup.c src/systemd-nspawn/loopback-setup.c
+ ln -sT ../grp-system/libcore/machine-id-setup.h src/systemd-nspawn/machine-id-setup.h
+ ln -sT ../grp-system/libcore/machine-id-setup.c src/systemd-nspawn/machine-id-setup.c
+ ln -sT ../grp-system/libcore/mount-setup.c src/systemd-nspawn/mount-setup.c
+ ln -sT ../../../libsystemd/include/systemd/_sd-common.h src/libsystemd-network/include/systemd-network/_sd-common.h
+ ln -sT ../../libsystemd/include/systemd/_sd-common.h src/grp-utils/systemd-path/_sd-common.h
+ ln -sT ../../grp-login/systemd-logind/logind-acl.h src/grp-udev/libudev-core/logind-acl.h
+ ln -sT ../../libsystemd/src/sd-login/sd-login.c src/grp-udev/libudev-core/sd-login.c
+ ln -sT ../../grp-login/systemd-logind/logind-acl.c src/grp-udev/libudev-core/logind-acl.c
+ ln -sT ../../../libshared/include/shared/gcrypt-util.h src/libsystemd/src/sd-journal/gcrypt-util.h
+ ln -sT ../../../libshared/src/gcrypt-util.c src/libsystemd/src/sd-journal/gcrypt-util.c
+ ln -sT ../grp-system/libcore/machine-id-setup.h src/systemd-machine-id-setup/machine-id-setup.h
+ ln -sT ../grp-system/libcore/machine-id-setup.c src/systemd-machine-id-setup/machine-id-setup.c
+
+ ln -sT ../subdir.mk src/libsystemd/src/sd-network/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-bus/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-event/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-login/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-resolve/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-daemon/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-netlink/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-id128/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-hwdb/Makefile
+ ln -sT ../subdir.mk src/libsystemd/src/sd-device/Makefile
+)
+
+fixup_makefile() {
+ sed -r \
+ -e '/^[^# ]*:/ { s|^(\s*)\S+/|\1$(outdir)/| }' \
+ -e 's|^if (.*)|ifneq ($(\1),)|' \
+ -e 's|--version-script=.*/([^/]+)\.sym|--version-script=$(srcdir)/\1.sym|g'
+}
+
+breakup_zshcompletion() (
+ sed_expr='
+ 1 {
+ i #compdef %s
+ d
+ }
+ /^case/,/^esac/ {
+ /^ %s)/,/^ ;;/ {
+ s/^ //p
+ }
+ d
+ }
+ '
+
+ cd shell-completion/zsh
+ read -r _ cmds < _systemd
+ for cmd in $cmds; do
+ printf -v cmd_sed_expr "$sed_expr" $cmd $cmd
+ sed -e "$cmd_sed_expr" < _systemd > _$cmd
+ done
+ rm _systemd
+)
+
+run() (
+ local tmp
+ tmp="$(mktemp --tmpdir)"
+ trap 'rm -f -- "$tmp"' EXIT
+ "$0" "$@" |& tail -n20 > "$tmp" || { r=$?; cat "$tmp"; return $r; }
+ return 0
+)
+
+move() (
+ find . \( -name Makefile -o -name '*.mk' \) -delete
+
+ >&2 echo ' => breakup_zshcompletion'
+ run breakup_zshcompletion
+ >&2 echo ' => move_files'
+ run move_files
+ >&2 echo ' => breakup_makefile'
+ run breakup_makefile
+ >&2 echo ' => ./tools/notsd-fixup'
+ ./tools/notsd-fixup
+)
+
+main() {
+ if [[ -n "$(git status -s)" ]] || [[ -n "$(git clean -xdn)" ]]; then
+ echo 'There are changes in the current directory.' >&2
+ exit 1
+ fi
+
+ git checkout -b tmp/postmove
+
+ move
+
+ git add .
+ git commit -m './tools/notsd-move'
+ git merge -s ours notsystemd/postmove
+ git checkout notsystemd/postmove
+ git merge tmp/postmove
+ git branch -d tmp/postmove
+}
+
+set -e
+set -o pipefail
+if [[ $# -gt 0 ]]; then
+ set -x;
+else
+ set -- main
+fi
+"$@"
diff --git a/tools/notsd-reset b/tools/notsd-reset
new file mode 100755
index 0000000000..d7141587fa
--- /dev/null
+++ b/tools/notsd-reset
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+set -e
+git checkout notsystemd/premove
+git branch -D tmp/postmove || true
+git checkout .
+git clean -xdf
diff --git a/tools/test-header.c b/tools/test-header.c
new file mode 100644
index 0000000000..76e8197013
--- /dev/null
+++ b/tools/test-header.c
@@ -0,0 +1 @@
+int main() { return 0; }
diff --git a/tools/test-header.sh b/tools/test-header.sh
new file mode 100755
index 0000000000..b11285af7d
--- /dev/null
+++ b/tools/test-header.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+gcc -c -o /dev/null -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/libmount $(find src -type d |sed 's|^|-I&|') -include ./config.h -include "$(realpath -- "$1")" test-header.c