From dcc7a03e12b79451a51eaff36f7ca7dd953a57aa Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 6 Jun 2013 18:05:12 -0400 Subject: [PATCH] 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 --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 "$<" -- 2.26.2