mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
Everywhere: Remove everything non-essential for "make clean all"
This commit removes everything not strictly necessary for running "make clean all" inside jw-build. packaging jw-devtest. This cuts the repo down from 24077 to 4725 lines of code. The idea is to 1) Further remove bloat from the remaining bits 2) Re-add what's necessary to build and package other essential repos. The decision should be based on whether or not jw-build can also be useful in a non-janware context. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c36c83c164
commit
bc883deed4
199 changed files with 0 additions and 18851 deletions
|
|
@ -1,91 +0,0 @@
|
|||
GETTEXT_LOCALE ?= $(notdir $(shell $(PWD)))
|
||||
|
||||
include $(JWBDIR)/make/defs.mk
|
||||
include $(JWBDIR)/make/rules.mk
|
||||
include $(JWBDIR)/make/dev-utils.mk
|
||||
|
||||
GETTEXT_PROJECT_PO ?= $(PROJECT).po
|
||||
GETTEXT_PROJECT_POT ?= $(PROJECT).pot
|
||||
|
||||
GETTEXT_POT ?= $(wildcard *.pot)
|
||||
GETTEXT_PO ?= $(patsubst %.pot,%.po,$(GETTEXT_POT))
|
||||
GETTEXT_MO ?= $(patsubst %.po,%.mo,$(GETTEXT_PO))
|
||||
GETTEXT_INPUT_DIRS ?= $(wildcard $(TOPDIR)/tools $(TOPDIR)/src $(TOPDIR)/conf)
|
||||
GETTEXT_INPUT_EXTS ?= php cpp conf
|
||||
GETTEXT_INPUT_FILES ?= $(foreach d,$(GETTEXT_INPUT_DIRS),\
|
||||
$(shell find $d -name translate-me $(foreach ext,$(GETTEXT_INPUT_EXTS),-o -name '*.$(ext)')))
|
||||
GETTEXT_KEYWORDS ?= htr ehtr $(GETTEXT_EXTRA_KEYWORDS)
|
||||
GETTEXT_LINKS ?= LC_MESSAGES
|
||||
|
||||
all: $(GETTEXT_MO) | $(GETTEXT_LINKS)
|
||||
clean: clean-mo
|
||||
$(RM) -rf *~ .*.swp
|
||||
install: install_MO
|
||||
distclean: clean
|
||||
test:
|
||||
|
||||
extract: $(GETTEXT_POT)
|
||||
clean-mo:
|
||||
$(RM) -f *.mo *.tmp
|
||||
|
||||
$(GETTEXT_PROJECT_POT):
|
||||
xgettext --from-code=utf-8 --package-name $(PROJECT) --package-version $(DIST_VERSION) \
|
||||
--default-domain $(PROJECT) $(addprefix -k,$(GETTEXT_KEYWORDS)) \
|
||||
--output $@.tmp $(XGETTEXT_EXTRA_OPTS) $(GETTEXT_INPUT_FILES)
|
||||
mv $@.tmp $@
|
||||
|
||||
init: $(GETTEXT_PROJECT_POT)
|
||||
msginit --no-translator --locale $(GETTEXT_LOCALE) \
|
||||
--output-file $(GETTEXT_PROJECT_PO).tmp --input $<
|
||||
sed -i 's/charset=ASCII/charset=UTF-8/' $(GETTEXT_PROJECT_PO).tmp
|
||||
mv $(GETTEXT_PROJECT_PO).tmp $(GETTEXT_PROJECT_PO)
|
||||
|
||||
merge: $(GETTEXT_PROJECT_POT)
|
||||
msgmerge -v --lang $(GETTEXT_LOCALE) --output-file $(GETTEXT_PROJECT_PO).tmp \
|
||||
$(wildcard $(GETTEXT_PROJECT_PO)) $<
|
||||
mv $(GETTEXT_PROJECT_PO).tmp $(GETTEXT_PROJECT_PO)
|
||||
|
||||
merge-pot: $(GETTEXT_POT)
|
||||
msgmerge -v --lang $(GETTEXT_LOCALE) --output-file $(GETTEXT_PROJECT_PO).tmp \
|
||||
$(wildcard $(GETTEXT_PROJECT_PO)) $<
|
||||
mv $(GETTEXT_PROJECT_PO).tmp $(GETTEXT_PROJECT_PO)
|
||||
|
||||
%.po: %.pot
|
||||
msgcat --lang $(GETTEXT_LOCALE) --output-file $@.tmp $^
|
||||
mv $@.tmp $@
|
||||
|
||||
edit: merge $(GETTEXT_PROJECT_POT)
|
||||
poedit $(GETTEXT_PROJECT_PO)
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt --check --verbose --output-file $@.tmp $<
|
||||
mv $@.tmp $@
|
||||
|
||||
LC_%:
|
||||
ln -s . $@
|
||||
clean.lc-links:
|
||||
rm -f $(GETTEXT_LINKS)
|
||||
clean: clean.lc-links
|
||||
|
||||
#msginit --no-translator --locale es_MX --output-file $(PROJECT)_spanish.po --input $(PROJECT).pot
|
||||
#sed --in-place $(PROJECT)_spanish.po --expression = '/"hello, world!"/,/#: / s/""/"hola mundo"/'
|
||||
#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