mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 16:31:06 +00:00
139a2cfae9
We used to export 'LC_COLLATE=C' for the environment of Genode tools. This was meant to ensure that sorting is always done C-style and not dependent on the users locale settings. This is required, for instance, to ensure that the same archive always yields the same hash. However, 'export LC_COLLATE=C' is not sufficient. It can be outruled by an 'LC_ALL' setting in the users environment. The manual of 'sort' recommends to set 'LC_ALL=C' locally if you want reliable results and this is what this commit does. Furthermore it removes the former 'export LC_COLLATE=C' directives. Note that I couldn't find a way to set 'LC_ALL' local to 'exec ... sort' in TCL. This is why I set it global instead using TCLs 'env' array. Note that the Make directive '$(sort ...)' and the TCL directive 'lsort', unlike the Shell directive 'sort', are not affected by the users locale settings. Fixes #4144
35 lines
940 B
PHP
35 lines
940 B
PHP
#
|
|
# \brief Common environment
|
|
# \author Norman Feske
|
|
# \date 2014-05-27
|
|
#
|
|
|
|
# compound directory where all 3rd-party source codes are installed
|
|
CONTRIB_DIR ?= $(GENODE_DIR)/contrib
|
|
|
|
SHELL := bash
|
|
VERBOSE ?= @
|
|
ECHO := echo -e
|
|
|
|
# limit destructive git operations (e.g., reset) to local directory
|
|
GIT := git --git-dir=.git
|
|
|
|
BRIGHT_COL ?= \x1b[01;33m
|
|
DARK_COL ?= \x1b[00;33m
|
|
DEFAULT_COL ?= \x1b[0m
|
|
|
|
MSG_PREFIX_TXT := $(DARK_COL)$(notdir $(PORT:.port=)) $(DEFAULT_COL)
|
|
MSG_PREFIX := $(ECHO) "$(MSG_PREFIX_TXT)"
|
|
MSG_DOWNLOAD := $(MSG_PREFIX)"download "
|
|
MSG_APPLY := $(MSG_PREFIX)"apply "
|
|
MSG_UPDATE := $(MSG_PREFIX)"update "
|
|
MSG_INSTALL := $(MSG_PREFIX)"install "
|
|
MSG_GENERATE := $(MSG_PREFIX)"generate "
|
|
MSG_EXTRACT := $(MSG_PREFIX)"extract "
|
|
MSG_GIT := $(MSG_PREFIX_TXT)git
|
|
|
|
#
|
|
# Utility to check if a tool is installed
|
|
#
|
|
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
|