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

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


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 6443558c1f Generate the 'clean' helper script at configure time. 
Useful when we want/need to do a complete clean on the build tree.
6443558c1f is described below

commit 6443558c1fba8285d5eb06e83713c26dfe694163
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 1652030517..5ba04e2ac3 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 3d08d7ee37..eecff91388 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,
@@ -2238,6 +2238,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