py.mk: allow translation to be overriden in GNUmakefile

I like to use local makefile overrides, in the file GNUmakefile
(or, on case-sensitive systems, makefile) to set compilation choices.
However, writing
    TRANSLATION := de_DE
    include Makefile
did not work, because py.mk would override the TRANSLATION := specified
in an earlier part of the makefiles (but not from the commandline).

By using ?= instead of := the local makefile override works, but when
TRANSLATION is not specified it continues to work as before.
This commit is contained in:
Jeff Epler 2020-11-19 16:23:35 -06:00
parent aaca3eccf1
commit 982bce7259

View File

@ -7,7 +7,7 @@ HEADER_BUILD = $(BUILD)/genhdr
# file containing qstr defs for the core Python bit # file containing qstr defs for the core Python bit
PY_QSTR_DEFS = $(PY_SRC)/qstrdefs.h PY_QSTR_DEFS = $(PY_SRC)/qstrdefs.h
TRANSLATION := en_US TRANSLATION ?= en_US
# If qstr autogeneration is not disabled we specify the output header # If qstr autogeneration is not disabled we specify the output header
# for all collected qstrings. # for all collected qstrings.