Mercurial > p > roundup > code
view locale/GNUmakefile @ 6438:b671ed2b49b2
2551143: Problem with installing external trackers ...
the change from distutils to setuptools moved the directories for the
templates, man pages and docs under the install directory. The install
directory is buried in the directory tree under
/usr/ib/python/.../roundup...egg/...
This patch tries to put them under:
the directory specified by --prefix argument
the python platform library prefix that prefixes /lib
in sysconfig.getpath('platlib')
the directory returned by sys.prefix.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 19 Jun 2021 14:22:36 -0400 |
| parents | a21b574554c3 |
| children | 0f0cee081990 |
line wrap: on
line source
# Extract translatable strings from Roundup sources, # update and compile all existing translations # tool locations XPOT ?= xpot MSGFMT ?= msgfmt MSGMERGE ?= msgmerge XGETTEXT ?= xgettext PYTHON ?= python TEMPLATE=roundup.pot PACKAGES=$(shell find ../roundup ../share/roundup/templates -name '*.py' \ | sed -e 's,/[^/]*$$,,' | sort | uniq) SOURCES=$(PACKAGES:=/*.py) PO_FILES=$(wildcard *.po) MO_FILES=$(PO_FILES:.po=.mo) PYTHON_BUILD=../build/lib RUN_PYTHON=PYTHONPATH=$(PYTHON_BUILD) $(PYTHON) -O all: dist help: @echo "$(MAKE) - build MO files. Run this before sdist" @echo "$(MAKE) template - update message template from sources" @echo "$(MAKE) locale.po - update message file from template" @echo "$(MAKE) locale.mo - compile individual message file" @echo "$(MAKE) help - this text"\ # This will rebuild all MO files without updating their corresponding PO # files first. Run before creating Roundup distribution (hence the name). # PO files should be updated by their translators only, automatic update # adds unwanted fuzzy labels. dist: for file in $(PO_FILES); do \ ${MSGFMT} -o `basename $$file .po`.mo $$file; \ done template: test -d $(PYTHON_BUILD) || (echo "Missing build directory. ln -s lib to build library"; exit 1) ${XPOT} -n -o $(TEMPLATE) $(SOURCES) ${RUN_PYTHON} ../roundup/cgi/TAL/talgettext.py -u $(TEMPLATE) \ ../share/roundup/templates/classic/html/*.html \ ../share/roundup/templates/devel/html/*.html \ ../share/roundup/templates/minimal/html/*.html \ ../share/roundup/templates/responsive/html/*.html ${XGETTEXT} -j -w 80 -F \ --msgid-bugs-address=roundup-devel@lists.sourceforge.net \ --copyright-holder="See Roundup README.txt" \ -o $(TEMPLATE) $(SOURCES) # helps to check template file before check in diff: svn diff roundup.pot|grep -v '^[-+]#'|vim -Rv - %.po: $(TEMPLATE) ${MSGMERGE} -U --suffix=.bak $@ $< %.mo: %.po ${MSGFMT} --statistics -o $@ $<
