From d43cf592eb46b4ba1b52844dab4a117d7e8c9ba7 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Mon, 16 Apr 2012 15:43:21 -0400 Subject: [PATCH] Renaming asciidoc sources to .in. Change manpages to build from *.in and add comments about how the make targets work. --- Makefile | 11 ++++++++--- docs/man/.gitignore | 2 +- ...book.1.asciidoc => ansible-playbook.1.asciidoc.in} | 0 .../{ansible.1.asciidoc => ansible.1.asciidoc.in} | 0 4 files changed, 9 insertions(+), 4 deletions(-) rename docs/man/man1/{ansible-playbook.1.asciidoc => ansible-playbook.1.asciidoc.in} (100%) rename docs/man/man1/{ansible.1.asciidoc => ansible.1.asciidoc.in} (100%) diff --git a/Makefile b/Makefile index 6de5dd195f5..79e7481aa1a 100644 --- a/Makefile +++ b/Makefile @@ -14,12 +14,17 @@ all: clean python tests: PYTHONPATH=./lib nosetests -v +# To force a rebuild of the docs run 'touch ansible.spec && make docs' docs: $(MANPAGES) -%.1.asciidoc.gen: %.1.asciidoc ansible.spec +# Regenerate %.1.asciidoc if %.1.asciidoc.in has been modified more +# recently than %.1.asciidoc. +%.1.asciidoc: %.1.asciidoc.in sed "s/%VERSION%/$(RPMVERSION)/" $< > $@ -%.1: %.1.asciidoc.gen +# Regenerate %.1 if %.1.asciidoc or ansible.spec has been modified +# more recently than %.1. (Implicitly runs the %.1.asciidoc recipe) +%.1: %.1.asciidoc ansible.spec $(ASCII2MAN) loc: @@ -45,7 +50,7 @@ clean: find . -type f \( -name "*.swp" \) -delete @echo "Cleaning up asciidoc to man transformations and results" find ./docs/man -type f -name "*.xml" -delete - find ./docs/man -type f -name "*.gen" -delete + find ./docs/man -type f -name "*.asciidoc" -delete @echo "Cleaning up output from test runs" -rm -rf test/test_data @echo "Cleaning up RPM building stuff" diff --git a/docs/man/.gitignore b/docs/man/.gitignore index ceb714c17d9..81a33679397 100644 --- a/docs/man/.gitignore +++ b/docs/man/.gitignore @@ -1,2 +1,2 @@ *.xml -*.gen +*.asciidoc diff --git a/docs/man/man1/ansible-playbook.1.asciidoc b/docs/man/man1/ansible-playbook.1.asciidoc.in similarity index 100% rename from docs/man/man1/ansible-playbook.1.asciidoc rename to docs/man/man1/ansible-playbook.1.asciidoc.in diff --git a/docs/man/man1/ansible.1.asciidoc b/docs/man/man1/ansible.1.asciidoc.in similarity index 100% rename from docs/man/man1/ansible.1.asciidoc rename to docs/man/man1/ansible.1.asciidoc.in