chiark / gitweb /
build-sys: generate sed substitution from a list
[elogind.git] / Makefile.am
index 37c1cc26929fbc0abbf7c28e93b788084a9de2bf..d5b319e2cbc6c83524503d5cd4e6332a842c5691 100644 (file)
@@ -32,7 +32,7 @@ SUBDIRS = . po
 .SECONDARY:
 
 LIBUDEV_CURRENT=4
-LIBUDEV_REVISION=0
+LIBUDEV_REVISION=1
 LIBUDEV_AGE=3
 
 LIBGUDEV_CURRENT=1
@@ -40,7 +40,7 @@ LIBGUDEV_REVISION=3
 LIBGUDEV_AGE=1
 
 LIBSYSTEMD_LOGIN_CURRENT=4
-LIBSYSTEMD_LOGIN_REVISION=1
+LIBSYSTEMD_LOGIN_REVISION=2
 LIBSYSTEMD_LOGIN_AGE=4
 
 LIBSYSTEMD_DAEMON_CURRENT=0
@@ -48,11 +48,11 @@ LIBSYSTEMD_DAEMON_REVISION=8
 LIBSYSTEMD_DAEMON_AGE=0
 
 LIBSYSTEMD_ID128_CURRENT=0
-LIBSYSTEMD_ID128_REVISION=18
+LIBSYSTEMD_ID128_REVISION=19
 LIBSYSTEMD_ID128_AGE=0
 
 LIBSYSTEMD_JOURNAL_CURRENT=8
-LIBSYSTEMD_JOURNAL_REVISION=1
+LIBSYSTEMD_JOURNAL_REVISION=2
 LIBSYSTEMD_JOURNAL_AGE=8
 
 # Dirs of external packages
@@ -138,7 +138,7 @@ AM_CPPFLAGS = \
        -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
        -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
        -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
-       -DCATALOG_PATH=\"$(catalogstatedir)\" \
+       -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
        -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
        -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
        -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
@@ -355,8 +355,8 @@ dist_systemunit_DATA = \
        units/initrd-root-fs.target \
        units/remote-fs.target \
        units/remote-fs-pre.target \
-       units/remote-fs-setup.target \
        units/network.target \
+       units/network-online.target \
        units/nss-lookup.target \
        units/nss-user-lookup.target \
        units/hibernate.target \
@@ -558,7 +558,7 @@ CLEANFILES += \
 
 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
 
-XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in $(top_builddir)/man/*.xml)
+XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml)
 update-man-list: make-man-rules.py $(XML_GLOB)
        $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
        $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
@@ -1071,6 +1071,7 @@ noinst_tests += \
        test-env-replace \
        test-strbuf \
        test-strv \
+       test-path-util \
        test-strxcpyx \
        test-unit-name \
        test-unit-file \
@@ -1259,6 +1260,12 @@ test_strv_LDADD = \
        libsystemd-units.la \
        libsystemd-id128-internal.la
 
+test_path_util_SOURCES = \
+       src/test/test-path-util.c
+
+test_path_util_LDADD = \
+       libsystemd-shared.la
+
 test_strxcpyx_SOURCES = \
        src/test/test-strxcpyx.c
 
@@ -2748,8 +2755,7 @@ UNINSTALL_DATA_HOOKS += \
        catalog-remove-hook
 
 noinst_PROGRAMS += \
-       test-journal-enum \
-       test-catalog
+       test-journal-enum
 
 noinst_tests += \
        test-journal \
@@ -2758,7 +2764,8 @@ noinst_tests += \
        test-journal-match \
        test-journal-stream \
        test-journal-verify \
-       test-mmap-cache
+       test-mmap-cache \
+       test-catalog
 
 pkginclude_HEADERS += \
        src/systemd/sd-journal.h \
@@ -3685,8 +3692,7 @@ src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
 BUILT_SOURCES += \
        src/python-systemd/id128-constants.h
 
-PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
-SPHINXOPTS = -D latex_paper_size=$(PAPER) -D version=$(VERSION) -D release=$(VERSION)
+SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
 sphinx-%:
        $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
        $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
@@ -3706,48 +3712,51 @@ clean-sphinx:
        -rm -rf docs/html/python-systemd/
 
 # ------------------------------------------------------------------------------
+substitutions = \
+       '|rootlibexecdir=$(rootlibexecdir)|' \
+       '|rootbindir=$(rootbindir)|' \
+       '|bindir=$(bindir)|' \
+       '|SYSTEMCTL=$(rootbindir)/systemctl|' \
+       '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
+       '|pkgsysconfdir=$(pkgsysconfdir)|' \
+       '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
+       '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
+       '|pkgdatadir=$(pkgdatadir)|' \
+       '|systemunitdir=$(systemunitdir)|' \
+       '|userunitdir=$(userunitdir)|' \
+       '|systempresetdir=$(systempresetdir)|' \
+       '|userpresetdir=$(userpresetdir)|' \
+       '|udevhwdbdir=$(udevhwdbdir)|' \
+       '|udevrulesdir=$(udevrulesdir)|' \
+       '|catalogdir=$(catalogdir)|' \
+       '|tmpfilesdir=$(tmpfilesdir)|' \
+       '|sysctldir=$(sysctldir)|' \
+       '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
+       '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
+       '|PACKAGE_URL=$(PACKAGE_URL)|' \
+       '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \
+       '|prefix=$(prefix)|' \
+       '|exec_prefix=$(exec_prefix)|' \
+       '|libdir=$(libdir)|' \
+       '|includedir=$(includedir)|' \
+       '|VERSION=$(VERSION)|' \
+       '|rootprefix=$(rootprefix)|' \
+       '|udevlibexecdir=$(udevlibexecdir)|' \
+       '|SUSHELL=$(SUSHELL)|' \
+       '|DEBUGTTY=$(DEBUGTTY)|' \
+       '|KILL=$(KILL)|' \
+       '|QUOTAON=$(QUOTAON)|' \
+       '|QUOTACHECK=$(QUOTACHECK)|' \
+       '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
+       '|VARLOGDIR=$(varlogdir)|' \
+       '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
+       '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
+       '|PYTHON=$(PYTHON)|' \
+       '|PYTHON_BINARY=$(PYTHON_BINARY)|'
+
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
-               -e 's,@rootbindir\@,$(rootbindir),g' \
-               -e 's,@bindir\@,$(bindir),g' \
-               -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
-               -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
-               -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
-               -e 's,@SYSTEM_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/system,g' \
-               -e 's,@USER_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/user,g' \
-               -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
-               -e 's,@systemunitdir\@,$(systemunitdir),g' \
-               -e 's,@userunitdir\@,$(userunitdir),g' \
-               -e 's,@systempresetdir\@,$(systempresetdir),g' \
-               -e 's,@userpresetdir\@,$(userpresetdir),g' \
-               -e 's,@udevhwdbdir\@,$(udevhwdbdir),g' \
-               -e 's,@udevrulesdir\@,$(udevrulesdir),g' \
-               -e 's,@catalogdir\@,$(catalogdir),g' \
-               -e 's,@tmpfilesdir\@,$(tmpfilesdir),g' \
-               -e 's,@sysctldir\@,$(sysctldir),g' \
-               -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
-               -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-               -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-               -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
-               -e 's,@prefix\@,$(prefix),g' \
-               -e 's,@exec_prefix\@,$(exec_prefix),g' \
-               -e 's,@libdir\@,$(libdir),g' \
-               -e 's,@includedir\@,$(includedir),g' \
-               -e 's,@VERSION\@,$(VERSION),g' \
-               -e 's,@rootprefix\@,$(rootprefix),g' \
-               -e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \
-               -e 's,@SUSHELL\@,$(SUSHELL),g' \
-               -e 's,@DEBUGTTY\@,$(DEBUGTTY),g' \
-               -e 's,@KILL\@,$(KILL),g' \
-               -e 's,@QUOTAON\@,$(QUOTAON),g' \
-               -e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \
-               -e 's,@SYSTEM_SYSVINIT_PATH\@,$(sysvinitdir),g' \
-               -e 's,@VARLOGDIR\@,$(varlogdir),g' \
-               -e 's,@RC_LOCAL_SCRIPT_PATH_START\@,$(RC_LOCAL_SCRIPT_PATH_START),g' \
-               -e 's,@RC_LOCAL_SCRIPT_PATH_STOP\@,$(RC_LOCAL_SCRIPT_PATH_STOP),g' \
-               -e 's,@PYTHON\@,$(PYTHON),g' \
-               -e 's,@PYTHON_BINARY\@,$(PYTHON_BINARY),g' \
+       $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
                < $< > $@
 
 units/%: units/%.in Makefile