summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-09-10 22:26:51 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-09-10 22:26:51 -0400
commit0177890f6369c0cb601e1d60cd5722048d34bead (patch)
treebb27f50c24628a3bf42beaea029430fe86264af4
parent8d9cbc9d33dede2f75d24888dda2066f97ef8129 (diff)
parenta1ec5efa1f66fc7123ff89ab2bac42f6a0e874d5 (diff)
Merge branch 'notsystemd/postmove' into notsystemd/master
-rw-r--r--Makefile.am315
-rw-r--r--tools/make-man-rules.py27
-rwxr-xr-xtools/notsd-find-includes52
-rwxr-xr-xtools/notsd-fixup25
-rwxr-xr-xtools/notsd-fixup--includes215
-rwxr-xr-xtools/notsd-move781
-rwxr-xr-xtools/notsd-reset6
-rw-r--r--tools/xml_helper.py7
8 files changed, 1253 insertions, 175 deletions
diff --git a/Makefile.am b/Makefile.am
index 46c6497ffc..fbdd1a75c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -411,39 +411,39 @@ INTLTOOL_V_MERGE_ = $(INTLTOOL_V_MERGE_$(AM_DEFAULT_VERBOSITY))
INTLTOOL_V_MERGE_0 = @echo " ITMRG " $@;
INTLTOOL_V_MERGE_1 =
-#@src/grp-system/systemctl/Makefile
+#@auto/systemctl/Makefile
rootbin_PROGRAMS += systemctl
-#@src/systemd-notify/Makefile
+#@auto/systemd-notify/Makefile
rootbin_PROGRAMS += systemd-notify
-#@src/systemd-ask-password/Makefile
+#@auto/systemd-ask-password/Makefile
rootbin_PROGRAMS += systemd-ask-password
-#@src/systemd-tty-ask-password-agent/Makefile
+#@auto/systemd-tty-ask-password-agent/Makefile
rootbin_PROGRAMS += systemd-tty-ask-password-agent
-#@src/systemd-machine-id-setup/Makefile
+#@auto/systemd-machine-id-setup/Makefile
rootbin_PROGRAMS += systemd-machine-id-setup
-#@src/systemd-escape/Makefile
+#@auto/systemd-escape/Makefile
rootbin_PROGRAMS += systemd-escape
-#@src/systemd-cgls/Makefile
+#@auto/systemd-cgls/Makefile
bin_PROGRAMS += systemd-cgls
-#@src/systemd-cgtop/Makefile
+#@auto/systemd-cgtop/Makefile
bin_PROGRAMS += systemd-cgtop
-#@src/systemd-nspawn/Makefile
+#@auto/systemd-nspawn/Makefile
bin_PROGRAMS += systemd-nspawn
-#@src/grp-helperunits/systemd-detect-virt/Makefile
+#@auto/systemd-detect-virt/Makefile
bin_PROGRAMS += systemd-detect-virt
-#@src/systemd-delta/Makefile
+#@auto/systemd-delta/Makefile
bin_PROGRAMS += systemd-delta
-#@src/systemd-analyze/Makefile
+#@auto/systemd-analyze/Makefile
bin_PROGRAMS += systemd-analyze
-#@src/systemd-run/Makefile
+#@auto/systemd-run/Makefile
bin_PROGRAMS += systemd-run
-#@src/systemd-stdio-bridge/Makefile
+#@auto/systemd-stdio-bridge/Makefile
bin_PROGRAMS += systemd-stdio-bridge
-#@src/systemd-path/Makefile
+#@auto/systemd-path/Makefile
bin_PROGRAMS += systemd-path
-#@src/kernel-install/Makefile
+#@auto/kernel-install/Makefile
dist_bin_SCRIPTS = \
src/kernel-install/kernel-install
@@ -453,42 +453,42 @@ dist_kernelinstall_SCRIPTS = \
#@src/grp-system/systemd/Makefile
rootlibexec_PROGRAMS += systemd
-#@src/systemd-cgroups-agent/Makefile
+#@auto/systemd-cgroups-agent/Makefile
rootlibexec_PROGRAMS += systemd-cgroups-agent
-#@src/systemd-initctl/Makefile
+#@auto/systemd-initctl/Makefile
rootlibexec_PROGRAMS += systemd-initctl
-#@src/systemd-shutdown/Makefile
+#@auto/systemd-shutdown/Makefile
rootlibexec_PROGRAMS += systemd-shutdown
-#@src/systemd-remount-fs/Makefile
+#@auto/systemd-remount-fs/Makefile
rootlibexec_PROGRAMS += systemd-remount-fs
-#@src/systemd-reply-password/Makefile
+#@auto/systemd-reply-password/Makefile
rootlibexec_PROGRAMS += systemd-reply-password
-#@src/systemd-fsck/Makefile
+#@auto/systemd-fsck/Makefile
rootlibexec_PROGRAMS += systemd-fsck
-#@src/systemd-ac-power/Makefile
+#@auto/systemd-ac-power/Makefile
rootlibexec_PROGRAMS += systemd-ac-power
-#@src/systemd-sysctl/Makefile
+#@auto/systemd-sysctl/Makefile
rootlibexec_PROGRAMS += systemd-sysctl
-#@src/grp-helperunits/systemd-sleep/Makefile
+#@auto/systemd-sleep/Makefile
rootlibexec_PROGRAMS += systemd-sleep
-#@src/systemd-socket-proxyd/Makefile
+#@auto/systemd-socket-proxyd/Makefile
rootlibexec_PROGRAMS += systemd-socket-proxyd
-#@src/systemd-update-done/Makefile
+#@auto/systemd-update-done/Makefile
rootlibexec_PROGRAMS += systemd-update-done
-#@src/systemd-update-utmp/Makefile
+#@auto/systemd-update-utmp/Makefile
if HAVE_UTMP
rootlibexec_PROGRAMS += \
systemd-update-utmp
endif # HAVE_UTMP
-#@src/systemd-getty-generator/Makefile
+#@auto/systemd-getty-generator/Makefile
systemgenerator_PROGRAMS += systemd-getty-generator
-#@src/systemd-fstab-generator/Makefile
+#@auto/systemd-fstab-generator/Makefile
systemgenerator_PROGRAMS += systemd-fstab-generator
-#@src/systemd-system-update-generator/Makefile
+#@auto/systemd-system-update-generator/Makefile
systemgenerator_PROGRAMS += systemd-system-update-generator
-#@src/systemd-debug-generator/Makefile
+#@auto/systemd-debug-generator/Makefile
systemgenerator_PROGRAMS += systemd-debug-generator
#@discard.mk
@@ -821,7 +821,7 @@ EXTRA_DIST += \
man/glib-event-glue.c
#@src/libbasic/Makefile --------------------------------------------------------
-nested.subdirs += src include
+at.subdirs += src include
#@src/libbasic/src/Makefile
noinst_LTLIBRARIES += \
libbasic.la
@@ -1041,7 +1041,7 @@ libbasic_la_LIBADD = \
-lm
#@src/libshared/Makefile -------------------------------------------------------
-nested.subdirs += src
+at.subdirs += src
#@src/libshared/src/Makefile
noinst_LTLIBRARIES += \
libshared.la
@@ -1160,7 +1160,7 @@ libshared_la_LIBADD = \
$(LIBIDN_LIBS) \
$(SECCOMP_LIBS)
-#@src/libfirewall/Makefile -----------------------------------------------------
+#@auto/libfirewall/Makefile ----------------------------------------------------
if HAVE_LIBIPTC
noinst_LTLIBRARIES += \
libfirewall.la
@@ -1186,7 +1186,7 @@ SYSINIT_TARGET_WANTS += \
ldconfig.service
endif # ENABLE_LDCONFIG
-#@src/libcore/Makefile ---------------------------------------------------------
+#@auto/libcore/Makefile --------------------------------------------------------
noinst_LTLIBRARIES += \
libcore.la
@@ -1370,7 +1370,7 @@ CLEANFILES += \
$(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
+at.subdirs += basic
#@src/libbasic/include/basic/Makefile
src/basic/errno-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1433,7 +1433,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" }' <$< >$@
-#@src/grp-resolve/systemd-resolved/Makefile
+#@auto/systemd-resolved/Makefile
src/resolve/dns_type-list.txt: src/resolve/dns-type.h
$(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -2433,7 +2433,7 @@ lcov-run lcov-report:
echo "Need to reconfigure with --enable-coverage"
endif # ENABLE_COVERAGE
-#@src/systemd-analyze/Makefile -------------------------------------------------
+#@auto/systemd-analyze/Makefile ------------------------------------------------
systemd_analyze_SOURCES = \
src/analyze/analyze.c \
src/analyze/analyze-verify.c \
@@ -2447,14 +2447,14 @@ systemd_analyze_CFLAGS = \
systemd_analyze_LDADD = \
libcore.la
-#@src/systemd-initctl/Makefile -------------------------------------------------
+#@auto/systemd-initctl/Makefile ------------------------------------------------
systemd_initctl_SOURCES = \
src/initctl/initctl.c
systemd_initctl_LDADD = \
libshared.la
-#@src/systemd-update-utmp/Makefile ---------------------------------------------
+#@auto/systemd-update-utmp/Makefile --------------------------------------------
systemd_update_utmp_SOURCES = \
src/update-utmp/update-utmp.c
@@ -2466,14 +2466,14 @@ systemd_update_utmp_LDADD = \
libshared.la \
$(AUDIT_LIBS)
-#@src/systemd-update-done/Makefile ---------------------------------------------
+#@auto/systemd-update-done/Makefile --------------------------------------------
systemd_update_done_SOURCES = \
src/update-done/update-done.c
systemd_update_done_LDADD = \
libshared.la
-#@src/systemd-shutdown/Makefile ------------------------------------------------
+#@auto/systemd-shutdown/Makefile -----------------------------------------------
systemd_shutdown_SOURCES = \
src/core/umount.c \
src/core/umount.h \
@@ -2486,7 +2486,7 @@ systemd_shutdown_SOURCES = \
systemd_shutdown_LDADD = \
libshared.la
-#@src/systemd-modules-load/Makefile --------------------------------------------
+#@auto/systemd-modules-load/Makefile -------------------------------------------
if HAVE_KMOD
systemd_modules_load_SOURCES = \
src/modules-load/modules-load.c
@@ -2521,7 +2521,7 @@ EXTRA_DIST += \
units/systemd-modules-load.service.in \
units/kmod-static-nodes.service.in
-#@src/systemd-tmpfiles/Makefile ------------------------------------------------
+#@auto/systemd-tmpfiles/Makefile -----------------------------------------------
if ENABLE_TMPFILES
systemd_tmpfiles_SOURCES = \
src/tmpfiles/tmpfiles.c
@@ -2580,7 +2580,7 @@ EXTRA_DIST += \
units/systemd-tmpfiles-setup.service.in \
units/systemd-tmpfiles-clean.service.in
-#@src/systemd-sysusers/Makefile ------------------------------------------------
+#@auto/systemd-sysusers/Makefile -----------------------------------------------
if ENABLE_SYSUSERS
systemd_sysusers_SOURCES = \
src/sysusers/sysusers.c
@@ -2626,7 +2626,7 @@ dist_factory_pam_DATA = \
factory/etc/pam.d/other
endif # HAVE_PAM
-#@src/systemd-firstboot/Makefile -----------------------------------------------
+#@auto/systemd-firstboot/Makefile ----------------------------------------------
if ENABLE_FIRSTBOOT
systemd_firstboot_SOURCES = \
src/firstboot/firstboot.c
@@ -2648,7 +2648,7 @@ endif # ENABLE_FIRSTBOOT
EXTRA_DIST += \
units/systemd-firstboot.service.in
-#@src/systemd-machine-id-setup/Makefile ----------------------------------------
+#@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 \
@@ -2660,35 +2660,35 @@ systemd_machine_id_setup_LDADD = \
SYSINIT_TARGET_WANTS += \
systemd-machine-id-commit.service
-#@src/systemd-sysctl/Makefile --------------------------------------------------
+#@auto/systemd-sysctl/Makefile -------------------------------------------------
systemd_sysctl_SOURCES = \
src/sysctl/sysctl.c
systemd_sysctl_LDADD = \
libshared.la
-#@src/grp-helperunits/systemd-sleep/Makefile -----------------------------------
+#@auto/systemd-sleep/Makefile --------------------------------------------------
systemd_sleep_SOURCES = \
src/sleep/sleep.c
systemd_sleep_LDADD = \
libshared.la
-#@src/systemd-fsck/Makefile ----------------------------------------------------
+#@auto/systemd-fsck/Makefile ---------------------------------------------------
systemd_fsck_SOURCES = \
src/fsck/fsck.c
systemd_fsck_LDADD = \
libshared.la
-#@src/systemd-ac-power/Makefile ------------------------------------------------
+#@auto/systemd-ac-power/Makefile -----------------------------------------------
systemd_ac_power_SOURCES = \
src/ac-power/ac-power.c
systemd_ac_power_LDADD = \
libshared.la
-#@src/grp-helperunits/systemd-detect-virt/Makefile -----------------------------
+#@auto/systemd-detect-virt/Makefile --------------------------------------------
systemd_detect_virt_SOURCES = \
src/detect-virt/detect-virt.c
@@ -2698,28 +2698,28 @@ systemd_detect_virt_LDADD = \
INSTALL_EXEC_HOOKS += \
systemd-detect-virt-install-hook
-#@src/systemd-delta/Makefile ---------------------------------------------------
+#@auto/systemd-delta/Makefile --------------------------------------------------
systemd_delta_SOURCES = \
src/delta/delta.c
systemd_delta_LDADD = \
libshared.la
-#@src/systemd-getty-generator/Makefile -----------------------------------------
+#@auto/systemd-getty-generator/Makefile ----------------------------------------
systemd_getty_generator_SOURCES = \
src/getty-generator/getty-generator.c
systemd_getty_generator_LDADD = \
libshared.la
-#@src/systemd-debug-generator/Makefile -----------------------------------------
+#@auto/systemd-debug-generator/Makefile ----------------------------------------
systemd_debug_generator_SOURCES = \
src/debug-generator/debug-generator.c
systemd_debug_generator_LDADD = \
libshared.la
-#@src/systemd-fstab-generator/Makefile -----------------------------------------
+#@auto/systemd-fstab-generator/Makefile ----------------------------------------
systemd_fstab_generator_SOURCES = \
src/fstab-generator/fstab-generator.c \
src/core/mount-setup.c
@@ -2727,14 +2727,14 @@ systemd_fstab_generator_SOURCES = \
systemd_fstab_generator_LDADD = \
libshared.la
-#@src/systemd-system-update-generator/Makefile ---------------------------------
+#@auto/systemd-system-update-generator/Makefile --------------------------------
systemd_system_update_generator_SOURCES = \
src/system-update-generator/system-update-generator.c
systemd_system_update_generator_LDADD = \
libshared.la
-#@src/systemd-hibernate-resume/Makefile ----------------------------------------
+#@auto/systemd-hibernate-resume/Makefile ---------------------------------------
if ENABLE_HIBERNATE
systemgenerator_PROGRAMS += \
systemd-hibernate-resume-generator
@@ -2769,7 +2769,7 @@ EXTRA_DIST += \
units/systemd-hibernate-resume@.service.in \
units/systemd-hybrid-sleep.service.in
-#@src/grp-boot/bootctl/Makefile ------------------------------------------------
+#@auto/bootctl/Makefile --------------------------------------------------------
if ENABLE_EFI
if HAVE_BLKID
bootctl_SOURCES = \
@@ -2798,7 +2798,7 @@ dist_zshcompletion_data += \
shell-completion/zsh/_bootctl
endif # HAVE_BLKID
endif # ENABLE_EFI
-#@src/grp-boot/systemd-boot/Makefile -------------------------------------------
+#@auto/systemd-boot/Makefile ---------------------------------------------------
if ENABLE_EFI
if HAVE_GNUEFI
efi_cppflags = \
@@ -2967,7 +2967,7 @@ test-efi: test-efi-disk.img
EXTRA_DIST += test/test-efi-create-disk.sh
-#@src/systemd-gpt-auto-generator/Makefile --------------------------------------
+#@auto/systemd-gpt-auto-generator/Makefile -------------------------------------
if HAVE_BLKID
systemgenerator_PROGRAMS += \
systemd-gpt-auto-generator
@@ -2985,7 +2985,7 @@ systemd_gpt_auto_generator_CFLAGS = \
$(BLKID_CFLAGS)
endif # HAVE_BLKID
-#@src/systemd-dbus1-generator/Makefile -----------------------------------------
+#@auto/systemd-dbus1-generator/Makefile ----------------------------------------
systemgenerator_PROGRAMS += \
systemd-dbus1-generator
@@ -3009,21 +3009,21 @@ dist_xinitrc_SCRIPTS = \
INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
-#@src/systemd-sysv-generator/Makefile ------------------------------------------
+#@auto/systemd-sysv-generator/Makefile -----------------------------------------
systemd_sysv_generator_SOURCES = \
src/sysv-generator/sysv-generator.c
systemd_sysv_generator_LDADD = \
libcore.la
-#@src/systemd-rc-local-generator/Makefile --------------------------------------
+#@auto/systemd-rc-local-generator/Makefile -------------------------------------
systemd_rc_local_generator_SOURCES = \
src/rc-local-generator/rc-local-generator.c
systemd_rc_local_generator_LDADD = \
libshared.la
-#@src/systemd-remount-fs/Makefile ----------------------------------------------
+#@auto/systemd-remount-fs/Makefile ---------------------------------------------
systemd_remount_fs_SOURCES = \
src/remount-fs/remount-fs.c \
src/core/mount-setup.c \
@@ -3032,70 +3032,70 @@ systemd_remount_fs_SOURCES = \
systemd_remount_fs_LDADD = \
libshared.la
-#@src/systemd-cgroups-agent/Makefile -------------------------------------------
+#@auto/systemd-cgroups-agent/Makefile ------------------------------------------
systemd_cgroups_agent_SOURCES = \
src/cgroups-agent/cgroups-agent.c
systemd_cgroups_agent_LDADD = \
libshared.la
-#@src/systemd-escape/Makefile --------------------------------------------------
+#@auto/systemd-escape/Makefile -------------------------------------------------
systemd_escape_SOURCES = \
src/escape/escape.c
systemd_escape_LDADD = \
libshared.la
-#@src/grp-system/systemctl/Makefile --------------------------------------------
+#@auto/systemctl/Makefile ------------------------------------------------------
systemctl_SOURCES = \
src/systemctl/systemctl.c
systemctl_LDADD = \
libshared.la
-#@src/systemd-notify/Makefile --------------------------------------------------
+#@auto/systemd-notify/Makefile -------------------------------------------------
systemd_notify_SOURCES = \
src/notify/notify.c
systemd_notify_LDADD = \
libshared.la
-#@src/systemd-path/Makefile ----------------------------------------------------
+#@auto/systemd-path/Makefile ---------------------------------------------------
systemd_path_SOURCES = \
src/path/path.c
systemd_path_LDADD = \
libshared.la
-#@src/systemd-ask-password/Makefile --------------------------------------------
+#@auto/systemd-ask-password/Makefile -------------------------------------------
systemd_ask_password_SOURCES = \
src/ask-password/ask-password.c
systemd_ask_password_LDADD = \
libshared.la
-#@src/systemd-reply-password/Makefile ------------------------------------------
+#@auto/systemd-reply-password/Makefile -----------------------------------------
systemd_reply_password_SOURCES = \
src/reply-password/reply-password.c
systemd_reply_password_LDADD = \
libshared.la
-#@src/systemd-cgls/Makefile ----------------------------------------------------
+#@auto/systemd-cgls/Makefile ---------------------------------------------------
systemd_cgls_SOURCES = \
src/cgls/cgls.c
systemd_cgls_LDADD = \
libshared.la
-#@src/systemd-cgtop/Makefile ---------------------------------------------------
+#@auto/systemd-cgtop/Makefile --------------------------------------------------
systemd_cgtop_SOURCES = \
src/cgtop/cgtop.c
systemd_cgtop_LDADD = \
libshared.la
-#@src/systemd-nspawn/Makefile --------------------------------------------------
+#@auto/systemd-nspawn/Makefile -------------------------------------------------
systemd_nspawn_SOURCES = \
src/nspawn/nspawn.c \
src/nspawn/nspawn-settings.c \
@@ -3154,21 +3154,21 @@ test_patch_uid_LDADD = \
manual_tests += \
test-patch-uid
-#@src/systemd-run/Makefile -----------------------------------------------------
+#@auto/systemd-run/Makefile ----------------------------------------------------
systemd_run_SOURCES = \
src/run/run.c
systemd_run_LDADD = \
libshared.la
-#@src/systemd-stdio-bridge/Makefile --------------------------------------------
+#@auto/systemd-stdio-bridge/Makefile -------------------------------------------
systemd_stdio_bridge_SOURCES = \
src/stdio-bridge/stdio-bridge.c
systemd_stdio_bridge_LDADD = \
libshared.la
-#@src/systemd-tty-ask-password-agent/Makefile ----------------------------------
+#@auto/systemd-tty-ask-password-agent/Makefile ---------------------------------
systemd_tty_ask_password_agent_SOURCES = \
src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -3348,7 +3348,7 @@ tests += \
test-local-addresses \
test-resolve
-#@src/busctl/Makefile
+#@auto/busctl/Makefile
bin_PROGRAMS += \
busctl
@@ -3483,7 +3483,7 @@ test_resolve_SOURCES = \
test_resolve_LDADD = \
libshared.la
-#@src/busctl/Makefile
+#@auto/busctl/Makefile
busctl_SOURCES = \
src/libsystemd/sd-bus/busctl.c \
src/libsystemd/sd-bus/busctl-introspect.c \
@@ -3493,7 +3493,7 @@ busctl_LDADD = \
libshared.la
#@src/libsystemd-network/Makefile ----------------------------------------------
-nested.subdirs += src test
+at.subdirs += src test
#@src/libsystemd-network/src/Makefile
noinst_LTLIBRARIES += \
libsystemd-network.la
@@ -3751,15 +3751,15 @@ SYSINIT_TARGET_WANTS += \
systemd-udevd.service \
systemd-udev-trigger.service
-#@src/grp-udev/udevadm/Makefile
+#@auto/udevadm/Makefile
rootbin_PROGRAMS += \
udevadm
-#@src/grp-udev/systemd-udevd/Makefile
+#@auto/systemd-udevd/Makefile
rootlibexec_PROGRAMS += \
systemd-udevd
-#@src/grp-udev/libudev-core/Makefile
+#@auto/libudev-core/Makefile
noinst_LTLIBRARIES += \
libudev-core.la
@@ -3836,14 +3836,14 @@ libudev_core_la_SOURCES += \
src/systemd/sd-login.h
endif # HAVE_ACL
-#@src/grp-udev/systemd-udevd/Makefile
+#@auto/systemd-udevd/Makefile
systemd_udevd_SOURCES = \
src/udev/udevd.c
systemd_udevd_LDADD = \
libudev-core.la
-#@src/grp-udev/udevadm/Makefile
+#@auto/udevadm/Makefile
udevadm_SOURCES = \
src/udev/udevadm.c \
src/udev/udevadm-info.c \
@@ -3860,7 +3860,7 @@ udevadm_SOURCES = \
udevadm_LDADD = \
libudev-core.la
-#@src/systemd-hwdb/Makefile ----------------------------------------------------
+#@auto/systemd-hwdb/Makefile ---------------------------------------------------
if ENABLE_HWDB
INSTALL_DIRS += \
$(sysconfdir)/udev/hwdb.d
@@ -3970,7 +3970,7 @@ EXTRA_DIST += \
test/sysv-generator-test.py \
test/mocks/fsck
-#@src/grp-udev/ata_id/Makefile -------------------------------------------------
+#@auto/ata_id/Makefile ---------------------------------------------------------
ata_id_SOURCES = \
src/udev/ata_id/ata_id.c
@@ -3980,7 +3980,7 @@ ata_id_LDADD = \
udevlibexec_PROGRAMS += \
ata_id
-#@src/grp-udev/cdrom_id/Makefile -----------------------------------------------
+#@auto/cdrom_id/Makefile -------------------------------------------------------
cdrom_id_SOURCES = \
src/udev/cdrom_id/cdrom_id.c
@@ -3993,7 +3993,7 @@ udevlibexec_PROGRAMS += \
dist_udevrules_DATA += \
rules/60-cdrom_id.rules
-#@src/grp-udev/collect/Makefile ------------------------------------------------
+#@auto/collect/Makefile --------------------------------------------------------
collect_SOURCES = \
src/udev/collect/collect.c
@@ -4003,7 +4003,7 @@ collect_LDADD = \
udevlibexec_PROGRAMS += \
collect
-#@src/grp-udev/scsi_id/Makefile ------------------------------------------------
+#@auto/scsi_id/Makefile --------------------------------------------------------
scsi_id_SOURCES =\
src/udev/scsi_id/scsi_id.c \
src/udev/scsi_id/scsi_serial.c \
@@ -4019,7 +4019,7 @@ udevlibexec_PROGRAMS += \
EXTRA_DIST += \
src/udev/scsi_id/README
-#@src/grp-udev/v4l_id/Makefile -------------------------------------------------
+#@auto/v4l_id/Makefile ---------------------------------------------------------
v4l_id_SOURCES = \
src/udev/v4l_id/v4l_id.c
@@ -4032,7 +4032,7 @@ udevlibexec_PROGRAMS += \
dist_udevrules_DATA += \
rules/60-persistent-v4l.rules
-#@src/grp-udev/mtd_probe/Makefile ----------------------------------------------
+#@auto/mtd_probe/Makefile ------------------------------------------------------
mtd_probe_SOURCES = \
src/udev/mtd_probe/mtd_probe.c \
src/udev/mtd_probe/mtd_probe.h \
@@ -4054,7 +4054,7 @@ test_id128_LDADD = \
tests += \
test-id128
-#@src/systemd-activate/Makefile ------------------------------------------------
+#@auto/systemd-socket-activate/Makefile ----------------------------------------
bin_PROGRAMS += \
systemd-socket-activate
@@ -4065,7 +4065,7 @@ systemd_socket_activate_SOURCES = \
systemd_socket_activate_LDADD = \
libshared.la
-#@src/grp-journal/systemd-journald/Makefile ------------------------------------
+#@auto/systemd-journald/Makefile -----------------------------------------------
systemd_journald_SOURCES = \
src/journal/journald.c \
src/journal/journald-server.h
@@ -4080,7 +4080,7 @@ systemd_cat_SOURCES = \
systemd_cat_LDADD = \
libjournal-core.la
-#@src/grp-journal-remote/systemd-journal-upload/Makefile
+#@auto/systemd-journal-upload/Makefile
if HAVE_LIBCURL
rootlibexec_PROGRAMS += \
systemd-journal-upload
@@ -4109,7 +4109,7 @@ EXTRA_DIST += \
units/systemd-journal-upload.service.in \
src/journal-remote/journal-upload.conf.in
-#@src/grp-journal-remote/systemd-journal-remote/Makefile
+#@auto/systemd-journal-remote/Makefile
if HAVE_MICROHTTPD
rootlibexec_PROGRAMS += \
systemd-journal-remote
@@ -4169,7 +4169,7 @@ EXTRA_DIST += \
src/journal-remote/log-generator.py
endif # HAVE_MICROHTTPD
-#@src/grp-journal/journalctl/Makefile
+#@auto/journalctl/Makefile
# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
journalctl_CFLAGS = \
$(AM_CFLAGS)
@@ -4288,7 +4288,7 @@ test_audit_type_SOURCES = \
test_audit_type_LDADD = \
libjournal-core.la
-#@src/grp-journal/libjournal-core/Makefile
+#@auto/libjournal-core/Makefile
libjournal_core_la_SOURCES = \
src/journal/journald-kmsg.c \
src/journal/journald-kmsg.h \
@@ -4447,7 +4447,7 @@ endif # HAVE_GCRYPT
noinst_LTLIBRARIES += \
libsystemd-journal-internal.la
-#@src/grp-journal/systemd-journald/Makefile
+#@auto/systemd-journald/Makefile
rootlibexec_PROGRAMS += \
systemd-journald
@@ -4502,7 +4502,7 @@ EXTRA_DIST += \
gperf_gperf_sources += \
src/journal/journald-gperf.gperf
-#@src/grp-journal-remote/systemd-journal-gatewayd/Makefile ---------------------
+#@auto/systemd-journal-gatewayd/Makefile ---------------------------------------
if HAVE_MICROHTTPD
gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
@@ -4545,7 +4545,7 @@ endif # HAVE_MICROHTTPD
EXTRA_DIST += \
units/systemd-journal-gatewayd.service.in
-#@src/systemd-socket-proxyd/Makefile -------------------------------------------
+#@auto/systemd-socket-proxyd/Makefile ------------------------------------------
systemd_socket_proxyd_SOURCES = \
src/socket-proxy/socket-proxyd.c
@@ -4553,7 +4553,7 @@ systemd_socket_proxyd_SOURCES = \
systemd_socket_proxyd_LDADD = \
libshared.la
-#@src/grp-coredump/systemd-coredump/Makefile -----------------------------------
+#@auto/systemd-coredump/Makefile -----------------------------------------------
if ENABLE_COREDUMP
systemd_coredump_SOURCES = \
src/coredump/coredump.c \
@@ -4587,7 +4587,7 @@ rootlibexec_PROGRAMS += \
dist_pkgsysconf_DATA += \
src/coredump/coredump.conf
-#@src/grp-coredump/coredumpctl/Makefile
+#@auto/coredumpctl/Makefile
coredumpctl_SOURCES = \
src/coredump/coredumpctl.c
@@ -4597,7 +4597,7 @@ coredumpctl_LDADD = \
bin_PROGRAMS += \
coredumpctl
-#@src/grp-coredump/systemd-coredump/Makefile
+#@auto/systemd-coredump/Makefile
manual_tests += \
test-coredump-vacuum
@@ -4609,14 +4609,14 @@ test_coredump_vacuum_SOURCES = \
test_coredump_vacuum_LDADD = \
libshared.la
-#@src/grp-coredump/coredumpctl/Makefile
+#@auto/coredumpctl/Makefile
dist_bashcompletion_data += \
shell-completion/bash/coredumpctl
dist_zshcompletion_data += \
shell-completion/zsh/_coredumpctl
-#@src/grp-coredump/systemd-coredump/Makefile
+#@auto/systemd-coredump/Makefile
nodist_sysctl_DATA = \
sysctl.d/50-coredump.conf
@@ -4628,7 +4628,7 @@ EXTRA_DIST += \
sysctl.d/50-coredump.conf.in \
units/systemd-coredump@.service.in
-#@src/grp-helperunits/systemd-binfmt/Makefile ----------------------------------
+#@auto/systemd-binfmt/Makefile -------------------------------------------------
if ENABLE_BINFMT
systemd_binfmt_SOURCES = \
src/binfmt/binfmt.c
@@ -4659,7 +4659,7 @@ endif # ENABLE_BINFMT
EXTRA_DIST += \
units/systemd-binfmt.service.in
-#@src/grp-helperunits/systemd-vconsole-setup/Makefile --------------------------
+#@auto/systemd-vconsole-setup/Makefile -----------------------------------------
if ENABLE_VCONSOLE
systemd_vconsole_setup_SOURCES = \
src/vconsole/vconsole-setup.c
@@ -4684,7 +4684,7 @@ EXTRA_DIST += \
src/vconsole/90-vconsole.rules.in \
units/systemd-vconsole-setup.service.in
-#@src/grp-helperunits/systemd-quotacheck/Makefile ------------------------------
+#@auto/systemd-quotacheck/Makefile ---------------------------------------------
if ENABLE_QUOTACHECK
rootlibexec_PROGRAMS += \
systemd-quotacheck
@@ -4705,7 +4705,7 @@ EXTRA_DIST += \
nodist_systemunit_DATA += \
units/quotaon.service
-#@src/grp-helperunits/systemd-random-seed/Makefile -----------------------------
+#@auto/systemd-random-seed/Makefile --------------------------------------------
if ENABLE_RANDOMSEED
rootlibexec_PROGRAMS += \
systemd-random-seed
@@ -4727,7 +4727,7 @@ endif # ENABLE_RANDOMSEED
EXTRA_DIST += \
units/systemd-random-seed.service.in
-#@src/grp-helperunits/systemd-backlight/Makefile -------------------------------
+#@auto/systemd-backlight/Makefile ----------------------------------------------
if ENABLE_BACKLIGHT
rootlibexec_PROGRAMS += \
systemd-backlight
@@ -4745,7 +4745,7 @@ endif # ENABLE_BACKLIGHT
EXTRA_DIST += \
units/systemd-backlight@.service.in
-#@src/grp-helperunits/systemd-rfkill/Makefile ----------------------------------
+#@auto/systemd-rfkill/Makefile -------------------------------------------------
if ENABLE_RFKILL
rootlibexec_PROGRAMS += \
systemd-rfkill
@@ -4766,7 +4766,7 @@ endif # ENABLE_RFKILL
EXTRA_DIST += \
units/systemd-rfkill.service.in
-#@src/systemd-cryptsetup/Makefile ----------------------------------------------
+#@auto/systemd-cryptsetup/Makefile ---------------------------------------------
if HAVE_LIBCRYPTSETUP
rootlibexec_PROGRAMS += \
systemd-cryptsetup
@@ -4926,7 +4926,7 @@ polkitpolicy_in_files += \
EXTRA_DIST += \
units/systemd-localed.service.in
-#@src/grp-timedate/systemd-timedated/Makefile ----------------------------------
+#@auto/systemd-timedated/Makefile ----------------------------------------------
if ENABLE_TIMEDATED
systemd_timedated_SOURCES = \
src/timedate/timedated.c
@@ -4959,7 +4959,7 @@ BUSNAMES_TARGET_WANTS += \
org.freedesktop.timedate1.busname
endif # ENABLE_TIMEDATED
-#@src/grp-timedate/timedatectl/Makefile
+#@auto/timedatectl/Makefile
if ENABLE_TIMEDATED
timedatectl_SOURCES = \
src/timedate/timedatectl.c
@@ -4976,7 +4976,7 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_timedatectl
endif # ENABLE_TIMEDATED
-#@src/grp-timedate/systemd-timedated/Makefile
+#@auto/systemd-timedated/Makefile
polkitpolicy_in_files += \
src/timedate/org.freedesktop.timedate1.policy.in
@@ -4984,7 +4984,7 @@ polkitpolicy_in_files += \
EXTRA_DIST += \
units/systemd-timedated.service.in
-#@src/systemd-timesyncd/Makefile -----------------------------------------------
+#@auto/systemd-timesyncd/Makefile ----------------------------------------------
if ENABLE_TIMESYNCD
systemd_timesyncd_SOURCES = \
src/timesync/timesyncd.c \
@@ -5034,7 +5034,7 @@ test_nss_LDADD = \
manual_tests += \
test-nss
-#@src/nss-myhostname/Makefile --------------------------------------------------
+#@auto/nss-myhostname/Makefile -------------------------------------------------
if HAVE_MYHOSTNAME
libnss_myhostname_la_SOURCES = \
src/nss-myhostname/nss-myhostname.sym \
@@ -5056,7 +5056,7 @@ lib_LTLIBRARIES += \
libnss_myhostname.la
endif # HAVE_MYHOSTNAME
-#@src/grp-machine/systemd-machined/Makefile ------------------------------------
+#@auto/systemd-machined/Makefile -----------------------------------------------
systemd_machined_SOURCES = \
src/machine/machined.c \
src/machine/machined.h
@@ -5067,7 +5067,6 @@ systemd_machined_LDADD = \
rootlibexec_PROGRAMS += \
systemd-machined
-#@src/grp-machine/libmachine-core/Makefile
libmachine_core_la_SOURCES = \
src/machine/machine.c \
src/machine/machine.h \
@@ -5085,7 +5084,7 @@ libmachine_core_la_LIBADD = \
noinst_LTLIBRARIES += \
libmachine-core.la
-#@src/grp-machine/machinectl/Makefile
+#@auto/machinectl/Makefile
machinectl_SOURCES = \
src/machine/machinectl.c
@@ -5095,7 +5094,7 @@ machinectl_LDADD = \
rootbin_PROGRAMS += \
machinectl
-#@src/grp-machine/libmachine-core/Makefile
+#@auto/systemd-machined/Makefile
test_machine_tables_SOURCES = \
src/machine/test-machine-tables.c
@@ -5105,7 +5104,6 @@ test_machine_tables_LDADD = \
tests += \
test-machine-tables
-#@src/grp-machine/systemd-machined/Makefile
nodist_systemunit_DATA += \
units/systemd-machined.service
@@ -5124,7 +5122,7 @@ dist_dbuspolicy_DATA += \
polkitpolicy_files += \
src/machine/org.freedesktop.machine1.policy
-#@src/grp-machine/machinectl/Makefile
+#@auto/machinectl/Makefile
dist_bashcompletion_data += \
shell-completion/bash/machinectl
@@ -5132,14 +5130,14 @@ dist_zshcompletion_data += \
shell-completion/zsh/_machinectl \
shell-completion/zsh/_sd_machines
-#@src/grp-machine/systemd-machined/Makefile
+#@auto/systemd-machined/Makefile
SYSTEM_UNIT_ALIASES += \
systemd-machined.service dbus-org.freedesktop.machine1.service
BUSNAMES_TARGET_WANTS += \
org.freedesktop.machine1.busname
-#@src/grp-machine/nss-mymachines/Makefile
+#@auto/nss-mymachines/Makefile
libnss_mymachines_la_SOURCES = \
src/nss-mymachines/nss-mymachines.sym \
@@ -5160,7 +5158,7 @@ libnss_mymachines_la_LIBADD = \
lib_LTLIBRARIES += \
libnss_mymachines.la
-#@src/grp-machine/systemd-machined/Makefile
+#@auto/systemd-machined/Makefile
polkitpolicy_in_files += \
src/machine/org.freedesktop.machine1.policy.in
@@ -5168,7 +5166,7 @@ polkitpolicy_in_files += \
EXTRA_DIST += \
units/systemd-machined.service.in
-#@src/grp-import/Makefile ------------------------------------------------------
+#@src/grp-journal/grp-remote/Makefile ------------------------------------------
if ENABLE_IMPORTD
if HAVE_LIBCURL
@@ -5177,16 +5175,16 @@ if HAVE_ZLIB
if HAVE_BZIP2
if HAVE_GCRYPT
-#@src/grp-import/systemd-importd/Makefile
+#@auto/systemd-importd/Makefile
rootlibexec_PROGRAMS += systemd-importd
-#@src/grp-import/systemd-pull/Makefile
+#@auto/systemd-pull/Makefile
rootlibexec_PROGRAMS += systemd-pull
-#@src/grp-import/systemd-import/Makefile
+#@auto/systemd-import/Makefile
rootlibexec_PROGRAMS += systemd-import
-#@src/grp-import/systemd-export/Makefile
+#@auto/systemd-export/Makefile
rootlibexec_PROGRAMS += systemd-export
-#@src/grp-import/systemd-importd/Makefile
+#@auto/systemd-importd/Makefile
systemd_importd_SOURCES = \
src/import/importd.c
@@ -5199,7 +5197,7 @@ systemd_importd_CFLAGS = \
systemd_importd_LDADD = \
libshared.la
-#@src/grp-import/systemd-pull/Makefile
+#@auto/systemd-pull/Makefile
systemd_pull_SOURCES = \
src/import/pull.c \
src/import/pull-raw.c \
@@ -5237,7 +5235,7 @@ systemd_pull_LDADD = \
$(BZIP2_LIBS) \
$(GCRYPT_LIBS)
-#@src/grp-import/systemd-import/Makefile
+#@auto/systemd-import/Makefile
systemd_import_SOURCES = \
src/import/import.c \
src/import/import-raw.c \
@@ -5263,7 +5261,7 @@ systemd_import_LDADD = \
$(ZLIB_LIBS) \
$(BZIP2_LIBS)
-#@src/grp-import/systemd-export/Makefile
+#@auto/systemd-export/Makefile
systemd_export_SOURCES = \
src/import/export.c \
src/import/export-tar.c \
@@ -5287,7 +5285,7 @@ systemd_export_LDADD = \
$(ZLIB_LIBS) \
$(BZIP2_LIBS)
-#@src/grp-import/Makefile
+#@src/grp-journal/grp-remote/Makefile
dist_rootlibexec_DATA = \
src/import/import-pubring.gpg
@@ -5343,7 +5341,7 @@ EXTRA_DIST += \
units/systemd-importd.service.in
-#@src/grp-resolve/systemd-resolved/Makefile ------------------------------------
+#@auto/systemd-resolved/Makefile -----------------------------------------------
if ENABLE_RESOLVED
basic_dns_sources = \
@@ -5441,7 +5439,7 @@ GENERAL_ALIASES += \
nodist_pkgsysconf_DATA += \
src/resolve/resolved.conf
-#@src/grp-resolve/nss-resolve/Makefile
+#@auto/nss-resolve/Makefile
libnss_resolve_la_SOURCES = \
src/nss-resolve/nss-resolve.sym \
src/nss-resolve/nss-resolve.c
@@ -5462,7 +5460,7 @@ libnss_resolve_la_LIBADD = \
lib_LTLIBRARIES += \
libnss_resolve.la
-#@src/grp-resolve/systemd-resolved/Makefile
+#@auto/systemd-resolved/Makefile
systemd_resolve_SOURCES = \
src/resolve/resolve-tool.c \
$(basic_dns_sources) \
@@ -5760,7 +5758,6 @@ nodist_systemd_logind_SOURCES = \
systemd_logind_LDADD = \
liblogind-core.la
-#@src/grp-login/liblogind-core/Makefile
liblogind_core_la_SOURCES = \
src/login/logind-core.c \
src/login/logind-device.c \
@@ -5950,7 +5947,7 @@ EXTRA_DIST += \
units/systemd-logind.service.in \
src/login/logind.conf.in
-#@src/grp-helperunits/systemd-user-sessions/Makefile ---------------------------
+#@auto/systemd-user-sessions/Makefile ------------------------------------------
if HAVE_PAM
systemd_user_sessions_SOURCES = \
@@ -6406,7 +6403,7 @@ dist-check-includes: $(public_headers)
done; \
done; exit $$res
-#@hwdb/Makefile
+#@auto/hwdb/Makefile
.PHONY: hwdb-update
hwdb-update:
( cd $(top_srcdir)/hwdb && \
@@ -6577,35 +6574,35 @@ add-key:
#@src/Makefile
#@src/libudev/Makefile
-nested.subdirs += src
+at.subdirs += src
#@src/libsystemd/src/subdir.mk
-sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\"
-sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+systemd.CPPFLAGS += -DLIBDIR=\"$(libdir)\"
+systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
#@src/grp-boot/Makefile
-nested.subdirs += bootctl systemd-boot
+at.subdirs += bootctl systemd-boot
#@src/grp-coredump/Makefile
-nested.subdirs += coredumpctl systemd-coredump
+at.subdirs += coredumpctl systemd-coredump
#@src/grp-machine/Makefile
-nested.subdirs += machinectl systemd-machined
-nested.subdirs += nss-mymachines
+at.subdirs += machinectl systemd-machined
+at.subdirs += nss-mymachines
-#@src/grp-journal-remote/Makefile
-nested.subdirs += systemd-journa-gatewayd
-nested.subdirs += systemd-journa-remote
-nested.subdirs += systemd-journa-upload
+#@src/grp-journal/grp-remote/Makefile
+at.subdirs += systemd-journa-gatewayd
+at.subdirs += systemd-journa-remote
+at.subdirs += systemd-journa-upload
#@src/grp-resolve/Makefile
-nested.subdirs += systemd-resolved nss-resolve
+at.subdirs += systemd-resolved nss-resolve
#@src/grp-system/Makefile
-nested.subdirs += systemctl systemd
+at.subdirs += systemctl systemd
#@src/grp-timedate/Makefile
-nested.subdirs += timedatectl systemd-timedated
+at.subdirs += timedatectl systemd-timedated
#@all
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/tools/make-man-rules.py b/tools/make-man-rules.py
index 4461630341..5e61917d60 100644
--- a/tools/make-man-rules.py
+++ b/tools/make-man-rules.py
@@ -24,16 +24,16 @@ import os.path
from xml_helper import *
SECTION = '''\
-sd.MANPAGES += \\
+MANPAGES += \\
{manpages}
-sd.MANPAGES_ALIAS += \\
+MANPAGES_ALIAS += \\
{aliases}
{rules}
{htmlrules}
'''
CONDITIONAL = '''\
-ifneq ($({conditional}),)
+if {conditional}
''' \
+ SECTION + \
'''\
@@ -44,7 +44,8 @@ HEADER = '''\
# Do not edit. Generated by make-man-rules.py.
# To regenerate:
# 1. Create, update, or remove source .xml files in man/
-# 2. Run 'make at-noop'
+# 2. Run 'make update-man-list'
+# 3. Run 'make man' to generate manpages
#
# To make a man page conditional on a configure switch add
# attribute conditional="ENABLE_WHAT" or conditional="WITH_WHAT"
@@ -53,19 +54,22 @@ HEADER = '''\
HTML_ALIAS_RULE = '''\
{}.html: {}.html
- $(sd.html-alias)
+ $(html-alias)
'''
FOOTER = '''\
# Really, do not edit this file.
+
+EXTRA_DIST += \\
+ {dist_files}
'''
def man(page, number):
- return '$(outdir)/{}.{}'.format(page, number)
+ return 'man/{}.{}'.format(page, number)
def xml(file):
- return '$(outdir)/{}'.format(os.path.basename(file))
+ return 'man/{}'.format(os.path.basename(file))
def add_rules(rules, name):
xml = xml_parse(name)
@@ -102,7 +106,7 @@ def create_rules(xml_files):
def mjoin(files):
return ' \\\n\t'.join(sorted(files) or '#')
-def make_makefile(rules):
+def make_makefile(rules, dist_files):
return HEADER + '\n'.join(
(CONDITIONAL if conditional else SECTION).format(
manpages=mjoin(set(rulegroup.values())),
@@ -115,8 +119,11 @@ def make_makefile(rules):
if k != v),
conditional=conditional)
for conditional,rulegroup in sorted(rules.items())
- ) + FOOTER
+ ) + FOOTER.format(dist_files=mjoin(sorted(dist_files)))
if __name__ == '__main__':
rules = create_rules(sys.argv[1:])
- print(make_makefile(rules), end='')
+ dist_files = (xml(file) for file in sys.argv[1:]
+ if not file.endswith(".directives.xml") and
+ not file.endswith(".index.xml"))
+ print(make_makefile(rules, dist_files), end='')
diff --git a/tools/notsd-find-includes b/tools/notsd-find-includes
new file mode 100755
index 0000000000..6dfb406fa3
--- /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..feec1b8921
--- /dev/null
+++ b/tools/notsd-fixup
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+fixup_makefiles() (
+ find -type f -name Makefile|while read -r filename; do
+ sed -r -i "s|(/\.\.)*/config.mk|/$(realpath -ms --relative-to="${filename%/*}" config.mk)|" "$filename"
+ done
+)
+
+fixup_includes() (
+ find $(find . -type d -name include) -type d | while read -r dir; do
+ lib="${dir##*/}"
+ pushd "$dir"
+ find . -type f -exec sed -ri -e "s|$lib/||" -- {} +
+ popd
+ done
+
+ find src \( -name '*.h' -o -name '*.c' \) -type f -exec "$0"--includes {} \;
+)
+
+main() {
+ fixup_makefiles
+ fixup_includes
+}
+
+main "$@"
diff --git a/tools/notsd-fixup--includes b/tools/notsd-fixup--includes
new file mode 100755
index 0000000000..957733cdc0
--- /dev/null
+++ b/tools/notsd-fixup--includes
@@ -0,0 +1,215 @@
+#!/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
+ 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_tail=
+system=()
+linux=()
+public=()
+protected=()
+typedef=(); typedef_last=true
+private=()
+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() {
+ 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
+ phase2 "$line"
+ ;;
+ esac
+}
+
+phase2() {
+ phase=phase2
+ hook=:
+ local line="$1"
+ printf '%s\n' "$line"
+ cat
+}
+
+main() {
+ current_file="$1"
+ printf ' => %s\n' "$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"
+ mv -Tf "$current_file.tmp" "$current_file"
+}
+
+main "$@"
diff --git a/tools/notsd-move b/tools/notsd-move
new file mode 100755
index 0000000000..6e7cebe2d0
--- /dev/null
+++ b/tools/notsd-move
@@ -0,0 +1,781 @@
+#!/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 tmpfiles.d/systemd{,-journald}.tmpfiles.m4
+ 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() (
+ set -x
+ 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
+ elif [[ $file = all ]]; then
+ printf '%s\n' "$line" | tee -a "${files[@]}" >/dev/null
+ else
+ if ! in_array "$file" "${files[@]}"; then
+ cat .tmp.move.all > "$file"
+ files+=("$file")
+ fi
+ 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
+)
+
+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
+)
+
+move() (
+ find . \( -name Makefile -o -name '*.mk' \) -delete
+
+ >&2 echo ' => breakup_zshcompletion'
+ breakup_zshcompletion
+ >&2 echo ' => move_files'
+ move_files
+ >&2 echo ' => breakup_makefile'
+ "$0" breakup_makefile |& tail -n20 > .tmp.log || { r=$?; cat .tmp.log; exit $r; }
+ >&2 echo ' => ./tools/notsd-fixup'
+ ./tools/notsd-fixup
+)
+
+main() {
+ set -e
+ set -o pipefail
+
+ if [[ $# -gt 0 ]]; then
+ "$@"
+ else
+ 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
+ fi
+}
+
+main "$@"
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/xml_helper.py b/tools/xml_helper.py
index 598b33f655..e87126f2f7 100644
--- a/tools/xml_helper.py
+++ b/tools/xml_helper.py
@@ -17,17 +17,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-import os.path
from lxml import etree as tree
class CustomResolver(tree.Resolver):
def resolve(self, url, id, context):
- topsrcdir = os.path.dirname(os.path.dirname(__file__))
if 'custom-entities.ent' in url:
- return self.resolve_filename(os.path.join(topsrcdir, 'man/custom-entities.ent.in'), context)
- f = os.path.join(topsrcdir, 'man', os.path.basename(url))
- if os.path.isfile(f):
- return self.resolve_filename(f, context)
+ return self.resolve_filename('man/custom-entities.ent', context)
_parser = tree.XMLParser()
_parser.resolvers.add(CustomResolver())