summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grp-boot/bootctl/Makefile4
-rw-r--r--src/grp-boot/systemd-boot/Makefile19
-rw-r--r--src/grp-coredump/systemd-coredump/Makefile4
-rw-r--r--src/grp-machine/nss-mymachines/Makefile49
-rw-r--r--src/grp-machine/systemd-machined/Makefile21
-rw-r--r--src/grp-resolve/systemd-resolved/Makefile2
-rw-r--r--src/grp-timedate/systemd-timedated/.gitignore (renamed from src/systemd-timedate/.gitignore)0
-rw-r--r--src/grp-timedate/systemd-timedated/Makefile (renamed from src/systemd-timedate/Makefile)16
-rw-r--r--src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.conf (renamed from src/systemd-timedate/org.freedesktop.timedate1.conf)0
-rw-r--r--src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.policy.in (renamed from src/systemd-timedate/org.freedesktop.timedate1.policy.in)0
-rw-r--r--src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.service (renamed from src/systemd-timedate/org.freedesktop.timedate1.service)0
-rw-r--r--src/grp-timedate/systemd-timedated/timedated.c (renamed from src/systemd-timedate/timedated.c)0
-rw-r--r--src/grp-timedate/timedatectl/Makefile43
-rw-r--r--src/grp-timedate/timedatectl/timedatectl.c (renamed from src/systemd-timedate/timedatectl.c)0
-rw-r--r--src/hostname/Makefile2
-rw-r--r--src/import/Makefile12
-rw-r--r--src/journal-remote/Makefile8
-rw-r--r--src/journal/Makefile8
-rw-r--r--src/libfirewall/Makefile2
-rw-r--r--src/libshared/Makefile6
-rw-r--r--src/libsystemd/compat-libs/Makefile2
-rw-r--r--src/libsystemd/libsystemd-journal-internal/Makefile8
-rw-r--r--src/locale/Makefile2
-rw-r--r--src/login/Makefile8
-rw-r--r--src/modules-load/Makefile4
-rw-r--r--src/network/Makefile8
-rw-r--r--src/nss-myhostname/Makefile2
-rw-r--r--src/systemd-backlight/Makefile2
-rw-r--r--src/systemd-binfmt/Makefile2
-rw-r--r--src/systemd-bootchart/Makefile2
-rw-r--r--src/systemd-bus-proxyd/Makefile2
-rw-r--r--src/systemd-cryptsetup/Makefile2
-rw-r--r--src/systemd-firstboot/Makefile2
-rw-r--r--src/systemd-gpt-auto-generator/Makefile2
-rw-r--r--src/systemd-hibernate-resume/Makefile2
-rw-r--r--src/systemd-hwdb/Makefile2
-rw-r--r--src/systemd-nspawn/Makefile2
-rw-r--r--src/systemd-quotacheck/Makefile2
-rw-r--r--src/systemd-random-seed/Makefile2
-rw-r--r--src/systemd-rfkill/Makefile2
-rw-r--r--src/systemd-timesync/Makefile2
-rw-r--r--src/systemd-tmpfiles/Makefile4
-rw-r--r--src/systemd-vconsole/Makefile2
-rw-r--r--src/sysusers/Makefile4
-rw-r--r--src/udev/Makefile6
45 files changed, 167 insertions, 107 deletions
diff --git a/src/grp-boot/bootctl/Makefile b/src/grp-boot/bootctl/Makefile
index d01e6ea7d3..2fcdc44799 100644
--- a/src/grp-boot/bootctl/Makefile
+++ b/src/grp-boot/bootctl/Makefile
@@ -49,7 +49,7 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_bootctl
-endif
-
+endif # HAVE_BLKID
+endif # ENABLE_EFI
$(eval $(value automake2autothing))
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-boot/systemd-boot/Makefile b/src/grp-boot/systemd-boot/Makefile
index afa32f02fd..074438908e 100644
--- a/src/grp-boot/systemd-boot/Makefile
+++ b/src/grp-boot/systemd-boot/Makefile
@@ -23,6 +23,7 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
+ifneq ($(ENABLE_EFI),)
ifneq ($(HAVE_GNUEFI),)
efi_cppflags = \
$(EFI_CPPFLAGS) \
@@ -54,13 +55,13 @@ efi_cflags += \
-mno-mmx \
-DEFI_FUNCTION_WRAPPER \
-DGNU_EFI_USE_MS_ABI
-endif
+endif # ARCH_X86_64
ifneq ($(ARCH_IA32),)
efi_cflags += \
-mno-sse \
-mno-mmx
-endif
+endif # ARCH_IA32
efi_ldflags = \
$(EFI_LDFLAGS) \
@@ -79,9 +80,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 = \
@@ -121,8 +122,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)
@@ -169,8 +170,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)
diff --git a/src/grp-coredump/systemd-coredump/Makefile b/src/grp-coredump/systemd-coredump/Makefile
index 638154aeb9..23f2747683 100644
--- a/src/grp-coredump/systemd-coredump/Makefile
+++ b/src/grp-coredump/systemd-coredump/Makefile
@@ -39,7 +39,7 @@ systemd_coredump_SOURCES += \
systemd_coredump_LDADD += \
$(ELFUTILS_LIBS)
-endif
+endif # HAVE_ELFUTILS
nodist_systemunit_DATA += \
units/systemd-coredump@.service
@@ -72,7 +72,7 @@ nodist_sysctl_DATA = \
CLEANFILES += \
sysctl.d/50-coredump.conf
-endif
+endif # ENABLE_COREDUMP
EXTRA_DIST += \
sysctl.d/50-coredump.conf.in \
diff --git a/src/grp-machine/nss-mymachines/Makefile b/src/grp-machine/nss-mymachines/Makefile
new file mode 100644
index 0000000000..4becf7900a
--- /dev/null
+++ b/src/grp-machine/nss-mymachines/Makefile
@@ -0,0 +1,49 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# 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
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# 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
+
+ifneq ($(ENABLE_MACHINED),)
+
+libnss_mymachines_la_SOURCES = \
+ src/nss-mymachines/nss-mymachines.sym \
+ src/nss-mymachines/nss-mymachines.c
+
+libnss_mymachines_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -module \
+ -export-dynamic \
+ -avoid-version \
+ -shared \
+ -shrext .so.2 \
+ -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
+
+libnss_mymachines_la_LIBADD = \
+ libsystemd-internal.la
+
+lib_LTLIBRARIES += \
+ libnss_mymachines.la
+
+endif # ENABLE_MACHINED
+$(eval $(value automake2autothing))
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-machine/systemd-machined/Makefile b/src/grp-machine/systemd-machined/Makefile
index 261f24bd8d..2f6e745c53 100644
--- a/src/grp-machine/systemd-machined/Makefile
+++ b/src/grp-machine/systemd-machined/Makefile
@@ -98,26 +98,7 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.machine1.busname
-libnss_mymachines_la_SOURCES = \
- src/nss-mymachines/nss-mymachines.sym \
- src/nss-mymachines/nss-mymachines.c
-
-libnss_mymachines_la_LDFLAGS = \
- $(AM_LDFLAGS) \
- -module \
- -export-dynamic \
- -avoid-version \
- -shared \
- -shrext .so.2 \
- -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
-
-libnss_mymachines_la_LIBADD = \
- libsystemd-internal.la
-
-lib_LTLIBRARIES += \
- libnss_mymachines.la
-
-endif
+endif # ENABLE_MACHINED
polkitpolicy_in_files += \
src/machine/org.freedesktop.machine1.policy.in
diff --git a/src/grp-resolve/systemd-resolved/Makefile b/src/grp-resolve/systemd-resolved/Makefile
index 67708841c0..49a995bd75 100644
--- a/src/grp-resolve/systemd-resolved/Makefile
+++ b/src/grp-resolve/systemd-resolved/Makefile
@@ -193,7 +193,7 @@ test_dnssec_complex_SOURCES = \
test_dnssec_complex_LDADD = \
libshared.la
-endif
+endif # ENABLE_RESOLVED
gperf_txt_sources += \
src/resolve/dns_type-list.txt
diff --git a/src/systemd-timedate/.gitignore b/src/grp-timedate/systemd-timedated/.gitignore
index 48757f0968..48757f0968 100644
--- a/src/systemd-timedate/.gitignore
+++ b/src/grp-timedate/systemd-timedated/.gitignore
diff --git a/src/systemd-timedate/Makefile b/src/grp-timedate/systemd-timedated/Makefile
index d779526ed4..0224793a47 100644
--- a/src/systemd-timedate/Makefile
+++ b/src/grp-timedate/systemd-timedated/Makefile
@@ -54,21 +54,7 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.timedate1.busname
-timedatectl_SOURCES = \
- src/timedate/timedatectl.c
-
-timedatectl_LDADD = \
- libshared.la
-
-bin_PROGRAMS += \
- timedatectl
-
-dist_bashcompletion_data += \
- shell-completion/bash/timedatectl
-
-dist_zshcompletion_data += \
- shell-completion/zsh/_timedatectl
-endif
+endif # ENABLE_TIMEDATED
polkitpolicy_in_files += \
src/timedate/org.freedesktop.timedate1.policy.in
diff --git a/src/systemd-timedate/org.freedesktop.timedate1.conf b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.conf
index 36557d5841..36557d5841 100644
--- a/src/systemd-timedate/org.freedesktop.timedate1.conf
+++ b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.conf
diff --git a/src/systemd-timedate/org.freedesktop.timedate1.policy.in b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.policy.in
index aa30b70831..aa30b70831 100644
--- a/src/systemd-timedate/org.freedesktop.timedate1.policy.in
+++ b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.policy.in
diff --git a/src/systemd-timedate/org.freedesktop.timedate1.service b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.service
index 875f4bec78..875f4bec78 100644
--- a/src/systemd-timedate/org.freedesktop.timedate1.service
+++ b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.service
diff --git a/src/systemd-timedate/timedated.c b/src/grp-timedate/systemd-timedated/timedated.c
index f5ca319640..f5ca319640 100644
--- a/src/systemd-timedate/timedated.c
+++ b/src/grp-timedate/systemd-timedated/timedated.c
diff --git a/src/grp-timedate/timedatectl/Makefile b/src/grp-timedate/timedatectl/Makefile
new file mode 100644
index 0000000000..c05838c944
--- /dev/null
+++ b/src/grp-timedate/timedatectl/Makefile
@@ -0,0 +1,43 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# 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
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# 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
+
+ifneq ($(ENABLE_TIMEDATED),)
+timedatectl_SOURCES = \
+ src/timedate/timedatectl.c
+
+timedatectl_LDADD = \
+ libshared.la
+
+bin_PROGRAMS += \
+ timedatectl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/timedatectl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_timedatectl
+endif # ENABLE_TIMEDATED
+$(eval $(value automake2autothing))
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-timedate/timedatectl.c b/src/grp-timedate/timedatectl/timedatectl.c
index 28546a0ad1..28546a0ad1 100644
--- a/src/systemd-timedate/timedatectl.c
+++ b/src/grp-timedate/timedatectl/timedatectl.c
diff --git a/src/hostname/Makefile b/src/hostname/Makefile
index 1a135aa65b..f0215ee0cc 100644
--- a/src/hostname/Makefile
+++ b/src/hostname/Makefile
@@ -68,7 +68,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
diff --git a/src/import/Makefile b/src/import/Makefile
index 0f9abf0dd6..019350e9bb 100644
--- a/src/import/Makefile
+++ b/src/import/Makefile
@@ -176,13 +176,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
diff --git a/src/journal-remote/Makefile b/src/journal-remote/Makefile
index 21d07f7712..150e326a78 100644
--- a/src/journal-remote/Makefile
+++ b/src/journal-remote/Makefile
@@ -52,12 +52,12 @@ systemd_journal_remote_LDADD += \
ifneq ($(ENABLE_TMPFILES),)
dist_tmpfiles_DATA += \
tmpfiles.d/systemd-remote.conf
-endif
+endif # ENABLE_TMPFILES
ifneq ($(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 += \
@@ -80,7 +80,7 @@ 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
ifneq ($(HAVE_LIBCURL),)
libexec_PROGRAMS += \
@@ -104,7 +104,7 @@ nodist_systemunit_DATA += \
nodist_pkgsysconf_DATA += \
src/journal-remote/journal-upload.conf
-endif
+endif # HAVE_LIBCURL
EXTRA_DIST += \
units/systemd-journal-upload.service.in \
diff --git a/src/journal/Makefile b/src/journal/Makefile
index 43e8810680..17f2c5e859 100644
--- a/src/journal/Makefile
+++ b/src/journal/Makefile
@@ -71,7 +71,7 @@ journalctl_CFLAGS += \
journalctl_LDADD += \
$(QRENCODE_LIBS)
-endif
+endif # HAVE_QRENCODE
test_journal_SOURCES = \
src/journal/test-journal.c
@@ -247,7 +247,7 @@ ifneq ($(HAVE_COMPRESSION),)
tests += \
test-compress \
test-compress-benchmark
-endif
+endif # HAVE_COMPRESSION
libexec_PROGRAMS += \
@@ -321,7 +321,7 @@ systemd_journal_gatewayd_LDADD = \
ifneq ($(HAVE_GNUTLS),)
systemd_journal_gatewayd_LDADD += \
$(GNUTLS_LIBS)
-endif
+endif # HAVE_GNUTLS
systemd_journal_gatewayd_CFLAGS = \
$(AM_CFLAGS) \
@@ -340,7 +340,7 @@ nodist_systemunit_DATA += \
dist_gatewayddocumentroot_DATA = \
src/journal-remote/browse.html
-endif
+endif # HAVE_MICROHTTPD
EXTRA_DIST += \
units/systemd-journal-gatewayd.service.in
diff --git a/src/libfirewall/Makefile b/src/libfirewall/Makefile
index 145041baee..7ddfc7d288 100644
--- a/src/libfirewall/Makefile
+++ b/src/libfirewall/Makefile
@@ -37,7 +37,7 @@ libfirewall_la_CFLAGS = \
libfirewall_la_LIBADD = \
$(LIBIPTC_LIBS)
-endif
+endif # HAVE_LIBIPTC
$(eval $(value automake2autothing))
AM_CPPFLAGS += $(libbasic.CPPFLAGS)
diff --git a/src/libshared/Makefile b/src/libshared/Makefile
index dc9e222fc4..6bc8725521 100644
--- a/src/libshared/Makefile
+++ b/src/libshared/Makefile
@@ -109,19 +109,19 @@ libshared_la_SOURCES = \
ifneq ($(HAVE_UTMP),)
libshared_la_SOURCES += \
src/shared/utmp-wtmp.c
-endif
+endif # HAVE_UTMP
ifneq ($(HAVE_SECCOMP),)
libshared_la_SOURCES += \
src/shared/seccomp-util.h \
src/shared/seccomp-util.c
-endif
+endif # HAVE_SECCOMP
ifneq ($(HAVE_ACL),)
libshared_la_SOURCES += \
src/shared/acl-util.c \
src/shared/acl-util.h
-endif
+endif # HAVE_ACL
libshared_la_CFLAGS = \
$(AM_CFLAGS) \
diff --git a/src/libsystemd/compat-libs/Makefile b/src/libsystemd/compat-libs/Makefile
index ff4157fb05..eb3787659d 100644
--- a/src/libsystemd/compat-libs/Makefile
+++ b/src/libsystemd/compat-libs/Makefile
@@ -134,7 +134,7 @@ compat-lib-uninstall-hook:
INSTALL_EXEC_HOOKS += compat-lib-install-hook
UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
-endif
+endif # ENABLE_COMPAT_LIBS
EXTRA_DIST += \
src/compat-libs/linkwarning.h \
diff --git a/src/libsystemd/libsystemd-journal-internal/Makefile b/src/libsystemd/libsystemd-journal-internal/Makefile
index b502bc8e40..6d0be9edff 100644
--- a/src/libsystemd/libsystemd-journal-internal/Makefile
+++ b/src/libsystemd/libsystemd-journal-internal/Makefile
@@ -26,7 +26,7 @@ include $(topsrcdir)/build-aux/Makefile.head.mk
audit_list_includes = -include linux/audit.h -include $(topsrcdir)/src/libbasic/missing.h
ifneq ($(HAVE_AUDIT),)
audit_list_includes += -include libaudit.h
-endif
+endif # HAVE_AUDIT
$(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/missing.h)
$(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
@@ -80,7 +80,7 @@ libsystemd_journal_internal_la_CFLAGS += \
libsystemd_journal_internal_la_LIBADD += \
$(XZ_LIBS)
-endif
+endif # HAVE_XZ
ifneq ($(HAVE_LZ4),)
libsystemd_journal_internal_la_CFLAGS += \
@@ -88,7 +88,7 @@ libsystemd_journal_internal_la_CFLAGS += \
libsystemd_journal_internal_la_LIBADD += \
$(LZ4_LIBS)
-endif
+endif # HAVE_LZ4
ifneq ($(HAVE_GCRYPT),)
libsystemd_journal_internal_la_SOURCES += \
@@ -104,7 +104,7 @@ 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
diff --git a/src/locale/Makefile b/src/locale/Makefile
index aae2c71091..7ff69e87a9 100644
--- a/src/locale/Makefile
+++ b/src/locale/Makefile
@@ -77,7 +77,7 @@ dist_bashcompletion_data += \
dist_zshcompletion_data += \
shell-completion/zsh/_localectl
-endif
+endif # ENABLE_LOCALED
.PHONY: update-kbd-model-map
diff --git a/src/login/Makefile b/src/login/Makefile
index 79ac8440b9..4f75bc1cdd 100644
--- a/src/login/Makefile
+++ b/src/login/Makefile
@@ -65,7 +65,7 @@ liblogind_core_la_LIBADD = \
ifneq ($(HAVE_ACL),)
liblogind_core_la_SOURCES += \
src/login/logind-acl.c
-endif
+endif # HAVE_ACL
noinst_LTLIBRARIES += \
liblogind-core.la
@@ -161,7 +161,7 @@ dist_pamconf_DATA = \
EXTRA_DIST += \
src/login/systemd-user.m4
-endif
+endif # HAVE_PAM
nodist_systemunit_DATA += \
units/systemd-logind.service
@@ -204,7 +204,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
@@ -235,7 +235,7 @@ nodist_systemunit_DATA += \
MULTI_USER_TARGET_WANTS += \
systemd-user-sessions.service
-endif
+endif # HAVE_PAM
EXTRA_DIST += \
units/systemd-user-sessions.service.in
diff --git a/src/modules-load/Makefile b/src/modules-load/Makefile
index f57d7bcf40..390a2dc4e9 100644
--- a/src/modules-load/Makefile
+++ b/src/modules-load/Makefile
@@ -50,8 +50,8 @@ 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 \
diff --git a/src/network/Makefile b/src/network/Makefile
index 59304feac7..d390da1fc4 100644
--- a/src/network/Makefile
+++ b/src/network/Makefile
@@ -36,7 +36,7 @@ systemd_networkd_LDADD = \
ifneq ($(HAVE_LIBIPTC),)
systemd_networkd_LDADD += \
libfirewall.la
-endif
+endif # HAVE_LIBIPTC
noinst_LTLIBRARIES += \
libnetworkd-core.la
@@ -140,7 +140,7 @@ test_network_LDADD = \
ifneq ($(HAVE_LIBIPTC),)
test_network_LDADD += \
libfirewall.la
-endif
+endif # HAVE_LIBIPTC
test_network_tables_SOURCES = \
src/network/test-network-tables.c \
@@ -153,7 +153,7 @@ test_network_tables_LDADD = \
ifneq ($(HAVE_LIBIPTC),)
test_network_tables_LDADD += \
libfirewall.la
-endif
+endif # HAVE_LIBIPTC
tests += \
test-network \
@@ -186,7 +186,7 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.network1.busname
-endif
+endif # ENABLE_NETWORKD
gperf_gperf_sources += \
src/network/networkd-network-gperf.gperf \
diff --git a/src/nss-myhostname/Makefile b/src/nss-myhostname/Makefile
index 54bfc36744..1477a13a2c 100644
--- a/src/nss-myhostname/Makefile
+++ b/src/nss-myhostname/Makefile
@@ -42,7 +42,7 @@ libnss_myhostname_la_LIBADD = \
lib_LTLIBRARIES += \
libnss_myhostname.la
-endif
+endif # HAVE_MYHOSTNAME
$(eval $(value automake2autothing))
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-backlight/Makefile b/src/systemd-backlight/Makefile
index fba1381e00..557a236aa9 100644
--- a/src/systemd-backlight/Makefile
+++ b/src/systemd-backlight/Makefile
@@ -35,7 +35,7 @@ systemd_backlight_SOURCES = \
systemd_backlight_LDADD = \
libshared.la
-endif
+endif # ENABLE_BACKLIGHT
EXTRA_DIST += \
units/systemd-backlight@.service.in
diff --git a/src/systemd-binfmt/Makefile b/src/systemd-binfmt/Makefile
index c109d2a91f..54f73bacd1 100644
--- a/src/systemd-binfmt/Makefile
+++ b/src/systemd-binfmt/Makefile
@@ -48,7 +48,7 @@ SYSINIT_TARGET_WANTS += \
systemd-binfmt.service \
proc-sys-fs-binfmt_misc.automount
-endif
+endif # ENABLE_BINFMT
EXTRA_DIST += \
units/systemd-binfmt.service.in
diff --git a/src/systemd-bootchart/Makefile b/src/systemd-bootchart/Makefile
index e564e1bfd9..e752c988e0 100644
--- a/src/systemd-bootchart/Makefile
+++ b/src/systemd-bootchart/Makefile
@@ -43,7 +43,7 @@ dist_pkgsysconf_DATA += \
nodist_systemunit_DATA += \
units/systemd-bootchart.service
-endif
+endif # ENABLE_BOOTCHART
EXTRA_DIST += \
units/systemd-bootchart.service.in
diff --git a/src/systemd-bus-proxyd/Makefile b/src/systemd-bus-proxyd/Makefile
index 83f3552d6d..411106d38e 100644
--- a/src/systemd-bus-proxyd/Makefile
+++ b/src/systemd-bus-proxyd/Makefile
@@ -51,7 +51,7 @@ bus-proxyd-set-cap-hook:
-$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(libexecdir)/systemd-bus-proxyd
INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
-endif
+endif # HAVE_SMACK
$(eval $(value automake2autothing))
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-cryptsetup/Makefile b/src/systemd-cryptsetup/Makefile
index 98c6b4526b..ea731cad5a 100644
--- a/src/systemd-cryptsetup/Makefile
+++ b/src/systemd-cryptsetup/Makefile
@@ -54,7 +54,7 @@ systemd_cryptsetup_generator_LDADD = \
SYSINIT_TARGET_WANTS += \
cryptsetup.target
-endif
+endif # HAVE_LIBCRYPTSETUP
$(eval $(value automake2autothing))
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-firstboot/Makefile b/src/systemd-firstboot/Makefile
index 3590fe3660..71dd8b74c3 100644
--- a/src/systemd-firstboot/Makefile
+++ b/src/systemd-firstboot/Makefile
@@ -39,7 +39,7 @@ nodist_systemunit_DATA += \
SYSINIT_TARGET_WANTS += \
systemd-firstboot.service
-endif
+endif # ENABLE_FIRSTBOOT
EXTRA_DIST += \
units/systemd-firstboot.service.in
diff --git a/src/systemd-gpt-auto-generator/Makefile b/src/systemd-gpt-auto-generator/Makefile
index 6b5c028aaf..16b5933638 100644
--- a/src/systemd-gpt-auto-generator/Makefile
+++ b/src/systemd-gpt-auto-generator/Makefile
@@ -38,7 +38,7 @@ systemd_gpt_auto_generator_LDADD = \
systemd_gpt_auto_generator_CFLAGS = \
$(AM_CFLAGS) \
$(BLKID_CFLAGS)
-endif
+endif # HAVE_BLKID
$(eval $(value automake2autothing))
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-hibernate-resume/Makefile b/src/systemd-hibernate-resume/Makefile
index ad1c19ab43..8b204da327 100644
--- a/src/systemd-hibernate-resume/Makefile
+++ b/src/systemd-hibernate-resume/Makefile
@@ -50,7 +50,7 @@ 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 \
diff --git a/src/systemd-hwdb/Makefile b/src/systemd-hwdb/Makefile
index c3abfb1cc0..2b3aaeed54 100644
--- a/src/systemd-hwdb/Makefile
+++ b/src/systemd-hwdb/Makefile
@@ -66,7 +66,7 @@ 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 \
diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile
index c10113273d..2485936f37 100644
--- a/src/systemd-nspawn/Makefile
+++ b/src/systemd-nspawn/Makefile
@@ -64,7 +64,7 @@ systemd_nspawn_LDADD = \
ifneq ($(HAVE_LIBIPTC),)
systemd_nspawn_LDADD += \
$(topoutdir)/src/libfirewall/libfirewall.la
-endif
+endif # HAVE_LIBIPTC
systemd_nspawn_SOURCES += local-addresses.c
bin_PROGRAMS += systemd-nspawn
diff --git a/src/systemd-quotacheck/Makefile b/src/systemd-quotacheck/Makefile
index 13ce002e4d..435ed0438c 100644
--- a/src/systemd-quotacheck/Makefile
+++ b/src/systemd-quotacheck/Makefile
@@ -35,7 +35,7 @@ systemd_quotacheck_SOURCES = \
systemd_quotacheck_LDADD = \
libshared.la
-endif
+endif # ENABLE_QUOTACHECK
EXTRA_DIST += \
units/systemd-quotacheck.service.in
diff --git a/src/systemd-random-seed/Makefile b/src/systemd-random-seed/Makefile
index ca4e0487ac..80f122dd73 100644
--- a/src/systemd-random-seed/Makefile
+++ b/src/systemd-random-seed/Makefile
@@ -39,7 +39,7 @@ systemd_random_seed_LDADD = \
SYSINIT_TARGET_WANTS += \
systemd-random-seed.service
-endif
+endif # ENABLE_RANDOMSEED
EXTRA_DIST += \
units/systemd-random-seed.service.in
diff --git a/src/systemd-rfkill/Makefile b/src/systemd-rfkill/Makefile
index ef647fd723..c8eaf043c9 100644
--- a/src/systemd-rfkill/Makefile
+++ b/src/systemd-rfkill/Makefile
@@ -38,7 +38,7 @@ systemd_rfkill_SOURCES = \
systemd_rfkill_LDADD = \
libshared.la
-endif
+endif # ENABLE_RFKILL
EXTRA_DIST += \
units/systemd-rfkill.service.in
diff --git a/src/systemd-timesync/Makefile b/src/systemd-timesync/Makefile
index 0f75e30e06..26d96ca1e0 100644
--- a/src/systemd-timesync/Makefile
+++ b/src/systemd-timesync/Makefile
@@ -52,7 +52,7 @@ GENERAL_ALIASES += \
nodist_pkgsysconf_DATA += \
src/timesync/timesyncd.conf
-endif
+endif # ENABLE_TIMESYNCD
gperf_gperf_sources += \
src/timesync/timesyncd-gperf.gperf
diff --git a/src/systemd-tmpfiles/Makefile b/src/systemd-tmpfiles/Makefile
index d5bfee8578..cd4778b4b5 100644
--- a/src/systemd-tmpfiles/Makefile
+++ b/src/systemd-tmpfiles/Makefile
@@ -57,7 +57,7 @@ dist_tmpfiles_DATA = \
ifneq ($(HAVE_SYSV_COMPAT),)
dist_tmpfiles_DATA += \
tmpfiles.d/legacy.conf
-endif
+endif # HAVE_SYSV_COMPAT
SYSINIT_TARGET_WANTS += \
systemd-tmpfiles-setup-dev.service \
@@ -72,7 +72,7 @@ TIMERS_TARGET_WANTS += \
INSTALL_DIRS += \
$(tmpfilesdir) \
$(sysconfdir)/tmpfiles.d
-endif
+endif # ENABLE_TMPFILES
EXTRA_DIST += \
tmpfiles.d/systemd.conf.m4 \
diff --git a/src/systemd-vconsole/Makefile b/src/systemd-vconsole/Makefile
index d386153140..9cfaaa5fba 100644
--- a/src/systemd-vconsole/Makefile
+++ b/src/systemd-vconsole/Makefile
@@ -41,7 +41,7 @@ nodist_systemunit_DATA += \
SYSINIT_TARGET_WANTS += \
systemd-vconsole-setup.service
-endif
+endif # ENABLE_VCONSOLE
EXTRA_DIST += \
src/vconsole/90-vconsole.rules.in \
diff --git a/src/sysusers/Makefile b/src/sysusers/Makefile
index 7b74450242..83f497dfac 100644
--- a/src/sysusers/Makefile
+++ b/src/sysusers/Makefile
@@ -46,11 +46,11 @@ nodist_sysusers_DATA = \
ifneq ($(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 \
diff --git a/src/udev/Makefile b/src/udev/Makefile
index 98bffe6720..187712f651 100644
--- a/src/udev/Makefile
+++ b/src/udev/Makefile
@@ -141,12 +141,12 @@ libudev_core_la_SOURCES += \
dist_udevrules_DATA += \
rules/80-drivers.rules
-endif
+endif # HAVE_KMOD
ifneq ($(HAVE_BLKID),)
libudev_core_la_SOURCES += \
src/udev/udev-builtin-blkid.c
-endif
+endif # HAVE_BLKID
ifneq ($(HAVE_ACL),)
libudev_core_la_SOURCES += \
@@ -154,7 +154,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