This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit fa62bc744e2883230bb7f5c34943671def5009fe
Author: Jim Jagielski <[email protected]>
AuthorDate: Tue Jul 28 16:45:56 2026 -0400

    Generate the 'clean' helper script at configure time.
    Useful when we want/need to do a complete clean on the
    build tree.
---
 main/.gitignore   |  1 +
 main/set_soenv.in | 28 +++++++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/main/.gitignore b/main/.gitignore
index c6e805b829..c306dc5b99 100644
--- a/main/.gitignore
+++ b/main/.gitignore
@@ -31,6 +31,7 @@
 /configure
 /set_soenv
 /bootstrap
+/clean
 /makefile.mk
 /solver
 /winenv.set*
diff --git a/main/set_soenv.in b/main/set_soenv.in
index c41513079b..0dd3b35c62 100644
--- a/main/set_soenv.in
+++ b/main/set_soenv.in
@@ -53,7 +53,7 @@ use File::Basename;
 # IIa. Declaring variables for the system commands, etc.
 #--------------------------------------------------------
 #
-my ( $outfile, $outfile_sh, $outfile_bat, $bootfile, $newline, $comment,
+my ( $outfile, $outfile_sh, $outfile_bat, $bootfile, $cleanfile, $newline, 
$comment,
      $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps,
      $wps, $cur_dir, $par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $MINGW,
      $USE_MINGW, $platform,
@@ -2240,6 +2240,32 @@ $tmp = $SRC_ROOT.$ds.$bootfile;
 if (rename( $bootfile, $tmp ) ne 1)
 {  `mv -f $bootfile $tmp`;
 }
+#
+#--------------------------------------------------------
+# Generating the clean file, which needs to know the name
+# of the platform specific environment set-up script.
+#--------------------------------------------------------
+#
+$cleanfile = "clean";
+open( OUT, ">$cleanfile" ) ||
+die "Cannot open $cleanfile: $!\n";
+print OUT "#!/bin/sh\n";
+print OUT "# Generated by set_soenv, do not edit.\n";
+print OUT "cd \"`dirname \"\$0\"`\" || exit 1\n";
+print OUT ". ./$outfile_sh\n";
+print OUT "dmake clean\n";
+print OUT "make clean\n";
+close( OUT ) || print "Can't close $cleanfile: $!";
+system("chmod +x $cleanfile");
+#
+#--------------------------------------------------------
+# Moving the clean file to the build home directory.
+#--------------------------------------------------------
+#
+$tmp = $SRC_ROOT.$ds.$cleanfile;
+if (rename( $cleanfile, $tmp ) ne 1)
+{  `mv -f $cleanfile $tmp`;
+}
 
 print "Configure completed";
 if ( $Warning ne "" ) {

Reply via email to