diff options
-rw-r--r-- | .gitignore | 11 | ||||
-rw-r--r-- | Makefile.am | 529 | ||||
-rwxr-xr-x | move.sh | 281 | ||||
-rwxr-xr-x | reset.sh | 6 |
4 files changed, 628 insertions, 199 deletions
diff --git a/.gitignore b/.gitignore index 091b400182..37eb20c4b5 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 @@ -302,3 +303,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 305099ab66..feb639594e 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-systemd.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/src/Makefile LIBUDEV_CURRENT=7 LIBUDEV_REVISION=4 LIBUDEV_AGE=6 +#@src/libsystemd/Makefile LIBSYSTEMD_CURRENT=15 LIBSYSTEMD_REVISION=0 LIBSYSTEMD_AGE=15 +#@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 = @@ -140,15 +149,15 @@ endif else noinst_PROGRAMS = TESTS = -endif +endif # ENABLE_TESTS 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 = @@ -338,28 +347,71 @@ INSTALL_EXEC_HOOKS += \ INSTALL_EXEC_HOOKS += \ install-busnames-target-wants-hook -# ------------------------------------------------------------------------------ +#@build-aux/Makefile.once.head/20-systemd.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 " $@; - -# ------------------------------------------------------------------------------ +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 = + +#@discard.mk ------------------------------------------------------------------- rootbin_PROGRAMS = \ systemctl \ systemd-notify \ @@ -379,6 +431,7 @@ bin_PROGRAMS = \ systemd-stdio-bridge \ systemd-path +#@src/kernel-install/Makefile dist_bin_SCRIPTS = \ src/kernel-install/kernel-install @@ -386,6 +439,7 @@ dist_kernelinstall_SCRIPTS = \ src/kernel-install/50-depmod.install \ src/kernel-install/90-loaderentry.install +#@discard.mk rootlibexec_PROGRAMS = \ systemd \ systemd-cgroups-agent \ @@ -403,7 +457,7 @@ rootlibexec_PROGRAMS = \ if HAVE_UTMP rootlibexec_PROGRAMS += \ systemd-update-utmp -endif +endif # HAVE_UTMP systemgenerator_PROGRAMS = \ systemd-getty-generator \ @@ -560,7 +614,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 \ @@ -617,7 +671,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 \ @@ -684,7 +738,7 @@ noinst_DATA += \ $(HTML_FILES) \ $(HTML_ALIAS) \ docs/html/man -endif +endif # ENABLE_MANPAGES CLEANFILES += \ $(man_MANS) \ @@ -702,7 +756,7 @@ man/index.html: man/systemd.index.html if HAVE_PYTHON noinst_DATA += \ man/index.html -endif +endif # HAVE_PYTHON CLEANFILES += \ man/index.html @@ -739,7 +793,7 @@ EXTRA_DIST += \ tools/xml_helper.py \ man/glib-event-glue.c -# ------------------------------------------------------------------------------ +#@src/libbasic/Makefile -------------------------------------------------------- noinst_LTLIBRARIES += \ libbasic.la @@ -957,7 +1011,7 @@ libbasic_la_LIBADD = \ -lrt \ -lm -# ----------------------------------------------------------------------------- +#@src/libshared/Makefile ------------------------------------------------------- noinst_LTLIBRARIES += \ libshared.la @@ -1047,19 +1101,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) \ @@ -1075,7 +1129,7 @@ libshared_la_LIBADD = \ $(LIBIDN_LIBS) \ $(SECCOMP_LIBS) -# ----------------------------------------------------------------------------- +#@src/libfirewall/Makefile ----------------------------------------------------- if HAVE_LIBIPTC noinst_LTLIBRARIES += \ libfirewall.la @@ -1090,18 +1144,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 -# ------------------------------------------------------------------------------ +#@src/libcore/Makefile --------------------------------------------------------- noinst_LTLIBRARIES += \ libcore.la @@ -1246,6 +1300,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 @@ -1274,6 +1329,7 @@ EXTRA_DIST += \ CLEANFILES += \ $(gperf_txt_sources) +#@build-aux/Makefile.each.tail/20-systemd.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 }' <$< >$@ @@ -1282,7 +1338,7 @@ 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/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; }' >$@ @@ -1330,10 +1386,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/libsystemd-journal-internal/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 $@) @@ -1343,6 +1400,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/journal/Makefile src/resolve/dns_type-list.txt: src/resolve/dns-type.h $(AM_V_at)$(MKDIR_P) $(dir $@) @@ -1356,7 +1414,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 @@ -1395,7 +1453,7 @@ EXTRA_DIST += \ src/core/macros.systemd.in \ src/core/triggers.systemd.in -# ------------------------------------------------------------------------------ +#@test/Makefile ---------------------------------------------------------------- manual_tests += \ test-ns \ @@ -1413,12 +1471,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 \ @@ -1511,7 +1569,7 @@ tests += \ if HAVE_ACL tests += \ test-acl-util -endif +endif # HAVE_ACL EXTRA_DIST += \ test/a.service \ @@ -1691,7 +1749,7 @@ test_boot_timestamps_SOURCES = \ test_boot_timestamps_LDADD = \ libshared.la -endif +endif # ENABLE_EFI test_unit_name_SOURCES = \ src/test/test-unit-name.c @@ -2116,7 +2174,7 @@ test_firewall_util_LDADD = \ libfirewall.la \ libshared.la \ $(LIBIPTC_LIBS) -endif +endif # HAVE_LIBIPTC test_netlink_manual_SOURCES = \ src/test/test-netlink-manual.c @@ -2303,7 +2361,7 @@ test_arphrd_list_SOURCES = \ test_arphrd_list_LDADD = \ libbasic.la -# ------------------------------------------------------------------------------ +#@discard.mk ------------------------------------------------------------------- ## .PHONY so it always rebuilds it .PHONY: coverage lcov-run lcov-report coverage-sync @@ -2340,9 +2398,9 @@ coverage-sync: coverage else lcov-run lcov-report: echo "Need to reconfigure with --enable-coverage" -endif +endif # ENABLE_COVERAGE -# ------------------------------------------------------------------------------ +#@src/systemd-analyze/Makefile ------------------------------------------------- systemd_analyze_SOURCES = \ src/analyze/analyze.c \ src/analyze/analyze-verify.c \ @@ -2356,14 +2414,14 @@ systemd_analyze_CFLAGS = \ systemd_analyze_LDADD = \ libcore.la -# ------------------------------------------------------------------------------ +#@src/initctl/Makefile --------------------------------------------------------- systemd_initctl_SOURCES = \ src/initctl/initctl.c systemd_initctl_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-update-utmp/Makefile --------------------------------------------- systemd_update_utmp_SOURCES = \ src/update-utmp/update-utmp.c @@ -2375,14 +2433,14 @@ systemd_update_utmp_LDADD = \ libshared.la \ $(AUDIT_LIBS) -# ------------------------------------------------------------------------------ +#@src/systemd-update-done/Makefile --------------------------------------------- systemd_update_done_SOURCES = \ src/update-done/update-done.c systemd_update_done_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-shutdown/Makefile ------------------------------------------------ systemd_shutdown_SOURCES = \ src/core/umount.c \ src/core/umount.h \ @@ -2395,7 +2453,7 @@ systemd_shutdown_SOURCES = \ systemd_shutdown_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/modules-load/Makefile ---------------------------------------------------- if HAVE_KMOD systemd_modules_load_SOURCES = \ src/modules-load/modules-load.c @@ -2423,14 +2481,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 -# ------------------------------------------------------------------------------ +#@src/systemd-tmpfiles/Makefile ------------------------------------------------ if ENABLE_TMPFILES systemd_tmpfiles_SOURCES = \ src/tmpfiles/tmpfiles.c @@ -2465,7 +2523,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 \ @@ -2480,7 +2538,7 @@ TIMERS_TARGET_WANTS += \ INSTALL_DIRS += \ $(tmpfilesdir) \ $(sysconfdir)/tmpfiles.d -endif +endif # ENABLE_TMPFILES EXTRA_DIST += \ tmpfiles.d/systemd.conf.m4 \ @@ -2489,7 +2547,7 @@ EXTRA_DIST += \ units/systemd-tmpfiles-setup.service.in \ units/systemd-tmpfiles-clean.service.in -# ------------------------------------------------------------------------------ +#@src/sysusers/Makefile -------------------------------------------------------- if ENABLE_SYSUSERS systemd_sysusers_SOURCES = \ src/sysusers/sysusers.c @@ -2513,11 +2571,11 @@ nodist_sysusers_DATA = \ if HAVE_REMOTE nodist_sysusers_DATA += \ sysusers.d/systemd-remote.conf -endif +endif # HAVE_REMOTE INSTALL_DIRS += \ $(sysusersdir) -endif +endif # ENABLE_SYSUSERS EXTRA_DIST += \ units/systemd-sysusers.service.in \ @@ -2525,7 +2583,7 @@ EXTRA_DIST += \ sysusers.d/systemd-remote.conf.m4 \ sysusers.d/basic.conf.in -# ------------------------------------------------------------------------------ +#@discard.mk ------------------------------------------------------------------- dist_factory_etc_DATA = \ factory/etc/nsswitch.conf @@ -2533,9 +2591,9 @@ if HAVE_PAM dist_factory_pam_DATA = \ factory/etc/pam.d/system-auth \ factory/etc/pam.d/other -endif +endif # HAVE_PAM -# ------------------------------------------------------------------------------ +#@src/systemd-firstboot/Makefile ----------------------------------------------- if ENABLE_FIRSTBOOT systemd_firstboot_SOURCES = \ src/firstboot/firstboot.c @@ -2552,12 +2610,12 @@ nodist_systemunit_DATA += \ SYSINIT_TARGET_WANTS += \ systemd-firstboot.service -endif +endif # ENABLE_FIRSTBOOT EXTRA_DIST += \ units/systemd-firstboot.service.in -# ------------------------------------------------------------------------------ +#@src/machine-id-setup/Makefile ------------------------------------------------ systemd_machine_id_setup_SOURCES = \ src/machine-id-setup/machine-id-setup-main.c \ src/core/machine-id-setup.c \ @@ -2569,35 +2627,35 @@ systemd_machine_id_setup_LDADD = \ SYSINIT_TARGET_WANTS += \ systemd-machine-id-commit.service -# ------------------------------------------------------------------------------ +#@src/sysctl/Makefile ---------------------------------------------------------- systemd_sysctl_SOURCES = \ src/sysctl/sysctl.c systemd_sysctl_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/sleep/Makefile ----------------------------------------------------------- systemd_sleep_SOURCES = \ src/sleep/sleep.c systemd_sleep_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-fsck/Makefile ---------------------------------------------------- systemd_fsck_SOURCES = \ src/fsck/fsck.c systemd_fsck_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-ac-power/Makefile ------------------------------------------------ systemd_ac_power_SOURCES = \ src/ac-power/ac-power.c systemd_ac_power_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-detect-virt/Makefile --------------------------------------------- systemd_detect_virt_SOURCES = \ src/detect-virt/detect-virt.c @@ -2607,28 +2665,28 @@ systemd_detect_virt_LDADD = \ INSTALL_EXEC_HOOKS += \ systemd-detect-virt-install-hook -# ------------------------------------------------------------------------------ +#@src/systemd-delta/Makefile --------------------------------------------------- systemd_delta_SOURCES = \ src/delta/delta.c systemd_delta_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/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 ----------------------------------------- systemd_debug_generator_SOURCES = \ src/debug-generator/debug-generator.c systemd_debug_generator_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-fstab-generator/Makefile ----------------------------------------- systemd_fstab_generator_SOURCES = \ src/fstab-generator/fstab-generator.c \ src/core/mount-setup.c @@ -2636,14 +2694,14 @@ systemd_fstab_generator_SOURCES = \ systemd_fstab_generator_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/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 ---------------------------------------- if ENABLE_HIBERNATE systemgenerator_PROGRAMS += \ systemd-hibernate-resume-generator @@ -2671,14 +2729,14 @@ 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 -# ------------------------------------------------------------------------------ +#@src/grp-boot/bootctl/Makefile ------------------------------------------------ if ENABLE_EFI if HAVE_BLKID bootctl_SOURCES = \ @@ -2705,9 +2763,10 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_bootctl -endif - -# ------------------------------------------------------------------------------ +endif # HAVE_BLKID +endif # ENABLE_EFI +#@src/grp-boot/systemd-boot/Makefile ------------------------------------------- +if ENABLE_EFI if HAVE_GNUEFI efi_cppflags = \ $(EFI_CPPFLAGS) \ @@ -2739,13 +2798,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) \ @@ -2764,9 +2823,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 = \ @@ -2808,8 +2867,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) @@ -2858,8 +2917,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) @@ -2875,7 +2934,7 @@ test-efi: test-efi-disk.img EXTRA_DIST += test/test-efi-create-disk.sh -# ------------------------------------------------------------------------------ +#@src/systemd-gpt-auto-generator/Makefile -------------------------------------- if HAVE_BLKID systemgenerator_PROGRAMS += \ systemd-gpt-auto-generator @@ -2891,9 +2950,9 @@ systemd_gpt_auto_generator_LDADD = \ systemd_gpt_auto_generator_CFLAGS = \ $(AM_CFLAGS) \ $(BLKID_CFLAGS) -endif +endif # HAVE_BLKID -# ------------------------------------------------------------------------------ +#@src/systemd-dbus1-generator/Makefile ----------------------------------------- systemgenerator_PROGRAMS += \ systemd-dbus1-generator @@ -2917,21 +2976,21 @@ dist_xinitrc_SCRIPTS = \ INSTALL_EXEC_HOOKS += dbus1-generator-install-hook UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook -# ------------------------------------------------------------------------------ +#@src/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 -------------------------------------- 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 ---------------------------------------------- systemd_remount_fs_SOURCES = \ src/remount-fs/remount-fs.c \ src/core/mount-setup.c \ @@ -2940,70 +2999,70 @@ systemd_remount_fs_SOURCES = \ systemd_remount_fs_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-cgroups-agent/Makefile ------------------------------------------- systemd_cgroups_agent_SOURCES = \ src/cgroups-agent/cgroups-agent.c systemd_cgroups_agent_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-escape/Makefile -------------------------------------------------- systemd_escape_SOURCES = \ src/escape/escape.c systemd_escape_LDADD = \ libshared.la -# ----------------------------------------------------------------------------- +#@src/grp-system/systemctl/Makefile -------------------------------------------- systemctl_SOURCES = \ src/systemctl/systemctl.c systemctl_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-notify/Makefile -------------------------------------------------- systemd_notify_SOURCES = \ src/notify/notify.c systemd_notify_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-path/Makefile ---------------------------------------------------- systemd_path_SOURCES = \ src/path/path.c systemd_path_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/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 ------------------------------------------ systemd_reply_password_SOURCES = \ src/reply-password/reply-password.c systemd_reply_password_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-cgls/Makefile ---------------------------------------------------- systemd_cgls_SOURCES = \ src/cgls/cgls.c systemd_cgls_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-cgtop/Makefile --------------------------------------------------- systemd_cgtop_SOURCES = \ src/cgtop/cgtop.c systemd_cgtop_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/systemd-nspawn/Makefile -------------------------------------------------- systemd_nspawn_SOURCES = \ src/nspawn/nspawn.c \ src/nspawn/nspawn-settings.c \ @@ -3049,7 +3108,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 \ @@ -3062,28 +3121,28 @@ test_patch_uid_LDADD = \ manual_tests += \ test-patch-uid -# ------------------------------------------------------------------------------ +#@src/systemd-run/Makefile ----------------------------------------------------- systemd_run_SOURCES = \ src/run/run.c systemd_run_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/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 ---------------------------------- systemd_tty_ask_password_agent_SOURCES = \ src/tty-ask-password-agent/tty-ask-password-agent.c systemd_tty_ask_password_agent_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/libsystemd/libsystemd-internal/Makefile ---------------------------------- libsystemd_internal_la_SOURCES = \ src/systemd/sd-bus.h \ src/systemd/sd-bus-protocol.h \ @@ -3181,6 +3240,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 \ @@ -3206,6 +3266,7 @@ libsystemd_la_LIBADD = \ $(libsystemd_internal_la_LIBADD) \ $(libsystemd_journal_internal_la_LIBADD) +#@discard.mk libsystemd-install-hook: libname=libsystemd.so && $(move-to-rootlibdir) @@ -3215,6 +3276,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 @@ -3230,6 +3292,8 @@ pkginclude_HEADERS += \ lib_LTLIBRARIES += \ libsystemd.la +# ------------------------------------------------------------------------------ + tests += \ test-bus-marshal \ test-bus-signature \ @@ -3251,9 +3315,11 @@ tests += \ test-local-addresses \ test-resolve +#@src/busctl/Makefile bin_PROGRAMS += \ busctl +#@src/libsystemd/libsystemd-internal/Makefile test_bus_marshal_SOURCES = \ src/libsystemd/sd-bus/test-bus-marshal.c @@ -3372,18 +3438,21 @@ test_netlink_SOURCES = \ test_netlink_LDADD = \ libshared.la +#@src/libshared/Makefile test_local_addresses_SOURCES = \ src/libsystemd/sd-netlink/test-local-addresses.c test_local_addresses_LDADD = \ libshared.la +#@src/libsystemd/libsystemd-internal/Makefile test_resolve_SOURCES = \ src/libsystemd/sd-resolve/test-resolve.c test_resolve_LDADD = \ libshared.la +#@src/busctl/Makefile busctl_SOURCES = \ src/libsystemd/sd-bus/busctl.c \ src/libsystemd/sd-bus/busctl-introspect.c \ @@ -3392,7 +3461,7 @@ busctl_SOURCES = \ busctl_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/libsystemd-network/Makefile ---------------------------------------------- noinst_LTLIBRARIES += \ libsystemd-network.la @@ -3540,7 +3609,7 @@ tests += \ test-dhcp6-client \ test-lldp -# ------------------------------------------------------------------------------ +#@src/libudev/src/Makefile ----------------------------------------------------- include_HEADERS += \ src/libudev/libudev.h @@ -3575,6 +3644,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) @@ -3592,7 +3662,7 @@ noinst_LTLIBRARIES += \ libudev_internal_la_SOURCES =\ $(libudev_la_SOURCES) -# ------------------------------------------------------------------------------ +#@src/udev/Makefile ------------------------------------------------------------ INSTALL_DIRS += \ $(sysconfdir)/udev/rules.d @@ -3712,12 +3782,12 @@ libudev_core_la_SOURCES += \ dist_udevrules_DATA += \ rules/80-drivers.rules -endif +endif # HAVE_KMOD if HAVE_BLKID libudev_core_la_SOURCES += \ src/udev/udev-builtin-blkid.c -endif +endif # HAVE_BLKID if HAVE_ACL libudev_core_la_SOURCES += \ @@ -3725,7 +3795,7 @@ 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 systemd_udevd_SOURCES = \ src/udev/udevd.c @@ -3749,7 +3819,7 @@ udevadm_SOURCES = \ udevadm_LDADD = \ libudev-core.la -# ------------------------------------------------------------------------------ +#@src/systemd-hwdb/Makefile ---------------------------------------------------- if ENABLE_HWDB INSTALL_DIRS += \ $(sysconfdir)/udev/hwdb.d @@ -3793,14 +3863,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 @@ -3812,9 +3882,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 @@ -3839,7 +3909,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 @@ -3859,7 +3929,7 @@ EXTRA_DIST += \ test/sysv-generator-test.py \ test/mocks/fsck -# ------------------------------------------------------------------------------ +#@src/udev/ata_id/Makefile ----------------------------------------------------- ata_id_SOURCES = \ src/udev/ata_id/ata_id.c @@ -3869,7 +3939,7 @@ ata_id_LDADD = \ udevlibexec_PROGRAMS += \ ata_id -# ------------------------------------------------------------------------------ +#@src/udev/cdrom_id/Makefile --------------------------------------------------- cdrom_id_SOURCES = \ src/udev/cdrom_id/cdrom_id.c @@ -3882,7 +3952,7 @@ udevlibexec_PROGRAMS += \ dist_udevrules_DATA += \ rules/60-cdrom_id.rules -# ------------------------------------------------------------------------------ +#@src/udev/collect/Makefile ---------------------------------------------------- collect_SOURCES = \ src/udev/collect/collect.c @@ -3892,7 +3962,7 @@ collect_LDADD = \ udevlibexec_PROGRAMS += \ collect -# ------------------------------------------------------------------------------ +#@src/udev/scsi_id/Makefile ---------------------------------------------------- scsi_id_SOURCES =\ src/udev/scsi_id/scsi_id.c \ src/udev/scsi_id/scsi_serial.c \ @@ -3908,7 +3978,7 @@ udevlibexec_PROGRAMS += \ EXTRA_DIST += \ src/udev/scsi_id/README -# ------------------------------------------------------------------------------ +#@src/udev/v4l_id/Makefile ----------------------------------------------------- v4l_id_SOURCES = \ src/udev/v4l_id/v4l_id.c @@ -3921,7 +3991,7 @@ udevlibexec_PROGRAMS += \ dist_udevrules_DATA += \ rules/60-persistent-v4l.rules -# ------------------------------------------------------------------------------ +#@src/udev/mtd_probe/Makefile -------------------------------------------------- mtd_probe_SOURCES = \ src/udev/mtd_probe/mtd_probe.c \ src/udev/mtd_probe/mtd_probe.h \ @@ -3933,7 +4003,7 @@ dist_udevrules_DATA += \ udevlibexec_PROGRAMS += \ mtd_probe -# ------------------------------------------------------------------------------ +#@src/test/Makefile ------------------------------------------------------------ test_id128_SOURCES = \ src/test/test-id128.c @@ -3943,7 +4013,7 @@ test_id128_LDADD = \ tests += \ test-id128 -# ------------------------------------------------------------------------------ +#@src/systemd-activate/Makefile ------------------------------------------------ bin_PROGRAMS += \ systemd-socket-activate @@ -3954,7 +4024,7 @@ systemd_socket_activate_SOURCES = \ systemd_socket_activate_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/grp-journal/systemd-journald/Makefile ------------------------------------ systemd_journald_SOURCES = \ src/journal/journald.c \ src/journal/journald-server.h @@ -3969,6 +4039,7 @@ systemd_cat_SOURCES = \ systemd_cat_LDADD = \ libjournal-core.la +#@src/grp-journal-remote/systemd-journal-upload/Makefile if HAVE_LIBCURL rootlibexec_PROGRAMS += \ systemd-journal-upload @@ -3997,6 +4068,7 @@ EXTRA_DIST += \ units/systemd-journal-upload.service.in \ src/journal-remote/journal-upload.conf.in +#@src/grp-journal-remote/systemd-journal-remote/Makefile if HAVE_MICROHTTPD rootlibexec_PROGRAMS += \ systemd-journal-remote @@ -4026,12 +4098,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 += \ @@ -4054,8 +4126,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 +#@src/grp-journal/journalctl/Makefile # using _CFLAGS = in the conditional below would suppress AM_CFLAGS journalctl_CFLAGS = \ $(AM_CFLAGS) @@ -4077,8 +4150,9 @@ journalctl_CFLAGS += \ journalctl_LDADD += \ $(QRENCODE_LIBS) -endif +endif # HAVE_QRENCODE +#@src/grp-journal/Makefile test_journal_SOURCES = \ src/journal/test-journal.c @@ -4173,6 +4247,7 @@ test_audit_type_SOURCES = \ test_audit_type_LDADD = \ libjournal-core.la +#@src/grp-journal/libjournal-core/Makefile libjournal_core_la_SOURCES = \ src/journal/journald-kmsg.c \ src/journal/journald-kmsg.h \ @@ -4203,6 +4278,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 @@ -4251,8 +4327,9 @@ if HAVE_COMPRESSION tests += \ test-compress \ test-compress-benchmark -endif +endif # HAVE_COMPRESSION +#@src/libsystemd/libsystemd-journal-internal/Makefile pkginclude_HEADERS += \ src/systemd/sd-journal.h \ src/systemd/sd-messages.h \ @@ -4301,12 +4378,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 += \ @@ -4322,10 +4402,11 @@ libsystemd_journal_internal_la_LIBADD += \ libsystemd_journal_internal_la_CFLAGS += \ $(GCRYPT_CFLAGS) \ -Wno-pointer-arith -endif +endif # HAVE_GCRYPT noinst_LTLIBRARIES += \ libsystemd-journal-internal.la +#@src/journal/Makefile rootlibexec_PROGRAMS += \ systemd-journald @@ -4399,7 +4480,7 @@ systemd_journal_gatewayd_LDADD = \ if HAVE_GNUTLS systemd_journal_gatewayd_LDADD += \ $(GNUTLS_LIBS) -endif +endif # HAVE_GNUTLS systemd_journal_gatewayd_CFLAGS = \ $(AM_CFLAGS) \ @@ -4418,12 +4499,12 @@ nodist_systemunit_DATA += \ dist_gatewayddocumentroot_DATA = \ src/journal-remote/browse.html -endif +endif # HAVE_MICROHTTPD EXTRA_DIST += \ units/systemd-journal-gatewayd.service.in -# ------------------------------------------------------------------------------ +#@src/socket-proxy/Makefile ---------------------------------------------------- systemd_socket_proxyd_SOURCES = \ src/socket-proxy/socket-proxyd.c @@ -4431,7 +4512,7 @@ systemd_socket_proxyd_SOURCES = \ systemd_socket_proxyd_LDADD = \ libshared.la -# ------------------------------------------------------------------------------ +#@src/grp-coredump/systemd-coredump/Makefile ----------------------------------- if ENABLE_COREDUMP systemd_coredump_SOURCES = \ src/coredump/coredump.c \ @@ -4448,7 +4529,7 @@ systemd_coredump_SOURCES += \ systemd_coredump_LDADD += \ $(ELFUTILS_LIBS) -endif +endif # HAVE_ELFUTILS nodist_systemunit_DATA += \ units/systemd-coredump@.service @@ -4465,6 +4546,7 @@ rootlibexec_PROGRAMS += \ dist_pkgsysconf_DATA += \ src/coredump/coredump.conf +#@src/grp-coredump/coredumpctl/Makefile coredumpctl_SOURCES = \ src/coredump/coredumpctl.c @@ -4474,6 +4556,7 @@ coredumpctl_LDADD = \ bin_PROGRAMS += \ coredumpctl +#@src/grp-coredump/systemd-coredump/Makefile manual_tests += \ test-coredump-vacuum @@ -4485,24 +4568,26 @@ test_coredump_vacuum_SOURCES = \ test_coredump_vacuum_LDADD = \ libshared.la +#@src/grp-coredump/coredumpctl/Makefile dist_bashcompletion_data += \ shell-completion/bash/coredumpctl dist_zshcompletion_data += \ shell-completion/zsh/_coredumpctl +#@src/grp-coredump/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 -# ------------------------------------------------------------------------------ +#@src/systemd-binfmt/Makefile -------------------------------------------------- if ENABLE_BINFMT systemd_binfmt_SOURCES = \ src/binfmt/binfmt.c @@ -4528,12 +4613,12 @@ SYSINIT_TARGET_WANTS += \ systemd-binfmt.service \ proc-sys-fs-binfmt_misc.automount -endif +endif # ENABLE_BINFMT EXTRA_DIST += \ units/systemd-binfmt.service.in -# ------------------------------------------------------------------------------ +#@src/systemd-vconsole/Makefile ------------------------------------------------ if ENABLE_VCONSOLE systemd_vconsole_setup_SOURCES = \ src/vconsole/vconsole-setup.c @@ -4552,13 +4637,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 -# ------------------------------------------------------------------------------ +#@src/systemd-quotacheck/Makefile ---------------------------------------------- if ENABLE_QUOTACHECK rootlibexec_PROGRAMS += \ systemd-quotacheck @@ -4571,7 +4656,7 @@ systemd_quotacheck_SOURCES = \ systemd_quotacheck_LDADD = \ libshared.la -endif +endif # ENABLE_QUOTACHECK EXTRA_DIST += \ units/systemd-quotacheck.service.in @@ -4579,7 +4664,7 @@ EXTRA_DIST += \ nodist_systemunit_DATA += \ units/quotaon.service -# ------------------------------------------------------------------------------ +#@src/systemd-random-seed/Makefile --------------------------------------------- if ENABLE_RANDOMSEED rootlibexec_PROGRAMS += \ systemd-random-seed @@ -4596,12 +4681,12 @@ systemd_random_seed_LDADD = \ SYSINIT_TARGET_WANTS += \ systemd-random-seed.service -endif +endif # ENABLE_RANDOMSEED EXTRA_DIST += \ units/systemd-random-seed.service.in -# ------------------------------------------------------------------------------ +#@src/systemd-backlight/Makefile ----------------------------------------------- if ENABLE_BACKLIGHT rootlibexec_PROGRAMS += \ systemd-backlight @@ -4614,12 +4699,12 @@ systemd_backlight_SOURCES = \ systemd_backlight_LDADD = \ libshared.la -endif +endif # ENABLE_BACKLIGHT EXTRA_DIST += \ units/systemd-backlight@.service.in -# ------------------------------------------------------------------------------ +#@src/systemd-rfkill/Makefile -------------------------------------------------- if ENABLE_RFKILL rootlibexec_PROGRAMS += \ systemd-rfkill @@ -4635,12 +4720,12 @@ systemd_rfkill_SOURCES = \ systemd_rfkill_LDADD = \ libshared.la -endif +endif # ENABLE_RFKILL EXTRA_DIST += \ units/systemd-rfkill.service.in -# ------------------------------------------------------------------------------ +#@src/systemd-cryptsetup/Makefile ---------------------------------------------- if HAVE_LIBCRYPTSETUP rootlibexec_PROGRAMS += \ systemd-cryptsetup @@ -4672,9 +4757,9 @@ systemd_cryptsetup_generator_LDADD = \ SYSINIT_TARGET_WANTS += \ cryptsetup.target -endif +endif # HAVE_LIBCRYPTSETUP -# ------------------------------------------------------------------------------ +#@src/hostname/Makefile -------------------------------------------------------- if ENABLE_HOSTNAMED systemd_hostnamed_SOURCES = \ src/hostname/hostnamed.c @@ -4720,7 +4805,7 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_hostnamectl -endif +endif # ENABLE_HOSTNAMED polkitpolicy_in_files += \ src/hostname/org.freedesktop.hostname1.policy.in @@ -4728,14 +4813,14 @@ polkitpolicy_in_files += \ 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 -# ------------------------------------------------------------------------------ +#@src/locale/Makefile ---------------------------------------------------------- if ENABLE_LOCALED systemd_localed_SOURCES = \ src/locale/localed.c @@ -4790,7 +4875,7 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_localectl -endif +endif # ENABLE_LOCALED .PHONY: update-kbd-model-map @@ -4800,7 +4885,7 @@ polkitpolicy_in_files += \ EXTRA_DIST += \ units/systemd-localed.service.in -# ------------------------------------------------------------------------------ +#@src/grp-timedate/systemd-timedated/Makefile ---------------------------------- if ENABLE_TIMEDATED systemd_timedated_SOURCES = \ src/timedate/timedated.c @@ -4832,6 +4917,9 @@ SYSTEM_UNIT_ALIASES += \ BUSNAMES_TARGET_WANTS += \ org.freedesktop.timedate1.busname +endif # ENABLE_TIMEDATED +#@src/grp-timedate/timedatectl/Makefile +if ENABLE_TIMEDATED timedatectl_SOURCES = \ src/timedate/timedatectl.c @@ -4846,7 +4934,8 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_timedatectl -endif +endif # ENABLE_TIMEDATED +#@src/grp-timedate/systemd-timedated/Makefile polkitpolicy_in_files += \ src/timedate/org.freedesktop.timedate1.policy.in @@ -4854,7 +4943,7 @@ polkitpolicy_in_files += \ EXTRA_DIST += \ units/systemd-timedated.service.in -# ------------------------------------------------------------------------------ +#@src/systemd-timesync/Makefile ------------------------------------------------ if ENABLE_TIMESYNCD systemd_timesyncd_SOURCES = \ src/timesync/timesyncd.c \ @@ -4884,7 +4973,7 @@ GENERAL_ALIASES += \ nodist_pkgsysconf_DATA += \ src/timesync/timesyncd.conf -endif +endif # ENABLE_TIMESYNCD gperf_gperf_sources += \ src/timesync/timesyncd-gperf.gperf @@ -4893,7 +4982,7 @@ EXTRA_DIST += \ units/systemd-timesyncd.service.in \ src/timesync/timesyncd.conf.in -# ------------------------------------------------------------------------------ +#@discard.mk ------------------------------------------------------------------- test_nss_SOURCES = \ src/test/test-nss.c @@ -4904,7 +4993,7 @@ test_nss_LDADD = \ manual_tests += \ test-nss -# ------------------------------------------------------------------------------ +#@src/nss-myhostname/Makefile -------------------------------------------------- if HAVE_MYHOSTNAME libnss_myhostname_la_SOURCES = \ src/nss-myhostname/nss-myhostname.sym \ @@ -4924,10 +5013,9 @@ libnss_myhostname_la_LIBADD = \ lib_LTLIBRARIES += \ libnss_myhostname.la -endif +endif # HAVE_MYHOSTNAME -# ------------------------------------------------------------------------------ -if ENABLE_MACHINED +#@src/grp-machine/systemd-machined/Makefile ------------------------------------ systemd_machined_SOURCES = \ src/machine/machined.c \ src/machine/machined.h @@ -4938,6 +5026,7 @@ 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 \ @@ -4955,6 +5044,7 @@ libmachine_core_la_LIBADD = \ noinst_LTLIBRARIES += \ libmachine-core.la +#@src/grp-machine/machinectl/Makefile machinectl_SOURCES = \ src/machine/machinectl.c @@ -4964,6 +5054,7 @@ machinectl_LDADD = \ rootbin_PROGRAMS += \ machinectl +#@src/grp-machine/libmachine-core/Makefile test_machine_tables_SOURCES = \ src/machine/test-machine-tables.c @@ -4973,6 +5064,7 @@ test_machine_tables_LDADD = \ tests += \ test-machine-tables +#@src/grp-machine/systemd-machined/Makefile nodist_systemunit_DATA += \ units/systemd-machined.service @@ -4991,6 +5083,7 @@ dist_dbuspolicy_DATA += \ polkitpolicy_files += \ src/machine/org.freedesktop.machine1.policy +#@src/grp-machine/machinectl/Makefile dist_bashcompletion_data += \ shell-completion/bash/machinectl @@ -4998,12 +5091,15 @@ dist_zshcompletion_data += \ shell-completion/zsh/_machinectl \ shell-completion/zsh/_sd_machines +#@src/grp-machine/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 + libnss_mymachines_la_SOURCES = \ src/nss-mymachines/nss-mymachines.sym \ src/nss-mymachines/nss-mymachines.c @@ -5023,7 +5119,7 @@ libnss_mymachines_la_LIBADD = \ lib_LTLIBRARIES += \ libnss_mymachines.la -endif +#@src/grp-machine/systemd-machined/Makefile polkitpolicy_in_files += \ src/machine/org.freedesktop.machine1.policy.in @@ -5031,7 +5127,7 @@ polkitpolicy_in_files += \ EXTRA_DIST += \ units/systemd-machined.service.in -# ------------------------------------------------------------------------------ +#@src/import/Makefile ---------------------------------------------------------- if ENABLE_IMPORTD if HAVE_LIBCURL @@ -5082,6 +5178,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\" @@ -5091,7 +5188,7 @@ systemd_pull_LDADD = \ $(LIBCURL_LIBS) \ $(XZ_LIBS) \ $(ZLIB_LIBS) \ - -lbz2 \ + $(BZIP2_LIBS) \ $(GCRYPT_LIBS) systemd_import_SOURCES = \ @@ -5110,13 +5207,14 @@ systemd_import_SOURCES = \ systemd_import_CFLAGS = \ $(AM_CFLAGS) \ $(XZ_CFLAGS) \ - $(ZLIB_CFLAGS) + $(ZLIB_CFLAGS) \ + $(BZIP2_CFLAGS) systemd_import_LDADD = \ libshared.la \ $(XZ_LIBS) \ $(ZLIB_LIBS) \ - -lbz2 + $(BZIP2_LIBS) systemd_export_SOURCES = \ src/import/export.c \ @@ -5132,13 +5230,14 @@ systemd_export_SOURCES = \ systemd_export_CFLAGS = \ $(AM_CFLAGS) \ $(XZ_CFLAGS) \ - $(ZLIB_CFLAGS) + $(ZLIB_CFLAGS) \ + $(BZIP2_CFLAGS) systemd_export_LDADD = \ libshared.la \ $(XZ_LIBS) \ $(ZLIB_LIBS) \ - -lbz2 + $(BZIP2_LIBS) dist_rootlibexec_DATA = \ src/import/import-pubring.gpg @@ -5180,13 +5279,13 @@ test_qcow2_LDADD = \ libshared.la \ $(ZLIB_LIBS) -endif -endif -endif -endif -endif +endif # HAVE_GCRYPT +endif # HAVE_BZIP2 +endif # HAVE_ZLIB +endif # HAVE_XZ +endif # HAVE_LIBCURL -endif +endif # ENABLE_IMPORTD polkitpolicy_in_files += \ src/import/org.freedesktop.import1.policy.in @@ -5195,7 +5294,7 @@ EXTRA_DIST += \ units/systemd-importd.service.in -# ------------------------------------------------------------------------------ +#@src/grp-resolve/systemd-resolved/Makefile ------------------------------------ if ENABLE_RESOLVED basic_dns_sources = \ @@ -5392,7 +5491,7 @@ test_dnssec_complex_SOURCES = \ test_dnssec_complex_LDADD = \ libshared.la -endif +endif # ENABLE_RESOLVED gperf_txt_sources += \ src/resolve/dns_type-list.txt @@ -5404,7 +5503,7 @@ EXTRA_DIST += \ units/systemd-resolved.service.m4.in \ src/resolve/resolved.conf.in -# ------------------------------------------------------------------------------ +#@src/network/Makefile --------------------------------------------------------- if ENABLE_NETWORKD rootlibexec_PROGRAMS += \ systemd-networkd @@ -5418,7 +5517,7 @@ systemd_networkd_LDADD = \ if HAVE_LIBIPTC systemd_networkd_LDADD += \ libfirewall.la -endif +endif # HAVE_LIBIPTC noinst_LTLIBRARIES += \ libnetworkd-core.la @@ -5533,7 +5632,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 \ @@ -5546,7 +5645,7 @@ test_network_tables_LDADD = \ if HAVE_LIBIPTC test_network_tables_LDADD += \ libfirewall.la -endif +endif # HAVE_LIBIPTC tests += \ test-networkd-conf \ @@ -5580,7 +5679,7 @@ SYSTEM_UNIT_ALIASES += \ BUSNAMES_TARGET_WANTS += \ org.freedesktop.network1.busname -endif +endif # ENABLE_NETWORKD gperf_gperf_sources += \ src/network/networkd-gperf.gperf \ @@ -5592,7 +5691,7 @@ EXTRA_DIST += \ units/systemd-networkd-wait-online.service.in \ test/networkd-test.py -# ------------------------------------------------------------------------------ +#@src/login/Makefile ----------------------------------------------------------- if ENABLE_LOGIND systemd_logind_SOURCES = \ src/login/logind.c \ @@ -5635,7 +5734,7 @@ 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 @@ -5731,7 +5830,7 @@ dist_pamconf_DATA = \ EXTRA_DIST += \ src/login/systemd-user.m4 -endif +endif # HAVE_PAM nodist_systemunit_DATA += \ units/systemd-logind.service @@ -5774,7 +5873,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 @@ -5806,12 +5905,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 \ @@ -5859,7 +5958,7 @@ EXTRA_DIST += \ test/loopy.service.d \ test/loopy.service.d/compat.conf -# ------------------------------------------------------------------------------ +#@build-aux/Makefile.once.head/20-systemd.mk ----------------------------------- substitutions = \ '|rootlibexecdir=$(rootlibexecdir)|' \ '|rootbindir=$(rootbindir)|' \ @@ -5927,15 +6026,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/20-systemd.mk sysctl.d/%: sysctl.d/%.in $(SED_PROCESS) +#@discard.mk %.pc: %.pc.in $(SED_PROCESS) @@ -5957,6 +6059,7 @@ shell-completion/%: shell-completion/%.in %.conf: %.conf.in $(SED_PROCESS) +#@build-aux/Makefile.each.tail/20-systemd.mk %.sh: %.sh.in $(SED_PROCESS) $(AM_V_GEN)chmod +x $@ @@ -5969,6 +6072,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) < $< > $@ @@ -5990,7 +6094,7 @@ 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) \ @@ -6066,7 +6170,7 @@ docs/var-log/README: docs/var-log/README.in CLEANFILES += \ docs/sysvinit/README \ docs/var-log/README -endif +endif # HAVE_SYSV_COMPAT EXTRA_DIST += \ docs/sysvinit/README.in \ @@ -6083,11 +6187,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 @@ -6119,7 +6223,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 \ @@ -6152,7 +6256,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 \ @@ -6208,7 +6312,7 @@ else DISTCHECK_CONFIGURE_FLAGS += \ --with-sysvinit-path= \ --with-sysvrcnd-path= -endif +endif # HAVE_SYSV_COMPAT if ENABLE_SPLIT_USR DISTCHECK_CONFIGURE_FLAGS += \ @@ -6216,7 +6320,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) @@ -6239,6 +6343,7 @@ dist-check-includes: $(public_headers) done; \ done; exit $$res +#@hwdb/Makefile .PHONY: hwdb-update hwdb-update: ( cd $(top_srcdir)/hwdb && \ @@ -6249,6 +6354,7 @@ hwdb-update: wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt' && \ ./ids-update.pl ) +#@discard.mk .PHONY: built-sources built-sources: $(BUILT_SOURCES) @@ -6272,6 +6378,7 @@ install-tree: all $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree tree $(abs_srcdir)/install-tree +#@build-aux/Makefile.once.tail/20-systemd.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 @@ -6324,6 +6431,7 @@ check-includes: $(top_srcdir)/tools/check-includes.pl EXTRA_DIST += \ $(top_srcdir)/tools/check-includes.pl +#@build-aux/Makefile.once.head/20-systemd.mk # Stupid test that everything purported to be exported really is define generate-sym-test $(AM_V_at)$(MKDIR_P) $(dir $@) @@ -6336,6 +6444,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 \ @@ -6348,16 +6457,19 @@ test-libsystemd-sym.c: \ src/systemd/sd-event.h $(generate-sym-test) +#@src/libudev/src/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/src/Makefile nodist_test_libudev_sym_SOURCES = \ test-libudev-sym.c test_libudev_sym_CFLAGS = \ @@ -6366,6 +6478,7 @@ test_libudev_sym_CFLAGS = \ test_libudev_sym_LDADD = \ libudev.la +#@discard.mk BUILT_SOURCES += \ test-libsystemd-sym.c \ test-libudev-sym.c @@ -6378,6 +6491,7 @@ tests += \ test-libsystemd-sym \ test-libudev-sym +#@build-aux/Makefile.once.tail/20-systemd.mk .PHONY: cppcheck cppcheck: cppcheck --enable=all -q $(top_srcdir) @@ -6397,3 +6511,24 @@ 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 - +#@src/Makefile + +#@src/libudev/Makefile +at.subdirs += src + +#@src/libsystemd/libsystemd-internal/subdir.mk +systemd.CPPFLAGS += -DLIBDIR=\"$(libdir)\" +systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" + +#@src/grp-boot/Makefile +at.subdirs += bootctl systemd-boot + +#@src/grp-coredump/Makefile +at.subdirs += coredumpctl systemd-coredump + +#@src/grp-machine/Makefile +at.subdirs += machinectl systemd-machined +at.subdirs += nss-mymachines + +#@all +include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/move.sh b/move.sh new file mode 100755 index 0000000000..22caeb8a6f --- /dev/null +++ b/move.sh @@ -0,0 +1,281 @@ +#!/usr/bin/env bash + +in_array() { + local needle=$1; shift + local item + for item in "$@"; do + [[ $item = $needle ]] && return 0 # Found + done + return 1 # Not Found +} + +move_files() ( + for d in libsystemd libudev; do + mkdir src/$d-new + mv -T src/$d src/$d-new/src + mv -T src/$d-new src/$d + done + + for d in basic core shared; do + mv -T src/{,lib}$d + done + + pfix=( + dbus1-generator + debug-generator + fstab-generator + getty-generator + gpt-auto-generator + rc-local-generator + system-update-generator + sysv-generator + + ac-power + activate + analyze + ask-password + backlight + binfmt + bootchart + cgls + cgroups-agent + cgtop + coredump + cryptsetup + delta + detect-virt + escape + firstboot + fsck + hibernate-resume + hwdb + notify + nspawn + path + quotacheck + random-seed + remount-fs + reply-password + rfkill + run + timesync + tmpfiles + tty-ask-password-agent + update-done + update-utmp + user-sessions + vconsole + ) + for d in "${pfix[@]}"; do + mv -T src/{,systemd-}$d + done + + + mv -T {,src/journal/}catalog + + mv -T {shell-completion/bash/,src/kernel-install/bash-completion_}kernel-install + mv -T {shell-completion/zsh/_,src/kernel-install/zsh-completion_}kernel-install + mv -T {man,src/kernel-install}/kernel-install.xml + + mv -T src/lib{shared,core}/linux + + mv -T src/{,libsystemd/}/compat-libs + mkdir src/libsystemd/include + mv -T src/{,libsystemd/include}/systemd + + mkdir src/grp-machine + mv -T src/machine src/grp-machine/libmachine-core + mkdir src/grp-machine/systemd-machined + mv -T src/grp-machine/{libmachine-core,systemd-machined}/machined.c + mkdir src/grp-machine/machinectl + mv -T src/grp-machine/{libmachine-core,machinectl}/machinectl.c + mv -T src/{,grp-machine}/nss-mymachines + + mkdir src/grp-resolve + mv -T src/{resolve,grp-resolve/systemd-resolved} + mv -T src/{,grp-resolve}/nss-resolve + + mkdir src/grp-system + mv -T src/{,grp-system}/systemctl + + mkdir src/libfirewall + mv -T src/lib{shared,firewall}/firewall-util.c + mv -T src/lib{shared,firewall}/firewall-util.h + + mkdir src/grp-system/systemd + mv -T src/{libcore,grp-system/systemd}/main.c + mv -T src/{libcore,grp-system/systemd}/macros.systemd.in + mv -T src/{libcore,grp-system/systemd}/org.freedesktop.systemd1.conf + mv -T src/{libcore,grp-system/systemd}/org.freedesktop.systemd1.policy.in.in + mv -T src/{libcore,grp-system/systemd}/org.freedesktop.systemd1.service + mv -T src/{libcore,grp-system/systemd}/system.conf + mv -T src/{libcore,grp-system/systemd}/systemd.pc.in + mv -T src/{libcore,grp-system/systemd}/triggers.systemd.in + mv -T src/{libcore,grp-system/systemd}/user.conf + + mkdir src/libudev/include + mv -T src/libudev/{src,include}/libudev.h + + mv -T {man,src/systemd-activate}/systemd-activate.xml + + mv -T src/libsystemd/{src,}/libsystemd.pc.in + mv -T src/libsystemd/{src,}/libsystemd.sym + mv -T src/libsystemd/{src,}/.gitignore + mv -T src/libsystemd/{src,libsystemd-internal} + + mkdir src/systemd-shutdown + + mkdir src/grp-coredump + mv -T src/{,grp-coredump}/systemd-coredump + mkdir src/grp-coredump/coredumpctl + mv -T src/grp-coredump/{systemd-coredump,coredumpctl}/coredumpctl.c + + mkdir src/grp-boot + mv -T src/boot/efi src/grp-boot/systemd-boot + mv -T src/boot src/grp-boot/bootctl + mv -T {test,src/grp-boot/systemd-boot}/test-efi-create-disk.sh + + mkdir build-aux + mkdir build-aux/Makefile.{once,each}.{head,tail} + touch build-aux/Makefile.{once,each}.{head,tail}/.gitignore + + mkdir src/libsystemd/libsystemd-journal-internal + + libsystemd_journal_files=( + audit-type.c + audit-type.h + catalog.c + catalog.h + compress.c + compress.h + fsprg.c + fsprg.h + journal-authenticate.c + journal-authenticate.h + journal-def.h + journal-file.c + journal-file.h + journal-internal.h + journal-send.c + journal-vacuum.c + journal-vacuum.h + journal-verify.c + journal-verify.h + lookup3.c + lookup3.h + mmap-cache.c + mmap-cache.h + sd-journal.c + ) + for file in "${libsystemd_journal_files[@]}"; do + mv -T src/{journal,libsystemd/libsystemd-journal-internal}/$file + done + + mkdir src/busctl + mv src/libsystemd/libsystemd-internal/sd-bus/busctl* src/busctl + + mv -T src/{udev,libudev/src}/udev.h + + mv -T src/{bus-proxyd,libbus-proxy-core} + mkdir src/systemd-bus-proxyd + mv src/{libbus-proxy-core,systemd-bus-proxyd}/bus-proxyd.c + mkdir src/systemd-stdio-bridge + mv src/{libbus-proxy-core,systemd-stdio-bridge}/stdio-bridge.c + + mkdir src/grp-timedate + mv -T src/timedate src/grp-timedate/systemd-timedated + mkdir src/grp-timedate/timedatectl + mv -T src/grp-timedate/{systemd-timedated,timedatectl}/timedatectl.c + + mv -T src/{libsystemd/libsystemd-internal/sd-netlink,libshared}/local-addresses.c + mv -T src/{libsystemd/libsystemd-internal/sd-netlink,libshared}/local-addresses.h + mv -T src/{libsystemd/libsystemd-internal/sd-netlink,libshared}/test-local-addresses.c +) + +breakup_makefile() ( + find . \( -name Makefile -o -name '*.mk' \) -delete + + touch .tmp.move.all + files=(.tmp.move.all) + file=/dev/null + IFS='' + while read -r line; do + if [[ $line = '#@'* ]]; then + file="${line#'#@'}" + file="${file%% *}" + 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) + rm .tmp.move.all +) + +fixup_includes() ( + find src \( -name '*.h' -o -name '*.c' \) \ + -exec grep '#include "sd-' -l -- {} + | + xargs -d $'\n' sed -ri 's|#include "(sd-[^"]*)"|#include <systemd/\1>|' +) + +fixup_makefile() { + sed -r \ + -e '/^[^# ]*:/ { s|^(\s*)\S+/|\1$(outdir)/| }' \ + -e 's|^if (.*)|ifneq ($(\1),)|' \ + -e 's|rootprefix|prefix|g' \ + -e 's|rootbin|bin|g' \ + -e 's|rootlib|lib|g' \ + -e 's|--version-script=.*/([^/]+)\.sym|--version-script=$(srcdir)/\1.sym|g' +} + +fixup_makefiles() ( + sed -ri \ + -e '/^ \$\(AM_V_at\)\$\(MKDIR_P\) \$\(dir \$@\)/d' \ + -e 's/ \$\(CFLAGS\) / /g' \ + -e 's/ \$\(CPPFLAGS\) / /g' \ + -e 's/ \$\(AM_CPPFLAGS\) / $(ALL_CPPFLAGS) /g' \ + -e '/^[^# ]*:/ { s|\S+/|$(outdir)/|g }' \ + src/libbasic/Makefile \ + src/libsystemd/libsystemd-journal-internal/Makefile \ + src/udev/Makefile + 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 +) + +move() ( + >&2 echo ' => move_files' + move_files + >&2 echo ' => breakup_makefile' + breakup_makefile + >&2 echo ' => fixup_includes' + fixup_includes + >&2 echo ' => fixup_makefiles' + fixup_makefiles +) + +main() { + set -e + + 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 postmove + + move + + git add . + git commit -m './move.sh' + git merge -s ours lukeshu/postmove + git checkout lukeshu/postmove + git merge postmove + git branch -d postmove +} + +main "$@" diff --git a/reset.sh b/reset.sh new file mode 100755 index 0000000000..66b629c217 --- /dev/null +++ b/reset.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -e +git checkout lukeshu/premove +git branch -D postmove || true +git checkout . +git clean -xdf |