chiark / gitweb /
tree-wide: use _packed_ macro instead of raw gcc __attribute__
[elogind.git] / Makefile.am
index d9d71df9efb87fd11cf4071a0343bef3e92f8e1c..42183f45d7f19e75d2022e39279dc9f902832f02 100644 (file)
@@ -118,8 +118,6 @@ rootprefix=@rootprefix@
 rootbindir=$(rootprefix)/bin
 rootlibexecdir=$(rootprefix)/lib/systemd
 
-CLEANFILES = $(BUILT_SOURCES)
-DISTCLEANFILES =
 EXTRA_DIST =
 BUILT_SOURCES =
 INSTALL_EXEC_HOOKS =
@@ -145,6 +143,7 @@ dist_pkgdata_DATA =
 dist_dbuspolicy_DATA =
 dist_dbussystemservice_DATA =
 dist_systemunit_DATA_busnames =
+dist_sysusers_DATA =
 check_PROGRAMS =
 check_DATA =
 tests=
@@ -160,6 +159,15 @@ TESTS =
 endif
 udevlibexec_PROGRAMS =
 
+in_files = $(filter %.in,$(EXTRA_DIST))
+in_in_files = $(filter %.in.in, $(in_files))
+m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
+
+CLEANFILES = $(BUILT_SOURCES) \
+       $(pkgconfiglib_DATA) \
+       $(in_files:.in=) $(in_in_files:.in.in=) \
+       $(m4_files:.m4=)
+
 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
        $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
        $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
@@ -199,6 +207,7 @@ AM_CPPFLAGS = \
        -DKEXEC=\"$(KEXEC)\" \
        -DLIBDIR=\"$(libdir)\" \
        -DROOTLIBDIR=\"$(rootlibdir)\" \
+       -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
        -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
        -I $(top_srcdir)/src \
        -I $(top_builddir)/src/shared \
@@ -242,14 +251,11 @@ endef
 
 INSTALL_DIRS =
 
-RUNLEVEL1_TARGET_WANTS =
-RUNLEVEL2_TARGET_WANTS =
-RUNLEVEL3_TARGET_WANTS =
-RUNLEVEL4_TARGET_WANTS =
-RUNLEVEL5_TARGET_WANTS =
 SHUTDOWN_TARGET_WANTS =
 LOCAL_FS_TARGET_WANTS =
 MULTI_USER_TARGET_WANTS =
+GRAPHICAL_TARGET_WANTS =
+RESCUE_TARGET_WANTS =
 SYSINIT_TARGET_WANTS =
 SOCKETS_TARGET_WANTS =
 BUSNAMES_TARGET_WANTS =
@@ -263,14 +269,11 @@ USER_UNIT_ALIASES =
 GENERAL_ALIASES =
 
 install-target-wants-hook:
-       what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
-       what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
-       what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
-       what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
-       what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
        what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
        what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
+       what="$(RESCUE_TARGET_WANTS)" && wants=rescue.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
        what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
@@ -504,6 +507,7 @@ dist_systemunit_DATA = \
        units/sys-kernel-debug.mount \
        units/sys-fs-fuse-connections.mount \
        units/tmp.mount \
+       units/var-lib-machines.mount \
        units/printer.target \
        units/sound.target \
        units/bluetooth.target \
@@ -613,12 +617,6 @@ EXTRA_DIST += \
        units/systemd-nspawn@.service.in \
        units/systemd-update-done.service.in
 
-CLEANFILES += \
-       units/console-shell.service.m4 \
-       units/console-getty.service.m4 \
-       units/container-getty@.service.m4 \
-       units/user@.service.m4
-
 if HAVE_SYSV_COMPAT
 nodist_systemunit_DATA += \
        units/rc-local.service \
@@ -981,6 +979,8 @@ libsystemd_label_la_SOURCES = \
        src/shared/btrfs-ctree.h \
        src/shared/machine-image.c \
        src/shared/machine-image.h \
+       src/shared/machine-pool.c \
+       src/shared/machine-pool.h \
        src/shared/copy.c \
        src/shared/copy.h
 
@@ -1224,35 +1224,34 @@ 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 ";" }' < $< > $@
 
-EXTRA_DIST += \
+gperf_gperf_m4_sources = \
        src/core/load-fragment-gperf.gperf.m4
 
-CLEANFILES += \
-       src/core/load-fragment-gperf.gperf \
-       src/core/load-fragment-gperf.c \
-       src/core/load-fragment-gperf-nulstr.c \
+gperf_txt_sources = \
        src/shared/errno-list.txt \
-       src/shared/errno-from-name.gperf \
        src/shared/af-list.txt \
-       src/shared/af-from-name.gperf \
        src/shared/arphrd-list.txt \
-       src/shared/arphrd-from-name.gperf \
-       src/shared/cap-list.txt \
-       src/shared/cap-from-name.gperf \
-       src/resolve/dns_type-list.txt \
-       src/resolve/dns_type-from-name.gperf
+       src/shared/cap-list.txt
 
 BUILT_SOURCES += \
-       src/shared/errno-from-name.h \
-       src/shared/errno-to-name.h \
-       src/shared/af-from-name.h \
-       src/shared/af-to-name.h \
-       src/shared/arphrd-from-name.h \
-       src/shared/arphrd-to-name.h \
-       src/shared/cap-from-name.h \
-       src/shared/cap-to-name.h \
-       src/resolve/dns_type-from-name.h \
-       src/resolve/dns_type-to-name.h
+       $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
+       $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf-nulstr.c) \
+       $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
+       $(gperf_txt_sources:-list.txt=-from-name.h) \
+       $(gperf_txt_sources:-list.txt=-to-name.h)
+
+CLEANFILES += \
+       $(gperf_txt_sources:-list.txt=-from-name.gperf)
+DISTCLEANFILES = \
+       $(gperf_txt_sources)
+
+EXTRA_DIST += \
+       $(gperf_gperf_m4_sources) \
+       $(gperf_gperf_sources) \
+       $(gperf_txt_sources:-list.txt=-from-name.gperf)
+
+CLEANFILES += \
+       $(gperf_txt_sources)
 
 %-from-name.gperf: %-list.txt
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
@@ -1347,10 +1346,6 @@ EXTRA_DIST += \
        src/core/systemd.pc.in \
        src/core/macros.systemd.in
 
-CLEANFILES += \
-       src/core/macros.systemd \
-       src/core/org.freedesktop.systemd1.policy.in
-
 # ------------------------------------------------------------------------------
 
 manual_tests += \
@@ -1726,9 +1721,6 @@ test_verbs_LDADD = \
 test_namespace_LDADD = \
        libsystemd-core.la
 
-CLEANFILES += \
-       src/test/test-hashmap-ordered.c
-
 BUILT_SOURCES += \
        src/test/test-hashmap-ordered.c
 
@@ -2216,10 +2208,10 @@ nodist_systemunit_DATA += \
        units/systemd-tmpfiles-clean.service
 
 nodist_tmpfiles_DATA = \
+       tmpfiles.d/systemd.conf \
        tmpfiles.d/etc.conf
 
 dist_tmpfiles_DATA = \
-       tmpfiles.d/systemd.conf \
        tmpfiles.d/systemd-nologin.conf \
        tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf \
@@ -2246,14 +2238,12 @@ INSTALL_DIRS += \
 endif
 
 EXTRA_DIST += \
+       tmpfiles.d/systemd.conf.m4 \
        tmpfiles.d/etc.conf.m4 \
        units/systemd-tmpfiles-setup-dev.service.in \
        units/systemd-tmpfiles-setup.service.in \
        units/systemd-tmpfiles-clean.service.in
 
-CLEANFILES += \
-       tmpfiles.d/etc.conf
-
 # ------------------------------------------------------------------------------
 if ENABLE_SYSUSERS
 systemd_sysusers_SOURCES = \
@@ -2274,19 +2264,15 @@ nodist_systemunit_DATA += \
 SYSINIT_TARGET_WANTS += \
        systemd-sysusers.service
 
-dist_sysusers_DATA = \
-       sysusers.d/systemd.conf
-
 nodist_sysusers_DATA = \
+       sysusers.d/systemd.conf \
        sysusers.d/basic.conf
 
 EXTRA_DIST += \
        units/systemd-sysusers.service.in \
+       sysusers.d/systemd.conf.m4 \
        sysusers.d/basic.conf.in
 
-CLEANFILES += \
-       sysusers.d/basic.conf
-
 INSTALL_DIRS += \
        $(sysusersdir)
 endif
@@ -2363,6 +2349,7 @@ systemd_fsck_LDADD = \
 # ------------------------------------------------------------------------------
 systemd_fsckd_SOURCES = \
        src/fsckd/fsckd.c \
+       src/fsckd/fsckd.h \
        $(NULL)
 
 systemd_fsckd_LDADD = \
@@ -2494,6 +2481,7 @@ systemd_efi_boot_generator_LDADD = \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
+if HAVE_BLKID
 bootctl_SOURCES = \
        src/boot/bootctl.c
 
@@ -2519,6 +2507,7 @@ dist_bashcompletion_DATA += \
 
 dist_zshcompletion_DATA += \
        shell-completion/zsh/_bootctl
+endif
 
 # ------------------------------------------------------------------------------
 if HAVE_GNUEFI
@@ -2533,6 +2522,7 @@ efi_cflags = \
        $(EFI_CFLAGS) \
        -Wall \
        -Wextra \
+       -std=gnu90 \
        -nostdinc \
        -ggdb -O0 \
        -fpic \
@@ -2542,6 +2532,7 @@ efi_cflags = \
        -fno-strict-aliasing \
        -fno-stack-protector \
        -Wsign-compare \
+       -Wno-missing-field-initializers \
        -mno-sse \
        -mno-mmx
 
@@ -2549,8 +2540,7 @@ if ARCH_X86_64
 efi_cflags += \
        -mno-red-zone \
        -DEFI_FUNCTION_WRAPPER \
-       -DGNU_EFI_USE_MS_ABI \
-       -std=gnu90
+       -DGNU_EFI_USE_MS_ABI
 endif
 
 efi_ldflags = \
@@ -2603,11 +2593,15 @@ $(systemd_boot): $(systemd_boot_solib)
 stub_headers = \
        src/boot/efi/util.h \
        src/boot/efi/pefile.h \
+       src/boot/efi/graphics.h \
+       src/boot/efi/splash.h \
        src/boot/efi/linux.h
 
 stub_sources = \
        src/boot/efi/util.c \
        src/boot/efi/pefile.c \
+       src/boot/efi/graphics.c \
+       src/boot/efi/splash.c \
        src/boot/efi/linux.c \
        src/boot/efi/stub.c
 
@@ -2894,9 +2888,6 @@ EXTRA_DIST += \
        units/systemd-bus-proxyd.service.m4.in \
        units/user/systemd-bus-proxyd.service.in
 
-CLEANFILES += \
-       units/systemd-bus-proxyd.service.m4
-
 if HAVE_SMACK
 bus-proxyd-set-cap-hook:
        -$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
@@ -3030,9 +3021,6 @@ EXTRA_DIST += \
        src/libsystemd/sd-bus/DIFFERENCES \
        src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
 
-CLEANFILES += \
-       src/libsystemd/libsystemd.sym
-
 BUILT_SOURCES += \
        src/libsystemd/libsystemd.sym
 
@@ -3652,7 +3640,6 @@ EXTRA_DIST += \
        src/libudev/libudev.pc.in
 
 CLEANFILES += \
-       src/libudev/libudev.pc \
        docs/html/libudev \
        docs/html/gudev
 
@@ -3729,20 +3716,11 @@ EXTRA_DIST += \
        rules/99-systemd.rules.in \
        src/udev/udev.pc.in
 
-CLEANFILES += \
-       rules/99-systemd.rules \
-       src/udev/udev.pc
-
 EXTRA_DIST += \
        units/systemd-udevd.service.in \
        units/systemd-udev-trigger.service.in \
        units/systemd-udev-settle.service.in
 
-CLEANFILES += \
-       units/systemd-udevd.service \
-       units/systemd-udev-trigger.service \
-       units/systemd-udev-settle.service
-
 SOCKETS_TARGET_WANTS += \
        systemd-udevd-control.socket \
        systemd-udevd-kernel.socket
@@ -3760,19 +3738,22 @@ rootlibexec_PROGRAMS += \
 noinst_LTLIBRARIES += \
        libudev-core.la
 
-src/udev/keyboard-keys.txt:
+src/udev/keyboard-keys-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
 
-src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
+src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
 
 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
        $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
 
-src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
+src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys-list.txt
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
 
+gperf_txt_sources += \
+       src/udev/keyboard-keys-list.txt
+
 libudev_core_la_SOURCES = \
        src/udev/udev.h \
        src/udev/udev-event.c \
@@ -3799,15 +3780,7 @@ nodist_libudev_core_la_SOURCES = \
        src/udev/keyboard-keys-to-name.h \
        src/udev/net/link-config-gperf.c
 
-BUILT_SOURCES += \
-       $(nodist_libudev_core_la_SOURCES)
-
-CLEANFILES += \
-       src/udev/keyboard-keys-from-name.gperf \
-       src/udev/keyboard-keys.txt \
-       src/udev/net/link-config-gperf.c
-
-EXTRA_DIST += \
+gperf_gperf_sources = \
        src/udev/net/link-config-gperf.gperf
 
 libudev_core_la_CFLAGS = \
@@ -3905,9 +3878,6 @@ dist_udevhwdb_DATA = \
 EXTRA_DIST += \
        units/systemd-hwdb-update.service.in
 
-CLEANFILES += \
-       units/systemd-hwdb-update.service
-
 SYSINIT_TARGET_WANTS += \
        systemd-hwdb-update.service
 
@@ -3931,9 +3901,14 @@ TESTS += \
 if HAVE_PYTHON
 TESTS += \
        test/rule-syntax-check.py \
+       $(NULL)
+
+if HAVE_SYSV_COMPAT
+TESTS += \
        test/sysv-generator-test.py \
        $(NULL)
 endif
+endif
 
 manual_tests += \
        test-libudev \
@@ -4087,9 +4062,6 @@ lib_LTLIBRARIES += libgudev-1.0.la
 pkgconfiglib_DATA += \
        src/gudev/gudev-1.0.pc
 
-CLEANFILES += \
-       src/gudev/gudev-1.0.pc
-
 libgudev_1_0_la_SOURCES = \
        src/gudev/libgudev-1.0.sym \
        src/gudev/gudevenums.h \
@@ -4329,8 +4301,6 @@ nodist_pkgsysconf_DATA += \
 EXTRA_DIST += \
        src/journal-remote/journal-remote.conf.in
 
-CLEANFILES += \
-       src/journal-remote/journal-remote.conf
 endif
 
 if HAVE_LIBCURL
@@ -4363,9 +4333,6 @@ nodist_pkgsysconf_DATA += \
 
 EXTRA_DIST += \
        src/journal-remote/journal-upload.conf.in
-
-CLEANFILES += \
-       src/journal-remote/journal-upload.conf
 endif
 
 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
@@ -4686,11 +4653,10 @@ SYSINIT_TARGET_WANTS += \
 EXTRA_DIST += \
        units/systemd-journald.service.in \
        units/systemd-journal-flush.service.in \
-       units/systemd-journal-catalog-update.service.in \
-       src/journal/journald-gperf.gperf
+       units/systemd-journal-catalog-update.service.in
 
-CLEANFILES += \
-       src/journal/journald-gperf.c
+gperf_gperf_sources += \
+       src/journal/journald-gperf.gperf
 
 # ------------------------------------------------------------------------------
 if HAVE_MICROHTTPD
@@ -4812,7 +4778,7 @@ dist_bashcompletion_DATA += \
 dist_zshcompletion_DATA += \
        shell-completion/zsh/_coredumpctl
 
-sysctl_DATA = \
+nodist_sysctl_DATA = \
        sysctl.d/50-coredump.conf
 
 CLEANFILES += \
@@ -4864,17 +4830,14 @@ systemd_vconsole_setup_LDADD = \
 rootlibexec_PROGRAMS += \
        systemd-vconsole-setup
 
-nodist_systemunit_DATA += \
-       units/systemd-vconsole-setup.service
-
 nodist_udevrules_DATA += \
        src/vconsole/90-vconsole.rules
 
+nodist_systemunit_DATA += \
+       units/systemd-vconsole-setup.service
+
 SYSINIT_TARGET_WANTS += \
        systemd-vconsole-setup.service
-
-CLEANFILES += \
-       src/vconsole/90-vconsole.rules
 endif
 
 EXTRA_DIST += \
@@ -4906,9 +4869,6 @@ nodist_systemunit_DATA += \
 
 EXTRA_DIST += \
        units/systemd-bootchart.service.in
-
-CLEANFILES += \
-       units/systemd-bootchart.service
 endif
 
 # ------------------------------------------------------------------------------
@@ -5237,12 +5197,9 @@ systemd_timesyncd_SOURCES = \
 nodist_systemd_timesyncd_SOURCES = \
        src/timesync/timesyncd-gperf.c
 
-EXTRA_DIST += \
+gperf_gperf_sources += \
        src/timesync/timesyncd-gperf.gperf
 
-CLEANFILES += \
-       src/timesync/timesyncd-gperf.c
-
 systemd_timesyncd_LDADD = \
        libsystemd-resolve.la \
        libsystemd-network.la \
@@ -5267,9 +5224,6 @@ nodist_pkgsysconf_DATA += \
 
 EXTRA_DIST += \
        src/timesync/timesyncd.conf.in
-
-CLEANFILES += \
-       src/timesync/timesyncd.conf
 endif
 
 # ------------------------------------------------------------------------------
@@ -5416,14 +5370,16 @@ if HAVE_GCRYPT
 
 rootlibexec_PROGRAMS += \
        systemd-importd \
-       systemd-pull
+       systemd-pull \
+       systemd-import
 
 systemd_importd_SOURCES = \
        src/import/importd.c
 
 systemd_importd_CFLAGS = \
        $(AM_CFLAGS) \
-       -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\"
+       -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\" \
+       -D SYSTEMD_IMPORT_PATH=\"$(rootlibexecdir)/systemd-import\"
 
 systemd_importd_LDADD = \
        libsystemd-internal.la \
@@ -5432,16 +5388,20 @@ systemd_importd_LDADD = \
 
 systemd_pull_SOURCES = \
        src/import/pull.c \
-       src/import/import-raw.c \
-       src/import/import-raw.h \
-       src/import/import-tar.c \
-       src/import/import-tar.h \
-       src/import/import-dkr.c \
-       src/import/import-dkr.h \
-       src/import/import-job.c \
-       src/import/import-job.h \
+       src/import/pull-raw.c \
+       src/import/pull-raw.h \
+       src/import/pull-tar.c \
+       src/import/pull-tar.h \
+       src/import/pull-dkr.c \
+       src/import/pull-dkr.h \
+       src/import/pull-job.c \
+       src/import/pull-job.h \
+       src/import/pull-common.c \
+       src/import/pull-common.h \
        src/import/import-common.c \
        src/import/import-common.h \
+       src/import/import-compress.c \
+       src/import/import-compress.h \
        src/import/curl-util.c \
        src/import/curl-util.h \
        src/import/aufs-util.c \
@@ -5468,6 +5428,32 @@ systemd_pull_LDADD = \
        -lbz2 \
        $(GCRYPT_LIBS)
 
+systemd_import_SOURCES = \
+       src/import/import.c \
+       src/import/import-raw.c \
+       src/import/import-raw.h \
+       src/import/import-tar.c \
+       src/import/import-tar.h \
+       src/import/import-common.c \
+       src/import/import-common.h \
+       src/import/import-compress.c \
+       src/import/import-compress.h \
+       src/import/qcow2-util.c \
+       src/import/qcow2-util.h
+
+systemd_import_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(XZ_CFLAGS) \
+       $(ZLIB_CFLAGS)
+
+systemd_import_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-label.la \
+       libsystemd-shared.la \
+       $(XZ_LIBS) \
+       $(ZLIB_LIBS) \
+       -lbz2
+
 dist_rootlibexec_DATA = \
        src/import/import-pubring.gpg
 
@@ -5569,12 +5555,11 @@ systemd_resolved_SOURCES = \
 nodist_systemd_resolved_SOURCES = \
        src/resolve/resolved-gperf.c
 
-EXTRA_DIST += \
-       src/resolve/resolved-gperf.gperf \
-       src/resolve/dns_type-from-name.gperf
+gperf_gperf_sources += \
+       src/resolve/resolved-gperf.gperf
 
-CLEANFILES += \
-       src/resolve/resolved-gperf.c
+gperf_txt_sources += \
+       src/resolve/dns_type-list.txt
 
 systemd_resolved_LDADD = \
        libsystemd-network.la \
@@ -5616,9 +5601,6 @@ nodist_pkgsysconf_DATA += \
 EXTRA_DIST += \
        src/resolve/resolved.conf.in
 
-CLEANFILES += \
-       src/resolve/resolved.conf
-
 tests += \
        test-dns-domain
 
@@ -5841,15 +5823,14 @@ SYSTEM_UNIT_ALIASES += \
 BUSNAMES_TARGET_WANTS += \
        org.freedesktop.network1.busname
 
-EXTRA_DIST += \
+gperf_gperf_sources += \
        src/network/networkd-network-gperf.gperf \
-       src/network/networkd-netdev-gperf.gperf \
+       src/network/networkd-netdev-gperf.gperf
+
+EXTRA_DIST += \
        units/systemd-networkd.service.in \
        units/systemd-networkd-wait-online.service.in
 
-CLEANFILES += \
-       src/network/networkd-network-gperf.c \
-       src/network/networkd-netdev-gperf.c
 endif
 
 # ------------------------------------------------------------------------------
@@ -5905,15 +5886,8 @@ endif
 noinst_LTLIBRARIES += \
        libsystemd-logind-core.la
 
-systemd_user_sessions_SOURCES = \
-       src/login/user-sessions.c
-
-systemd_user_sessions_LDADD = \
-       libsystemd-shared.la
-
 rootlibexec_PROGRAMS += \
-       systemd-logind \
-       systemd-user-sessions
+       systemd-logind
 
 loginctl_SOURCES = \
        src/login/loginctl.c \
@@ -6010,11 +5984,11 @@ pamlib_LTLIBRARIES = \
 
 dist_pamconf_DATA = \
        src/login/systemd-user
+
 endif
 
 nodist_systemunit_DATA += \
-       units/systemd-logind.service \
-       units/systemd-user-sessions.service
+       units/systemd-logind.service
 
 dist_systemunit_DATA += \
        units/user.slice
@@ -6038,8 +6012,7 @@ INSTALL_DIRS += \
        $(systemdstatedir)
 
 MULTI_USER_TARGET_WANTS += \
-       systemd-logind.service \
-       systemd-user-sessions.service
+       systemd-logind.service
 
 SYSTEM_UNIT_ALIASES += \
        systemd-logind.service dbus-org.freedesktop.login1.service
@@ -6055,23 +6028,44 @@ nodist_udevrules_DATA += \
        src/login/71-seat.rules \
        src/login/73-seat-late.rules
 
-CLEANFILES += \
-       src/login/logind-gperf.c \
-       src/login/71-seat.rules \
-       src/login/73-seat-late.rules
 endif
 
 polkitpolicy_in_files += \
        src/login/org.freedesktop.login1.policy.in
 
+gperf_gperf_sources += \
+       src/login/logind-gperf.gperf
+
 EXTRA_DIST += \
-       src/login/logind-gperf.gperf \
        src/login/71-seat.rules.in \
        src/login/73-seat-late.rules.in \
-       units/systemd-logind.service.in \
+       units/systemd-logind.service.in
+
+# ------------------------------------------------------------------------------
+if HAVE_PAM
+
+systemd_user_sessions_SOURCES = \
+       src/user-sessions/user-sessions.c
+
+systemd_user_sessions_LDADD = \
+       libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+       systemd-user-sessions
+
+nodist_systemunit_DATA += \
+       units/systemd-user-sessions.service
+
+EXTRA_DIST += \
        units/systemd-user-sessions.service.in
 
+MULTI_USER_TARGET_WANTS += \
+       systemd-user-sessions.service
+
+endif
+
 # ------------------------------------------------------------------------------
+
 if HAVE_PYTHON_DEVEL
 pkgpyexec_LTLIBRARIES = \
        _journal.la \
@@ -6197,7 +6191,7 @@ src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
        $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
 
 BUILT_SOURCES += \
-       src/python-systemd/id128-constants.h
+       $(nodist_id128_la_SOURCES)
 
 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
 sphinx-%:
@@ -6482,12 +6476,6 @@ EXTRA_DIST += \
        $(polkitpolicy_in_files) \
        $(polkitpolicy_in_in_files)
 
-CLEANFILES += \
-       $(nodist_systemunit_DATA) \
-       $(nodist_userunit_DATA) \
-       $(pkgconfiglib_DATA) \
-       $(nodist_polkitpolicy_DATA)
-
 # ------------------------------------------------------------------------------
 if ENABLE_MANPAGES
 man/custom-entities.ent: configure.ac
@@ -6572,15 +6560,11 @@ SOCKETS_TARGET_WANTS += \
 
 if HAVE_UTMP
 if HAVE_SYSV_COMPAT
-RUNLEVEL1_TARGET_WANTS += \
-       systemd-update-utmp-runlevel.service
-RUNLEVEL2_TARGET_WANTS += \
-       systemd-update-utmp-runlevel.service
-RUNLEVEL3_TARGET_WANTS += \
+MULTI_USER_TARGET_WANTS += \
        systemd-update-utmp-runlevel.service
-RUNLEVEL4_TARGET_WANTS += \
+GRAPHICAL_TARGET_WANTS += \
        systemd-update-utmp-runlevel.service
-RUNLEVEL5_TARGET_WANTS += \
+RESCUE_TARGET_WANTS += \
        systemd-update-utmp-runlevel.service
 endif
 
@@ -6593,7 +6577,8 @@ SYSINIT_TARGET_WANTS += \
 
 LOCAL_FS_TARGET_WANTS += \
        systemd-remount-fs.service \
-       tmp.mount
+       tmp.mount \
+       var-lib-machines.mount
 
 MULTI_USER_TARGET_WANTS += \
        getty.target \