commit 360c5910ef7ce2fbcd0e5b5b3bddb6992b468642
Author: Scott Kostyshak <[email protected]>
Date: Wed Jul 2 13:15:58 2025 +0200
lyxbuild: make build-commands portable
Now the path to the *reproducer's* directory is stored in a
variable. This addresses the fact that the (base) name of the
respository directory is likely different on different systems.
---
development/lyx-tester/lyxbuild | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/development/lyx-tester/lyxbuild b/development/lyx-tester/lyxbuild
index 71dfd9e330..422c9db0ca 100755
--- a/development/lyx-tester/lyxbuild
+++ b/development/lyx-tester/lyxbuild
@@ -480,6 +480,8 @@ gitRepoDIR="$( readlink -f ./ )"
# use *relative* gitRepoDIR so that when this command is logged it's more
# portable.
git_repo_d="../${PWD##*/}"
+echo 'LYX_GIT_REPO="$( pwd )" &&' >> "${LOGS_D}/build-commands"
+
# We want to do this for autotools also so mylyx() doesn't run an old cmake
build rather than a new autotools build.
[ -d ../CMakeBuild ] && { echo "$(ECHOPREFIX)removing previous CMake build" &&
runthis misc.log rm -rf ../CMakeBuild ;}
@@ -759,7 +761,19 @@ else
-DLYX_DEBUG_GLIBC_PEDANTIC=OFF
)
- runthis cmake.log cmake ${cmake_Werror_flags} "${git_repo_d}/"
${cmake_flags[@]} \
+ # Ideally we would do "runthis cmake.log cmake...", but we want the
+ # build-commands command to be portable, so instead we want to reference a
+ # variable (LYX_GIT_REPO) that will work on the reproducer's system.
+ # Otherwise build-commands would contain, e.g., "../repo" (this might be the
+ # name of the Git repository directory where lyxbuild was called), which
+ # might not be the same on the reproducer's system.
+ #
+ # Make sure we keep these two commands in sync.
+ echo "cmake ${cmake_Werror_flags} \"\${LYX_GIT_REPO}/\" ${cmake_flags[@]}"
>> "${LOGS_D}/build-commands"
+ # We do not redirect STDERR on purpose. This way, if there is new STDERR
output, it
+ # will be easier to catch.
+ # todo: ideally we would want to tee STDERR so it is also in the log.
+ cmake ${cmake_Werror_flags} "${git_repo_d}/" ${cmake_flags[@]} >
"${LOGS_D}/cmake.log" \
|| { echo "$(ERRORPREFIX)running cmake" >&2; exit 1; }
fi
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs