Use GNU make features to reduce repetition
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 26 Jun 2013 11:33:29 +0000 (12:33 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 5 Sep 2013 12:56:36 +0000 (13:56 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48277
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
doc/Makefile.am
test/Makefile.am

index aa5c7e1..b9a4c10 100644 (file)
@@ -1,34 +1,22 @@
 apidir = @htmldir@/api
 
-MAN_XML_FILES = \
-       dbus-cleanup-sockets.1.xml \
-       dbus-daemon.1.xml \
-       dbus-launch.1.xml \
-       dbus-monitor.1.xml \
-       dbus-run-session.1.xml \
-       dbus-send.1.xml \
-       dbus-uuidgen.1.xml \
-       $(NULL)
-
-if DBUS_XML_DOCS_ENABLED
-man1_MANS = \
+man_pages = \
        dbus-cleanup-sockets.1 \
        dbus-daemon.1 \
        dbus-launch.1 \
        dbus-monitor.1 \
        dbus-run-session.1 \
        dbus-send.1 \
-       dbus-uuidgen.1
+       dbus-uuidgen.1 \
+       $(NULL)
+
+MAN_XML_FILES = $(patsubst %.1,%.1.xml,$(man_pages))
+
+if DBUS_XML_DOCS_ENABLED
+man1_MANS = $(man_pages)
 endif
 
-MAN_HTML_FILES = \
-       dbus-cleanup-sockets.1.html \
-       dbus-daemon.1.html \
-       dbus-launch.1.html \
-       dbus-monitor.1.html \
-       dbus-run-session.1.html \
-       dbus-send.1.html \
-       dbus-uuidgen.1.html
+MAN_HTML_FILES = $(patsubst %.1,%.1.html,$(man_pages))
 
 DTDS = \
        busconfig.dtd \
index 405aa1c..eddcd64 100644 (file)
@@ -370,10 +370,6 @@ imported_data = \
 noinst_DATA = $(imported_data)
 CLEANFILES = $(noinst_DATA)
 
-data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
-       $(AM_V_at)$(MKDIR_P) data/valid-config-files
-       $(AM_V_GEN)cp $< $@
-
-data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
+$(imported_data): data/valid-config-files/%.conf: $(top_builddir)/bus/%.conf
        $(AM_V_at)$(MKDIR_P) data/valid-config-files
        $(AM_V_GEN)cp $< $@