diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-09 10:51:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-09 14:17:01 +0100 |
commit | dbce9c45f5b59e69eac580f0931a39dabae25a81 (patch) | |
tree | caca7869d592d619884fcb8b8a362a85d2bbf643 /l10ntools/source | |
parent | pivot table: fix interactions in online (diff) | |
download | core-dbce9c45f5b59e69eac580f0931a39dabae25a81.tar.gz core-dbce9c45f5b59e69eac580f0931a39dabae25a81.zip |
Apparently, Windows doesn't have the concept of a set but empty env var
...so in an (implicitly) --disable-release-build build (where config_host.mk
contains a
export ENABLE_RELEASE_BUILD=
line), getenv("ENABLE_RELEASE_BUILD") returns null, and after
a5484e496dcee9b110ef696101576a14b7a5a20e "Assert that certain env vars are set
in these build-time tools" e.g. `make CustomTarget_librelogo/locproperties`
started to fail with
> [build PRP] CustomTarget/librelogo/locproperties/LibreLogo_de.properties
> S=C:/lo/core && I=$S/instdir && W=$S/workdir && MERGEINPUT=C:/cygwin64/tmp/gbuild.iDa6ga && PATH="C:\lo\core\instdir\program;C:\lo\core\instdir\program;$PATH" $W/LinkTarget/Executable/propex.exe -i $S/librelogo/source/pythonpath/LibreLogo_en_US.properties -o $W/CustomTarget/librelogo/locproperties/LibreLogo_de.properties -m ${MERGEINPUT} -l de && rm -rf ${MERGEINPUT}
> Assertion failed: env != nullptr, file C:/lo/core/l10ntools/source/merge.cxx, line 117
> make[1]: *** [C:/lo/core/librelogo/CustomTarget_librelogo.mk:38: C:/lo/core/workdir/CustomTarget/librelogo/locproperties/LibreLogo_de.properties] Error 3
The other asserts added with a5484e496dcee9b110ef696101576a14b7a5a20e should be
OK, though:
* SRC_ROOT should never be empty.
* WORKDIR_FOR_BUILD could presumably be empty in a cross-compilation build
($cross_compile = yes in configure.ac), but the code in
l10ntools/source/localize.cxx apparently expects WORKDIR_FOR_BUILD not to be
empty anyway. (And at least in a nominally cross-compilation build with
--host=i686-pc-cygwin on Windows x64, $cross-compile is
left empty in configure.ac and WORKDIR_FOR_BUILD is set to a non-empty value.)
* ALL_LANGS should never be empty given how it is set in configure.ac, even if
the code in l10ntools/source/pocheck.cxx contains an explicit
if( aLanguages.isEmpty() )
check.
Change-Id: I06b216587f5d76e4b5d5abc748ff34308f2e9dbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107462
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/merge.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index b94bb7c84fc8..694e48f23f4f 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -21,7 +21,6 @@ #include <sal/log.hxx> #include <algorithm> -#include <cassert> #include <fstream> #include <string> #include <vector> @@ -114,8 +113,7 @@ MergeDataFile::MergeDataFile( bool bCaseSensitive, bool bWithQtz ) { auto const env = getenv("ENABLE_RELEASE_BUILD"); - assert(env != nullptr); - OString sEnableReleaseBuild(env); + OString sEnableReleaseBuild(env == nullptr ? "" : env); std::ifstream aInputStream( rFileName.getStr() ); if ( !aInputStream.is_open() ) |