From: W. Trevor King Date: Thu, 6 Jun 2013 22:05:12 +0000 (-0400) Subject: Makefiles: create files directory before populating it X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8781c27e1fa18ca29b08603da76fd642e43701fb;p=catalyst.git Makefiles: create files directory before populating it The syntax for the rules is: targets ...: target-pattern: prereq-patterns | order-only-prerequisites For details, see: http://www.gnu.org/software/make/manual/html_node/Static-Usage.html http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html --- diff --git a/Makefile b/Makefile index 52e0297e..6f69e5c4 100644 --- a/Makefile +++ b/Makefile @@ -16,13 +16,16 @@ distdir = catalyst-$(PACKAGE_VERSION) all: $(EXTRA_DIST) -$(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst +files: + mkdir files + +$(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst | files a2x --conf-file=doc/asciidoc.conf --attribute="catalystversion=$(PACKAGE_VERSION)" \ --format=manpage -D files "$<" # Additional dependencies due to inclusion -files/catalyst.1: doc/subarches.generated.txt -files/catalyst-spec.5: doc/subarches.generated.txt doc/targets.generated.txt +files/catalyst.1: doc/subarches.generated.txt | files +files/catalyst-spec.5: doc/subarches.generated.txt doc/targets.generated.txt | files doc/subarches.generated.txt: $(wildcard catalyst/arch/*.py) doc/make_subarch_table_guidexml.py ./doc/make_subarch_table_guidexml.py @@ -30,7 +33,7 @@ doc/subarches.generated.txt: $(wildcard catalyst/arch/*.py) doc/make_subarch_tab doc/targets.generated.txt: doc/make_target_table.py $(wildcard catalyst/targets/*.py) "./$<" > "$@" -$(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile +$(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile | files a2x --conf-file=doc/asciidoc.conf --attribute="catalystversion=$(PACKAGE_VERSION)" \ --format=xhtml -D files "$<"