From 653ff0fb72e3cca2e0960442b732dcb22e9165ee Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 7 Jan 2009 12:24:51 -0500 Subject: [PATCH] More doc Makefile convenience edits. --- common/Makefile.common | 7 ++++--- muttator/locale/en-US/Makefile | 17 +++++++++++++---- vimperator/locale/en-US/Makefile | 17 +++++++++++++---- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index 8bb4edaf..c630005e 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -7,6 +7,7 @@ BASE = $(TOP)/../common DOC_SRC_FILES = $(wildcard locale/*/*.txt) DOC_FILES = ${DOC_SRC_FILES:%.txt=%.html} +DOC_DEPS = $(wildcard locale/*/asciidoc.conf) MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" sh $(BASE)/make_jar.sh @@ -106,12 +107,12 @@ $(JAR): doc #### doc check-asciidoc: - @asciidoc --version | awk '{ exit $$2 !~ /^8\.2\./ }' || \ + @$(ASCIIDOC) --version | awk '{ exit $$2 !~ /^8\.2\./ }' || \ echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported" -${DOC_FILES}: %.html: %.txt $(BASE)/Makefile.common locale/en-US/asciidoc.conf +${DOC_FILES}: %.html: %.txt $(BASE)/Makefile.common $(DOC_DEPS) @echo "DOC $@" - ${ASCIIDOC} --unsafe -a linkcss -a quirks! -a doctitle="$(shell basename $@)" -o $@ $< + $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a doctitle="$(shell basename $@)" -o $@ $< T2T = $(wildcard locale/*/*.t2t) t2t: $(T2T:%.t2t=%.xhtml) diff --git a/muttator/locale/en-US/Makefile b/muttator/locale/en-US/Makefile index 1451eb48..2d2deab1 100644 --- a/muttator/locale/en-US/Makefile +++ b/muttator/locale/en-US/Makefile @@ -1,9 +1,18 @@ -THISLOCALE=$(notdir $(shell pwd)) +THIS_LOCALE = $(notdir $(shell pwd)) +DOC_FILES = $(addsuffix .html,$(basename $(wildcard *.txt))) -all: *.html +.PHONY: all doc clean distclean + +doc: $(DOC_FILES) + +clean: + find . -name '*~' -exec rm -f {} \; + +distclean: clean + rm -f $(DOC_FILES) %: %.html %.txt @ -%.html: %.txt asciidoc.conf - @make -C ../../ locale/$(THISLOCALE)/$@ +%.html: %.txt ../../../common/Makefile.common asciidoc.conf + @make -C ../../ locale/$(THIS_LOCALE)/$@ diff --git a/vimperator/locale/en-US/Makefile b/vimperator/locale/en-US/Makefile index 1451eb48..2d2deab1 100644 --- a/vimperator/locale/en-US/Makefile +++ b/vimperator/locale/en-US/Makefile @@ -1,9 +1,18 @@ -THISLOCALE=$(notdir $(shell pwd)) +THIS_LOCALE = $(notdir $(shell pwd)) +DOC_FILES = $(addsuffix .html,$(basename $(wildcard *.txt))) -all: *.html +.PHONY: all doc clean distclean + +doc: $(DOC_FILES) + +clean: + find . -name '*~' -exec rm -f {} \; + +distclean: clean + rm -f $(DOC_FILES) %: %.html %.txt @ -%.html: %.txt asciidoc.conf - @make -C ../../ locale/$(THISLOCALE)/$@ +%.html: %.txt ../../../common/Makefile.common asciidoc.conf + @make -C ../../ locale/$(THIS_LOCALE)/$@