Kaydet (Commit) 2c1a12d3 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Don't set LANG env var by accident

...as setting a GNU Make LANG var exports it to recipes as an env var, and see
e.g. 56bc0b1a "Don't set locale env vars on
macOS" for potential problems caused by that.

This is the core half of a change spanning the core and help repos.

Change-Id: Ib7ae3b6edcef0b70e211a01aad4b3bd5c8905e06
Reviewed-on: https://gerrit.libreoffice.org/70929
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst db698a94
...@@ -17,7 +17,7 @@ $(call librelogo_Properties__Properties_impl,$(librelogo_DIR)/LibreLogo_$(1).pro ...@@ -17,7 +17,7 @@ $(call librelogo_Properties__Properties_impl,$(librelogo_DIR)/LibreLogo_$(1).pro
endef endef
define librelogo_Properties__Properties_impl define librelogo_Properties__Properties_impl
$(1) : LANG := $(4) $(1) : LANGUAGE := $(4)
$(1) : POFILE := $(3) $(1) : POFILE := $(3)
$(1) : SOURCE := $(2) $(1) : SOURCE := $(2)
...@@ -37,20 +37,20 @@ $(librelogo_DIR)/LibreLogo_%.properties : \ ...@@ -37,20 +37,20 @@ $(librelogo_DIR)/LibreLogo_%.properties : \
| $(librelogo_DIR)/.dir | $(librelogo_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1)
$(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_abbreviate_dirs, \
$(if $(filter-out qtz,$(LANG)), \ $(if $(filter-out qtz,$(LANGUAGE)), \
MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \ MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \
$(call gb_Executable_get_command,propex) \ $(call gb_Executable_get_command,propex) \
-i $(SOURCE) \ -i $(SOURCE) \
-o $@ \ -o $@ \
-m $${MERGEINPUT} \ -m $${MERGEINPUT} \
-l $(LANG) && \ -l $(LANGUAGE) && \
rm -rf $${MERGEINPUT} \ rm -rf $${MERGEINPUT} \
, \ , \
$(call gb_Executable_get_command,propex) \ $(call gb_Executable_get_command,propex) \
-i $(SOURCE) \ -i $(SOURCE) \
-o $@ \ -o $@ \
-m \ -m \
-l $(LANG) \ -l $(LANGUAGE) \
) \ ) \
) )
......
...@@ -190,7 +190,7 @@ define gb_XcuLangpackTarget__command ...@@ -190,7 +190,7 @@ define gb_XcuLangpackTarget__command
$(call gb_Output_announce,$(2),$(true),XCL,1) $(call gb_Output_announce,$(2),$(true),XCL,1)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \ mkdir -p $(dir $(1)) && \
sed -e "s/__LANGUAGE__/$(LANG)/" -f $(gb_XcuLangpackTarget_SED_delcomment)\ sed -e "s/__LANGUAGE__/$(LANGUAGE)/" -f $(gb_XcuLangpackTarget_SED_delcomment)\
$(3) > $(1)) $(3) > $(1))
endef endef
...@@ -384,7 +384,7 @@ $(call gb_Configuration_get_target,$(1)) : \ ...@@ -384,7 +384,7 @@ $(call gb_Configuration_get_target,$(1)) : \
$(call gb_XcuLangpackTarget__get_target_with_lang,$(3),$(4)) $(call gb_XcuLangpackTarget__get_target_with_lang,$(3),$(4))
$(call gb_XcuLangpackTarget__get_target_with_lang,$(3),$(4)) : \ $(call gb_XcuLangpackTarget__get_target_with_lang,$(3),$(4)) : \
$(SRCDIR)/$(2)/$(3).tmpl $(SRCDIR)/$(2)/$(3).tmpl
$(call gb_XcuLangpackTarget__get_target_with_lang,$(3),$(4)) : LANG := $(4) $(call gb_XcuLangpackTarget__get_target_with_lang,$(3),$(4)) : LANGUAGE := $(4)
endef endef
......
...@@ -60,18 +60,18 @@ gb_PropertiesTranslateTarget_DEPS := $(call gb_Executable_get_runtime_dependenci ...@@ -60,18 +60,18 @@ gb_PropertiesTranslateTarget_DEPS := $(call gb_Executable_get_runtime_dependenci
define gb_PropertiesTranslateTarget__command define gb_PropertiesTranslateTarget__command
$(call gb_Output_announce,$(2),$(true),PRP,1) $(call gb_Output_announce,$(2),$(true),PRP,1)
$(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_abbreviate_dirs, \
$(if $(filter-out qtz,$(LANG)), \ $(if $(filter-out qtz,$(LANGUAGE)), \
MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \ MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \
$(gb_PropertiesTranslateTarget_COMMAND) \ $(gb_PropertiesTranslateTarget_COMMAND) \
-i $(PROPERTIES_FILE) \ -i $(PROPERTIES_FILE) \
-l $(LANG) \ -l $(LANGUAGE) \
-m $${MERGEINPUT} \ -m $${MERGEINPUT} \
-o $(1) && \ -o $(1) && \
rm -f $${MERGEINPUT} \ rm -f $${MERGEINPUT} \
, \ , \
$(gb_PropertiesTranslateTarget_COMMAND) \ $(gb_PropertiesTranslateTarget_COMMAND) \
-i $(PROPERTIES_FILE) \ -i $(PROPERTIES_FILE) \
-l $(LANG) \ -l $(LANGUAGE) \
-m \ -m \
-o $(1) \ -o $(1) \
) \ ) \
...@@ -94,7 +94,7 @@ $(call gb_PropertiesTranslateTarget_get_clean_target,%) : ...@@ -94,7 +94,7 @@ $(call gb_PropertiesTranslateTarget_get_clean_target,%) :
# gb_PropertiesTranslateTarget_PropertiesTranslateTarget target source lang # gb_PropertiesTranslateTarget_PropertiesTranslateTarget target source lang
define gb_PropertiesTranslateTarget_PropertiesTranslateTarget define gb_PropertiesTranslateTarget_PropertiesTranslateTarget
$(call gb_PropertiesTranslateTarget_get_target,$(1)) : LANG := $(3) $(call gb_PropertiesTranslateTarget_get_target,$(1)) : LANGUAGE := $(3)
$(call gb_PropertiesTranslateTarget_get_target,$(1)) : POFILE := $(gb_POLOCATION)/$(3)/$(patsubst %/,%,$(dir $(2))).po $(call gb_PropertiesTranslateTarget_get_target,$(1)) : POFILE := $(gb_POLOCATION)/$(3)/$(patsubst %/,%,$(dir $(2))).po
$(call gb_PropertiesTranslateTarget_get_target,$(1)) : PROPERTIES_FILE := $(SRCDIR)/$(2) $(call gb_PropertiesTranslateTarget_get_target,$(1)) : PROPERTIES_FILE := $(SRCDIR)/$(2)
......
...@@ -17,7 +17,7 @@ $(call wizards_Properties__Properties_impl,$(wizards_DIR)/resources_$(1).propert ...@@ -17,7 +17,7 @@ $(call wizards_Properties__Properties_impl,$(wizards_DIR)/resources_$(1).propert
endef endef
define wizards_Properties__Properties_impl define wizards_Properties__Properties_impl
$(1) : LANG := $(4) $(1) : LANGUAGE := $(4)
$(1) : POFILE := $(3) $(1) : POFILE := $(3)
$(1) : SOURCE := $(2) $(1) : SOURCE := $(2)
...@@ -37,20 +37,20 @@ $(wizards_DIR)/resources_%.properties : \ ...@@ -37,20 +37,20 @@ $(wizards_DIR)/resources_%.properties : \
| $(wizards_DIR)/.dir | $(wizards_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRP,1)
$(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_abbreviate_dirs, \
$(if $(filter-out qtz,$(LANG)), \ $(if $(filter-out qtz,$(LANGUAGE)), \
MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \ MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILE)) && \
$(call gb_Executable_get_command,propex) \ $(call gb_Executable_get_command,propex) \
-i $(SOURCE) \ -i $(SOURCE) \
-o $@ \ -o $@ \
-m $${MERGEINPUT} \ -m $${MERGEINPUT} \
-l $(LANG) && \ -l $(LANGUAGE) && \
rm -rf $${MERGEINPUT} \ rm -rf $${MERGEINPUT} \
, \ , \
$(call gb_Executable_get_command,propex) \ $(call gb_Executable_get_command,propex) \
-i $(SOURCE) \ -i $(SOURCE) \
-o $@ \ -o $@ \
-m \ -m \
-l $(LANG) \ -l $(LANGUAGE) \
) \ ) \
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment