mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-26 19:52:26 +01:00
* Require language part of locale to be two lowercase letters. * Update Makefile.doc comment -- add "include" comment. * Get rid of muttator/locale/en-US/Makefile symlink in favor of include.
57 lines
1.3 KiB
Makefile
57 lines
1.3 KiB
Makefile
# Symlink or me to (or include me from) locale/*/Makefile
|
|
|
|
#### configuration
|
|
|
|
LOCALE = $(shell basename `pwd`)
|
|
LANG = $(shell basename `pwd` | awk -F- '{ print ($$1 ~ /^[a-z]\{2\}$$/) ? $$1 : "en" }')
|
|
|
|
ADC_SRC_FILES = $(wildcard *.txt)
|
|
ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html)
|
|
ADC_DEPS = $(wildcard asciidoc.conf lang-$(LANG).conf)
|
|
|
|
DOC_FILES = $(ADC_FILES) $(T2T_FILES)
|
|
|
|
ASCIIDOC = asciidoc
|
|
AWK = awk
|
|
|
|
.SILENT:
|
|
|
|
#### rules
|
|
|
|
.PHONY: all help doc asciidoc check-asciidoc clean distclean
|
|
all: doc
|
|
|
|
doc: asciidoc
|
|
|
|
help:
|
|
@echo "$(NAME) $(VERSION) build"
|
|
@echo
|
|
@echo " make help - display this help"
|
|
@echo " make doc - build doc files"
|
|
@echo " make clean - clean up"
|
|
@echo " make distclean - clean up more"
|
|
|
|
clean:
|
|
@echo "Cleanup..."
|
|
|
|
distclean: clean
|
|
@echo "More cleanup..."
|
|
rm -f $(DOC_FILES)
|
|
|
|
#### Makes single-file makes easier to type
|
|
|
|
%: %.html %.txt ;
|
|
|
|
#### asciidoc
|
|
|
|
asciidoc: check-asciidoc $(ADC_FILES)
|
|
|
|
check-asciidoc:
|
|
@$(ASCIIDOC) --version | $(AWK) '{ exit $$2 !~ /^8\.2\./ }' || \
|
|
echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported"
|
|
|
|
$(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS)
|
|
@echo "DOC locale/$(LOCALE)/$@"
|
|
$(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(LANG) -a doctitle="$(shell basename $@)" -o $@ $<
|
|
|