[PATCH 2/5] doc: Minor makefile cleanup.
Bill Spitzak
spitzak at gmail.com
Tue Dec 9 17:01:10 PST 2014
From: "Jon A. Cruz" <jonc at osg.samsung.com>
Split out directory creation to leverage order only prerequisites.
Signed-off-by: Jon A. Cruz <jonc at osg.samsung.com>
---
doc/doxygen/Makefile.am | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am
index f8d636e..7276f5c 100644
--- a/doc/doxygen/Makefile.am
+++ b/doc/doxygen/Makefile.am
@@ -22,22 +22,24 @@ scanned_src_files_server = \
# all-local below)
dist_man3_MANS = $(shell test -d man && find man/man3 -name "wl_*.3" -printf "man/man3/%P\n")
-xml/client/index.xml: $(scanned_src_files_client) wayland.doxygen
- $(AM_V_GEN)$(MKDIR_P) xml/client && \
- (cat wayland.doxygen; \
+# Listing various directories that might need to be created.
+alldirs := xml/client xml/server man/man3
+
+xml/client/index.xml: $(scanned_src_files_client) wayland.doxygen | xml/client
+ $(AM_V_GEN)(cat wayland.doxygen; \
echo "GENERATE_XML=YES"; \
echo "XML_OUTPUT=xml/client"; \
echo "INPUT= $(scanned_src_files_client)"; \
) | $(DOXYGEN) -
-xml/server/index.xml: $(scanned_src_files_server) wayland.doxygen
- $(AM_V_GEN)$(MKDIR_P) xml/server && \
- (cat wayland.doxygen; \
+
+xml/server/index.xml: $(scanned_src_files_server) wayland.doxygen | xml/server
+ $(AM_V_GEN)(cat wayland.doxygen; \
echo "GENERATE_XML=YES"; \
echo "XML_OUTPUT=xml/server"; \
echo "INPUT= $(scanned_src_files_server)"; \
) | $(DOXYGEN) -
-man/man3/wl_display.3: $(scanned_src_files_client) $(scanned_src_files_server)
+man/man3/wl_display.3: $(scanned_src_files_client) $(scanned_src_files_server) wayland.doxygen | man/man3
$(AM_V_GEN)(cat wayland.doxygen; \
echo "GENERATE_MAN=YES"; \
echo "MAN_OUTPUT=man"; \
@@ -45,6 +47,10 @@ man/man3/wl_display.3: $(scanned_src_files_client) $(scanned_src_files_server)
echo "INPUT= $^"; \
) | $(DOXYGEN) -
+# general rule to create one of the listed directories.
+$(alldirs):
+ $(AM_V_GEN)$(MKDIR_P) $@
+
# there is no man-local
all-local: man/man3/wl_display.3
--
1.7.9.5
More information about the wayland-devel
mailing list