]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: remove on-demand executable in the proper place, and
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Mon, 22 Feb 1999 19:43:36 +0000 (19:43 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Mon, 22 Feb 1999 19:43:36 +0000 (19:43 +0000)
just warn if it can't be removed; add wrapper code to test whether
the install-executable is newer than the build-executable, to
relink it when it appears to be out-of-date

ChangeLog
ltmain.in

index 918be46dc6bb84f95a9a316bafecff7329fb6e9c..8271043152a311eb73e634a01c4dc59f989946c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 1999-02-22  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * ltmain.in: remove on-demand executable in the proper place, and
+       just warn if it can't be removed; add wrapper code to test whether 
+       the install-executable is newer than the build-executable, to
+       relink it when it appears to be out-of-date
+
        * libltdl/configure.in: check for dld.h
        * libltdl/ltdl.c: include dld.h
        (dld_open) it's spelled memory_error, not no_memory_error
index a0016af7ada0033ce9fe09e543a7c42db8dadb15..d934fc521042584409d6e5cf03ac7de130e1924a 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1717,13 +1717,8 @@ compiler."
 
       # Create the output directory, or remove our outputs if we need to.
       if test -d $output_objdir; then
-       $show "${rm}r $output_objdir/$outputname $output_objdir/$objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
-       $run ${rm}r $output_objdir/$outputname $output_objdir/$objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
-
-       if test -z "$run" && test -f "$output_objdir/$objdir/$outputname"; then
-         $echo "$modename: warning: $output_objdir/$objdir/$outputname could not be removed" 1>&2
-         exit 1
-       fi
+       $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+       $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
       else
        $show "$mkdir $output_objdir"
        $run $mkdir $output_objdir
@@ -2012,7 +2007,7 @@ EOF
        # Prepare the list of exported symbols
        if test -z "$export_symbols"; then
          if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-           $show "extracting global symbols from \`$libname'"
+           $show "generating symbol list for \`$libname.la'"
            export_symbols="$objdir/$libname.exp"
            $run $rm $export_symbols
            eval cmds=\"$export_symbols_cmds\"
@@ -2495,6 +2490,12 @@ static const void *lt_preloaded_setup() {
            esac
          fi
        done
+
+        $run $rm "$output_objdir/$objdir/$outputname"
+
+       if test -z "$run" && test -f "$output_objdir/$objdir/$outputname"; then
+         $echo "$modename: warning: $output_objdir/$objdir/$outputname could not be removed" 1>&2
+       fi
       fi
 
       if test -n "$shlibpath_var"; then
@@ -2659,13 +2660,17 @@ else
          echo >> $output "\
   progdir=\"\$thisdir/$objdir/$objdir\"
 
-  if test ! -f \"\$progdir/\$program\"; then
+  if test ! -f \"\$progdir/\$program\" || \\
+     { newestfile=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+       test \"X\$newestfile\" != \"X\$progdir/\$program\"; }; then
     if test ! -d \"\$progdir\"; then
-      mkdir \"\$progdir\"
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$program\"
     fi
 
-    # link executable that searches the build-dir
-    (cd \$thisdir && $compile_for_build_command)
+    # link executable that uses uninstalled libraries
+    (cd \$thisdir && $compile_for_build_command) || exit 1
   fi"
        fi