[PATCH 2/2] doc: Minor makefile cleanup.

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 9 18:51:02 PST 2014


On Tue, Dec 09, 2014 at 01:34:23AM -0800, Jon A. Cruz wrote:
> Split out directory creation to leverage order only prerequisites.

bit beyond my puny make skills but to the best of my abilities both patches:
Acked-by: Peter Hutterer <peter.hutterer at who-t.net>
learned a few new tricks though :)

Cheers,
   Peter
 
> 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.9.1
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list