From cd962ee06c2dfa79a6f77fa2a81244bd9bc7c49a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 10 Oct 2024 19:15:06 +0200 Subject: [PATCH] java{comp,exec}-script, csharp{comp,exec}-script: Improve debugging. * build-aux/javaexec.sh.in: Send debugging output to stderr, not stdout. * build-aux/javacomp.sh.in: Likewise. * build-aux/csharpexec.sh.in: Likewise. * build-aux/csharpcomp.sh.in: Likewise. --- ChangeLog | 8 ++++++++ build-aux/csharpcomp.sh.in | 6 +++--- build-aux/csharpexec.sh.in | 6 +++--- build-aux/javacomp.sh.in | 4 ++-- build-aux/javaexec.sh.in | 6 +++--- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04883497b5..b427c5033c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-10-10 Bruno Haible + + java{comp,exec}-script, csharp{comp,exec}-script: Improve debugging. + * build-aux/javaexec.sh.in: Send debugging output to stderr, not stdout. + * build-aux/javacomp.sh.in: Likewise. + * build-aux/csharpexec.sh.in: Likewise. + * build-aux/csharpcomp.sh.in: Likewise. + 2024-10-09 Bruno Haible csharpcomp: Avoid error on Windows. diff --git a/build-aux/csharpcomp.sh.in b/build-aux/csharpcomp.sh.in index fcfc32cd7f..58b53c6bff 100644 --- a/build-aux/csharpcomp.sh.in +++ b/build-aux/csharpcomp.sh.in @@ -162,7 +162,7 @@ if test -n "@HAVE_MCS@"; then }' func_tmpdir trap 'rm -rf "$tmp"' HUP INT QUIT TERM - test -z "$CSHARP_VERBOSE" || echo mcs $options_mcs $sources + test -z "$CSHARP_VERBOSE" || echo mcs $options_mcs $sources 1>&2 mcs $options_mcs $sources > "$tmp"/mcs.err result=$? sed -e "$sed_drop_success_line" < "$tmp"/mcs.err >&2 @@ -192,11 +192,11 @@ else csc=`cygpath -w "$csc"` ;; esac - test -z "$CSHARP_VERBOSE" || echo dotnet "$csc" $options_csc $sources_csc + test -z "$CSHARP_VERBOSE" || echo dotnet "$csc" $options_csc $sources_csc 1>&2 exec dotnet "$csc" $options_csc $sources_csc else if test -n "@HAVE_DOTNET_CSC@" || test -n "@HAVE_CSC@"; then - test -z "$CSHARP_VERBOSE" || echo csc $options_csc $sources_csc + test -z "$CSHARP_VERBOSE" || echo csc $options_csc $sources_csc 1>&2 exec csc $options_csc $sources_csc else echo 'C# compiler not found, try installing mono or dotnet, then reconfigure' 1>&2 diff --git a/build-aux/csharpexec.sh.in b/build-aux/csharpexec.sh.in index 45c95b4b5f..c2ccd3b645 100644 --- a/build-aux/csharpexec.sh.in +++ b/build-aux/csharpexec.sh.in @@ -101,7 +101,7 @@ if test -n "@HAVE_MONO@"; then MONO_PATH="$CONF_MONO_PATH" fi export MONO_PATH - test -z "$CSHARP_VERBOSE" || echo mono "$@" + test -z "$CSHARP_VERBOSE" || echo mono "$@" 1>&2 exec mono "$@" else if test -n "@HAVE_DOTNET@"; then @@ -180,7 +180,7 @@ else runtimeconfig_arg=`cygpath -w "$runtimeconfig"` ;; esac - test -z "$CSHARP_VERBOSE" || echo dotnet exec --runtimeconfig "$runtimeconfig_arg" "$prog_arg" "$@" + test -z "$CSHARP_VERBOSE" || echo dotnet exec --runtimeconfig "$runtimeconfig_arg" "$prog_arg" "$@" 1>&2 dotnet exec --runtimeconfig "$runtimeconfig_arg" "$prog_arg" "$@" result=$? rm -f "$runtimeconfig" @@ -204,7 +204,7 @@ else prog=`cygpath -w "$prog"` ;; esac - test -z "$CSHARP_VERBOSE" || echo clix "$prog" "$@" + test -z "$CSHARP_VERBOSE" || echo clix "$prog" "$@" 1>&2 exec clix "$prog" "$@" else echo 'C# virtual machine not found, try installing mono or dotnet, then reconfigure' 1>&2 diff --git a/build-aux/javacomp.sh.in b/build-aux/javacomp.sh.in index 65c4008fe7..a24fa1d410 100644 --- a/build-aux/javacomp.sh.in +++ b/build-aux/javacomp.sh.in @@ -37,7 +37,7 @@ if test -n "@HAVE_JAVAC_ENVVAR@"; then CLASSPATH="$CONF_CLASSPATH" fi export CLASSPATH - test -z "$JAVA_VERBOSE" || echo "$CONF_JAVAC $@" + test -z "$JAVA_VERBOSE" || echo "$CONF_JAVAC $@" 1>&2 exec $CONF_JAVAC "$@" else unset JAVA_HOME @@ -45,7 +45,7 @@ else # In this case, $CONF_JAVAC starts with "javac". CLASSPATH="$CLASSPATH" export CLASSPATH - test -z "$JAVA_VERBOSE" || echo "$CONF_JAVAC $@" + test -z "$JAVA_VERBOSE" || echo "$CONF_JAVAC $@" 1>&2 exec $CONF_JAVAC "$@" else echo 'Java compiler not found, try setting $JAVAC, then reconfigure' 1>&2 diff --git a/build-aux/javaexec.sh.in b/build-aux/javaexec.sh.in index cedb28d75d..01d5a6fadc 100644 --- a/build-aux/javaexec.sh.in +++ b/build-aux/javaexec.sh.in @@ -36,19 +36,19 @@ if test -n "@HAVE_JAVA_ENVVAR@"; then CLASSPATH="$CONF_CLASSPATH" fi export CLASSPATH - test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" + test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" 1>&2 exec $CONF_JAVA "$@" else unset JAVA_HOME export CLASSPATH if test -n "@HAVE_JAVA@"; then # In this case, $CONF_JAVA is "java". - test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" + test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" 1>&2 exec $CONF_JAVA "$@" else if test -n "@HAVE_JRE@"; then # In this case, $CONF_JAVA is "jre". - test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" + test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" 1>&2 exec $CONF_JAVA "$@" else echo 'Java virtual machine not found, try setting $JAVA, then reconfigure' 1>&2 -- 2.39.5