chiark / gitweb /
build: colorize gcc only if on tty
[elogind.git] / Makefile.am
index b95ddf2b4cb06896a8bae1c74f6c0898f8cbd42b..5dc17f8fe765e93e3062b7187e35ed2dd1118b9c 100644 (file)
@@ -24,6 +24,9 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 AM_MAKEFLAGS = --no-print-directory
 AUTOMAKE_OPTIONS = color-tests parallel-tests
 
+GCC_COLORS ?= 'ooh, shiny!'
+export GCC_COLORS
+
 SUBDIRS = . po
 
 # remove targets if the command fails
@@ -35,17 +38,17 @@ SUBDIRS = . po
 # Keep the test-suite.log
 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
 
-LIBUDEV_CURRENT=6
+LIBUDEV_CURRENT=7
 LIBUDEV_REVISION=0
-LIBUDEV_AGE=5
+LIBUDEV_AGE=6
 
 LIBGUDEV_CURRENT=2
 LIBGUDEV_REVISION=0
 LIBGUDEV_AGE=2
 
-LIBSYSTEMD_CURRENT=3
-LIBSYSTEMD_REVISION=1
-LIBSYSTEMD_AGE=3
+LIBSYSTEMD_CURRENT=4
+LIBSYSTEMD_REVISION=0
+LIBSYSTEMD_AGE=4
 
 # The following four libraries only exist for compatibility reasons,
 # their version info should not be bumped anymore
@@ -140,6 +143,7 @@ nodist_pkgsysconf_DATA =
 dist_pkgdata_DATA =
 dist_dbuspolicy_DATA =
 dist_dbussystemservice_DATA =
+dist_systemunit_DATA_busnames =
 check_PROGRAMS =
 check_DATA =
 tests=
@@ -263,10 +267,12 @@ install-target-wants-hook:
        what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.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="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
        what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
        what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
+
+install-busnames-target-wants-hook:
+       what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
        what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
 
 define add-wants
@@ -316,6 +322,11 @@ INSTALL_EXEC_HOOKS += \
        install-aliases-hook \
        install-touch-usr-hook
 
+if ENABLE_KDBUS
+INSTALL_EXEC_HOOKS += \
+       install-busnames-target-wants-hook
+endif
+
 # ------------------------------------------------------------------------------
 AM_V_M4 = $(AM_V_M4_$(V))
 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
@@ -451,8 +462,6 @@ dist_systemunit_DATA = \
        units/network-online.target \
        units/nss-lookup.target \
        units/nss-user-lookup.target \
-       units/hibernate.target \
-       units/hybrid-sleep.target \
        units/poweroff.target \
        units/reboot.target \
        units/rescue.target \
@@ -464,7 +473,6 @@ dist_systemunit_DATA = \
        units/sigpwr.target \
        units/sleep.target \
        units/sockets.target \
-       units/busnames.target \
        units/timers.target \
        units/paths.target \
        units/suspend.target \
@@ -492,6 +500,14 @@ dist_systemunit_DATA = \
        units/system-update.target \
        units/initrd-switch-root.target
 
+if ENABLE_KDBUS
+dist_systemunit_DATA += \
+       $(dist_systemunit_DATA_busnames)
+endif
+
+dist_systemunit_DATA_busnames += \
+       units/busnames.target
+
 nodist_systemunit_DATA = \
        units/getty@.service \
        units/serial-getty@.service \
@@ -509,8 +525,6 @@ nodist_systemunit_DATA = \
        units/emergency.service \
        units/rescue.service \
        units/user@.service \
-       units/systemd-hibernate.service \
-       units/systemd-hybrid-sleep.service \
        units/systemd-suspend.service \
        units/systemd-halt.service \
        units/systemd-poweroff.service \
@@ -547,7 +561,7 @@ EXTRA_DIST += \
        units/console-shell.service.m4.in \
        units/console-getty.service.m4.in \
        units/container-getty@.service.m4.in \
-       units/rescue.service.m4.in \
+       units/rescue.service.in \
        units/systemd-initctl.service.in \
        units/systemd-shutdownd.service.in \
        units/systemd-remount-fs.service.in \
@@ -566,8 +580,6 @@ EXTRA_DIST += \
        units/systemd-fsck-root.service.in \
        units/user@.service.in \
        units/debug-shell.service.in \
-       units/systemd-hibernate.service.in \
-       units/systemd-hybrid-sleep.service.in \
        units/systemd-suspend.service.in \
        units/quotaon.service.in \
        units/initrd-parse-etc.service.in \
@@ -581,7 +593,6 @@ CLEANFILES += \
        units/console-shell.service.m4 \
        units/console-getty.service.m4 \
        units/container-getty@.service.m4 \
-       units/rescue.service.m4 \
        units/user@.service.m4
 
 if HAVE_SYSV_COMPAT
@@ -860,6 +871,12 @@ libsystemd_shared_la_SOURCES = \
        src/shared/copy.h \
        src/shared/base-filesystem.c \
        src/shared/base-filesystem.h \
+       src/shared/memfd.c \
+       src/shared/memfd.h \
+       src/shared/uid-range.c \
+       src/shared/uid-range.h \
+       src/shared/switch-root.h \
+       src/shared/switch-root.c \
        src/shared/nss-util.h
 
 nodist_libsystemd_shared_la_SOURCES = \
@@ -1009,6 +1026,10 @@ libsystemd_core_la_SOURCES = \
        src/core/socket.h \
        src/core/busname.c \
        src/core/busname.h \
+       src/core/bus-common.c \
+       src/core/bus-common.h \
+       src/core/bus-endpoint.c \
+       src/core/bus-endpoint.h \
        src/core/target.c \
        src/core/target.h \
        src/core/snapshot.c \
@@ -1101,14 +1122,14 @@ libsystemd_core_la_SOURCES = \
        src/core/namespace.h \
        src/core/build.h \
        src/core/sysfs-show.h \
-       src/core/switch-root.h \
-       src/core/switch-root.c \
        src/core/killall.h \
        src/core/killall.c \
        src/core/audit-fd.c \
        src/core/audit-fd.h \
        src/core/show-status.c \
-       src/core/show-status.h
+       src/core/show-status.h \
+       src/core/failure-action.c \
+       src/core/failure-action.h
 
 if HAVE_KMOD
 libsystemd_core_la_SOURCES += \
@@ -1319,7 +1340,9 @@ tests += \
        test-conf-files \
        test-capability \
        test-async \
-       test-ratelimit
+       test-ratelimit \
+       test-condition-util \
+       test-uid-range
 
 EXTRA_DIST += \
        test/a.service \
@@ -1458,6 +1481,14 @@ test_async_SOURCES = \
 test_async_LDADD = \
        libsystemd-shared.la
 
+test_condition_util_SOURCES = \
+       src/test/test-condition-util.c
+
+test_condition_util_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
+
 test_fdset_SOURCES = \
        src/test/test-fdset.c
 
@@ -1476,6 +1507,12 @@ test_util_SOURCES = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_uid_range_SOURCES = \
+       src/test/test-uid-range.c
+
+test_uid_range_LDADD = \
+       libsystemd-core.la
+
 test_socket_util_SOURCES = \
        src/test/test-socket-util.c
 
@@ -1914,14 +1951,16 @@ nodist_systemunit_DATA += \
        units/systemd-tmpfiles-setup.service \
        units/systemd-tmpfiles-clean.service
 
+nodist_tmpfiles_DATA = \
+       tmpfiles.d/etc.conf
+
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
        tmpfiles.d/systemd-nologin.conf \
        tmpfiles.d/systemd-remote.conf \
        tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf \
-       tmpfiles.d/var.conf \
-       tmpfiles.d/etc.conf
+       tmpfiles.d/var.conf
 
 if HAVE_SYSV_COMPAT
 dist_tmpfiles_DATA += \
@@ -1944,10 +1983,14 @@ INSTALL_DIRS += \
 endif
 
 EXTRA_DIST += \
+       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 = \
@@ -2113,8 +2156,45 @@ systemd_system_update_generator_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
 
-if ENABLE_EFI
 # ------------------------------------------------------------------------------
+if ENABLE_HIBERNATE
+systemgenerator_PROGRAMS += \
+       systemd-hibernate-resume-generator
+
+rootlibexec_PROGRAMS += \
+       systemd-hibernate-resume
+
+systemd_hibernate_resume_SOURCES = \
+       src/hibernate-resume/hibernate-resume.c
+
+systemd_hibernate_resume_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+systemd_hibernate_resume_generator_SOURCES = \
+       src/hibernate-resume/hibernate-resume-generator.c
+
+systemd_hibernate_resume_generator_LDADD = \
+       libsystemd-label.la \
+       libsystemd-shared.la
+
+EXTRA_DIST += \
+       units/systemd-hibernate.service.in \
+       units/systemd-hibernate-resume@.service.in \
+       units/systemd-hybrid-sleep.service.in
+
+dist_systemunit_DATA += \
+       units/hibernate.target \
+       units/hybrid-sleep.target
+
+nodist_systemunit_DATA += \
+       units/systemd-hibernate.service \
+       units/systemd-hibernate-resume@.service \
+       units/systemd-hybrid-sleep.service
+endif
+
+# ------------------------------------------------------------------------------
+if ENABLE_EFI
 systemgenerator_PROGRAMS +=  \
        systemd-efi-boot-generator
 
@@ -2382,7 +2462,6 @@ libsystemd_internal_la_SOURCES = \
        src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h \
        src/systemd/sd-bus-vtable.h \
-       src/systemd/sd-memfd.h \
        src/systemd/sd-utf8.h \
        src/systemd/sd-event.h \
        src/systemd/sd-rtnl.h \
@@ -2432,7 +2511,6 @@ libsystemd_internal_la_SOURCES = \
        src/libsystemd/sd-bus/bus-slot.h \
        src/libsystemd/sd-bus/bus-protocol.h \
        src/libsystemd/sd-bus/kdbus.h \
-       src/libsystemd/sd-bus/sd-memfd.c \
        src/libsystemd/sd-utf8/sd-utf8.c \
        src/libsystemd/sd-event/sd-event.c \
        src/libsystemd/sd-event/event-util.h \
@@ -2550,7 +2628,6 @@ pkginclude_HEADERS += \
        src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h \
        src/systemd/sd-bus-vtable.h \
-       src/systemd/sd-memfd.h \
        src/systemd/sd-utf8.h \
        src/systemd/sd-event.h \
        src/systemd/sd-rtnl.h \
@@ -2571,7 +2648,6 @@ tests += \
        test-bus-kernel \
        test-bus-kernel-bloom \
        test-bus-kernel-benchmark \
-       test-bus-memfd \
        test-bus-zero-copy \
        test-bus-introspect \
        test-bus-objects \
@@ -2725,13 +2801,6 @@ test_bus_kernel_benchmark_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
-test_bus_memfd_SOURCES = \
-       src/libsystemd/sd-bus/test-bus-memfd.c
-
-test_bus_memfd_LDADD = \
-       libsystemd-internal.la \
-       libsystemd-shared.la
-
 test_bus_zero_copy_SOURCES = \
        src/libsystemd/sd-bus/test-bus-zero-copy.c
 
@@ -2917,6 +2986,7 @@ noinst_LTLIBRARIES += \
        libsystemd-terminal.la
 
 noinst_PROGRAMS += \
+       systemd-evcat \
        systemd-subterm
 
 unifontdatadir=$(datadir)/unifont
@@ -2931,9 +3001,18 @@ tests += \
 endif
 
 libsystemd_terminal_la_CFLAGS = \
-       $(AM_CFLAGS)
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
 
 libsystemd_terminal_la_SOURCES = \
+       src/libsystemd-terminal/idev.h \
+       src/libsystemd-terminal/idev-internal.h \
+       src/libsystemd-terminal/idev.c \
+       src/libsystemd-terminal/idev-evdev.c \
+       src/libsystemd-terminal/idev-keyboard.c \
+       src/libsystemd-terminal/sysview.h \
+       src/libsystemd-terminal/sysview-internal.h \
+       src/libsystemd-terminal/sysview.c \
        src/libsystemd-terminal/term-internal.h \
        src/libsystemd-terminal/term-charset.c \
        src/libsystemd-terminal/term-page.c \
@@ -2944,8 +3023,23 @@ libsystemd_terminal_la_SOURCES = \
        src/libsystemd-terminal/unifont.c
 
 libsystemd_terminal_la_LIBADD = \
+       libudev-internal.la \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_evcat_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+systemd_evcat_SOURCES = \
+       src/libsystemd-terminal/evcat.c
+
+systemd_evcat_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
 
 systemd_subterm_SOURCES = \
        src/libsystemd-terminal/subterm.c
@@ -3222,18 +3316,6 @@ libudev_core_la_LIBADD = \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
 
-libudev_core_la_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
-       -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-
-if ENABLE_FIRMWARE
-libudev_core_la_SOURCES += \
-       src/udev/udev-builtin-firmware.c
-
-dist_udevrules_DATA += \
-       rules/50-firmware.rules
-endif
-
 if HAVE_KMOD
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-kmod.c
@@ -4425,7 +4507,7 @@ rootlibexec_PROGRAMS += \
 nodist_systemunit_DATA += \
        units/systemd-hostnamed.service
 
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.hostname1.busname
 
 dist_dbuspolicy_DATA += \
@@ -4468,13 +4550,11 @@ EXTRA_DIST += \
        units/systemd-hostnamed.service.in
 
 # ------------------------------------------------------------------------------
-if ENABLE_KDBUS
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.systemd1.busname
 
 BUSNAMES_TARGET_WANTS += \
        org.freedesktop.systemd1.busname
-endif
 
 # ------------------------------------------------------------------------------
 if ENABLE_LOCALED
@@ -4489,7 +4569,7 @@ systemd_localed_LDADD = \
 nodist_systemunit_DATA += \
        units/systemd-localed.service
 
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.locale1.busname
 
 rootlibexec_PROGRAMS += \
@@ -4564,7 +4644,7 @@ dist_dbuspolicy_DATA += \
 nodist_systemunit_DATA += \
        units/systemd-timedated.service
 
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.timedate1.busname
 
 polkitpolicy_files += \
@@ -4726,7 +4806,9 @@ nodist_systemunit_DATA += \
        units/systemd-machined.service
 
 dist_systemunit_DATA += \
-       units/machine.slice \
+       units/machine.slice
+
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.machine1.busname
 
 dist_dbussystemservice_DATA += \
@@ -4836,7 +4918,7 @@ rootlibexec_PROGRAMS += \
 nodist_systemunit_DATA += \
        units/systemd-resolved.service
 
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.resolve1.busname
 
 dist_dbuspolicy_DATA += \
@@ -5228,7 +5310,9 @@ nodist_systemunit_DATA += \
        units/systemd-user-sessions.service
 
 dist_systemunit_DATA += \
-       units/user.slice \
+       units/user.slice
+
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.login1.busname
 
 dist_dbussystemservice_DATA += \
@@ -5677,6 +5761,11 @@ src/%: src/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
 
+tmpfiles.d/%: tmpfiles.d/%.m4
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
+
 units/%: units/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
@@ -5837,7 +5926,6 @@ SYSTEM_UNIT_ALIASES += \
 USER_UNIT_ALIASES += \
        $(systemunitdir)/shutdown.target shutdown.target \
        $(systemunitdir)/sockets.target sockets.target \
-       $(systemunitdir)/busnames.target busnames.target \
        $(systemunitdir)/timers.target timers.target \
        $(systemunitdir)/paths.target paths.target \
        $(systemunitdir)/bluetooth.target bluetooth.target \
@@ -5845,6 +5933,11 @@ USER_UNIT_ALIASES += \
        $(systemunitdir)/sound.target sound.target \
        $(systemunitdir)/smartcard.target smartcard.target
 
+if ENABLE_KDBUS
+USER_UNIT_ALIASES += \
+       $(systemunitdir)/busnames.target busnames.target
+endif
+
 GENERAL_ALIASES += \
        $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
        $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \