1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 19:07:58 +01:00

Autodetect language from locale in Makefile.doc

If the locale is en-US, this patch will add "-a lang=en" to asciidoc
build line.

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
This commit is contained in:
Janus Wel
2009-01-15 11:14:14 -05:00
committed by Ted Pavlic
parent 4adfe70c01
commit 876a8e6df0

View File

@@ -5,10 +5,11 @@
BASE = ../../../common BASE = ../../../common
THIS_LOCALE = $(notdir $(shell pwd)) THIS_LOCALE = $(notdir $(shell pwd))
THIS_LANG = $(firstword $(subst -, ,$(THIS_LOCALE)))
ADC_SRC_FILES = $(wildcard *.txt) ADC_SRC_FILES = $(wildcard *.txt)
ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html)
ADC_DEPS = $(wildcard asciidoc.conf) ADC_DEPS = $(wildcard asciidoc.conf lang-$(THIS_LANG).conf)
T2T_SRC_FILES = $(wildcard *.t2t) T2T_SRC_FILES = $(wildcard *.t2t)
T2T_FILES = $(T2T_SRC_FILES:%.t2t=%.xhtml) T2T_FILES = $(T2T_SRC_FILES:%.t2t=%.xhtml)
@@ -64,7 +65,7 @@ check-asciidoc:
$(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) $(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS)
@echo "DOC locale/$(THIS_LOCALE)/$@" @echo "DOC locale/$(THIS_LOCALE)/$@"
$(ASCIIDOC) --unsafe -a linkcss -a quirks! -a doctitle="$(shell basename $@)" -o $@ $< $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(THIS_LANG) -a doctitle="$(shell basename $@)" -o $@ $<
#### txt2tags #### txt2tags