mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
gettext.mk: Add mechanism for preprocessing source files
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
2e1246bc55
commit
8547912bc6
1 changed files with 19 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ clean-mo:
|
|||
$(GETTEXT_POT): $(GETTEXT_INPUT_FILES)
|
||||
xgettext --from-code=utf-8 --package-name $(PROJECT) --package-version $(DIST_VERSION) \
|
||||
--default-domain $(PROJECT) $(addprefix -k,$(GETTEXT_KEYWORDS)) \
|
||||
--output $@.tmp $(GETTEXT_INPUT_FILES)
|
||||
--output $@.tmp $(XGETTEXT_EXTRA_OPTS) $(GETTEXT_INPUT_FILES)
|
||||
mv $@.tmp $@
|
||||
|
||||
init: $(GETTEXT_POT)
|
||||
|
|
@ -50,4 +50,22 @@ $(GETTEXT_MO): $(GETTEXT_PO)
|
|||
#mkdir --parents ./es_MX.utf8/LC_MESSAGES
|
||||
#msgfmt --check --verbose --output-file ./es_MX.utf8/LC_MESSAGES/$(PROJECT).mo $(PROJECT)_spanish.po
|
||||
|
||||
GETTEXT_TMP = $(patsubst %.php,%.htr,$(GETTEXT_PREPROCESS))
|
||||
GETTEXT_INPUT_FILES += $(GETTEXT_TMP)
|
||||
|
||||
all: htr
|
||||
clean: htr-tmp-clean
|
||||
|
||||
htr: $(GETTEXT_TMP)
|
||||
|
||||
htr-tmp-clean:
|
||||
rm -f *.htr
|
||||
|
||||
define copy_rule
|
||||
./%.htr.tmp: $(1)/%.php
|
||||
cp $$< $$@
|
||||
endef
|
||||
|
||||
$(foreach d, $(HTR_SOURCE_DIRS), $(eval $(call copy_rule,$(d))))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue