1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-21 16:15:46 +01:00

Makefile.doc cleanup. Also made Makefile build t2t's too with doc target.

This commit is contained in:
Ted Pavlic
2009-01-08 17:25:26 -05:00
parent f901cb1f42
commit 438a648b14
4 changed files with 78 additions and 42 deletions

View File

@@ -5,9 +5,8 @@ OS = $(shell uname -s)
BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S")
BASE = $(TOP)/../common
DOC_SRC_FILES = $(wildcard locale/*/*.txt)
DOC_FILES = ${DOC_SRC_FILES:%.txt=%.html}
DOC_DEPS = $(wildcard locale/*/asciidoc.conf)
DOC_SRC_FILES = $(wildcard locale/*/*.txt) $(wildcard locale/*/*.t2t)
LOCALES = $(wildcard locale/*)
MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" sh $(BASE)/make_jar.sh
@@ -64,8 +63,6 @@ info:
@echo -e "jar files $(shell echo ${JAR_FILES} | sed 's/ /\\n /g' )"
@echo "xpi files ${XPI_FILES}"
.PHONY: check-asciidoc
doc: check-asciidoc ${DOC_FILES}
xpi: ${XPI}
jar: ${JAR}
@@ -85,7 +82,7 @@ clean:
distclean: clean
@echo "More cleanup..."
rm -f ${DOC_FILES}
@set -e; for locale in $(LOCALES); do $(MAKE) -C clean; doc; done
rm -rf ${BUILD_DIR}
#### xpi
@@ -104,21 +101,7 @@ $(JAR): doc
$(MAKE_JAR) "$(JAR)" "$(JAR_BASES)" "$(JAR_DIRS)" "$(JAR_TEXTS)" "$(JAR_BINS)" "$(JAR_FILES)"
@echo "SUCCESS: $@"
#### doc
check-asciidoc:
@$(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 $(DOC_DEPS)
@echo "DOC $@"
$(ASCIIDOC) --unsafe -a linkcss -a quirks! -a doctitle="$(shell basename $@)" -o $@ $<
T2T = $(wildcard locale/*/*.t2t)
t2t: $(T2T:%.t2t=%.xhtml)
$(T2T:%.t2t=%.xhtml): locale/en-US/config.t2t
%.xhtml: %.t2t
@echo "T2T $@"
txt2tags --quiet $<
#### doc (see Makefile.doc)
doc:
@set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale doc; done