summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-21 14:47:48 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-21 14:47:48 +0000
commitf57ac8dbeab4977aa1ae2fa8c58ac73827401689 (patch)
tree176aed5c26ce3a82eab3350636bf528e86bbf25f
parent49a8b3e520d195e64c754cf0f5ea986f7fde2750 (diff)
downloadperl-f57ac8dbeab4977aa1ae2fa8c58ac73827401689.tar.gz
Cross-configuration changes: make $from to rm the files
before copying them over (this means that he rm can be removed from the fflushall test), create $targetmkdir (not documented in install since it is supposed to internal use only), make $run to copy over the executable only if a stamp file .xok doesn't already exist (to avoid unnecessary copying of the executable) p4raw-id: //depot/perl@10788
-rwxr-xr-xConfigure64
-rw-r--r--Makefile.SH4
2 files changed, 58 insertions, 10 deletions
diff --git a/Configure b/Configure
index bc8ad9d460..db14b23be0 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed Jun 20 22:37:47 EET DST 2001 [metaconfig 3.0 PL70]
+# Generated on Thu Jun 21 18:44:48 EET DST 2001 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -2377,11 +2377,13 @@ $define|true|[yY]*)
esac
case "$src" in
/*) run=$src/Cross/run
+ targetmkdir=$src/Cross/mkdir
to=$src/Cross/to
from=$src/Cross/from
;;
*) pwd=`$test -f ../Configure & cd ..; pwd`
run=$pwd/Cross/run
+ targetmkdir=$pwd/Cross/mkdirkrun
to=$pwd/Cross/to
from=$pwd/Cross/from
;;
@@ -2416,30 +2418,76 @@ $define|true|[yY]*)
ssh|rsh)
cat >$run <<EOF
#!/bin/sh
+case "\$1" in
+-cwd)
+ shift
+ cwd=\$1
+ shift
+ ;;
+esac
+case "\$cwd" in
+'') cwd=$targetdir ;;
+esac
exe=\$1
shift
-$to \$exe
-$targetrun -l $targetuser $targethost "cd $targetdir && ./\$exe \$@"
+if $test ! -f \$exe.xok; then
+ $to \$exe
+ $touch \$exe.xok
+fi
+$targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
EOF
;;
*) echo "Unknown targetrun '$targetrun'" >&4
exit 1
;;
esac
+ case "$targetmkdir" in
+ */Cross/mkdir)
+ cat >$targetmkdir <<EOF
+#!/bin/sh
+$targetrun -l $targetuser $targethost "mkdir -p \$@"
+EOF
+ ;;
+ *) echo "Unknown targetmkdir '$targetmkdir'" >&4
+ exit 1
+ ;;
+ esac
case "$targetto" in
scp|rcp)
cat >$to <<EOF
#!/bin/sh
for f in \$@
do
- $targetto $q \$f $targetuser@$targethost:$targetdir/. || exit 1
+ case "\$f" in
+ /*)
+ $targetmkdir \`dirname \$f\`
+ $targetto $q \$f $targetuser@$targethost:\$f || exit 1
+ ;;
+ *)
+ $targetmkdir $targetdir/\`dirname \$f\`
+ $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
+ ;;
+ esac
done
exit 0
EOF
;;
cp) cat >$to <<EOF
#!/bin/sh
-cp \$@ $targetdir/.
+for f in \$@
+do
+ case "\$f" in
+ /*)
+ $mkdir -p $targetdir/\`dirname \$f\`
+ $cp \$f $targetdir/\$f || exit 1
+ ;;
+ *)
+ $targetmkdir $targetdir/\`dirname \$f\`
+ $cp \$f $targetdir/\$f || exit 1
+ ;;
+ esac
+done
+exit 0
EOF
;;
*) echo "Unknown targetto '$targetto'" >&4
@@ -2452,6 +2500,7 @@ EOF
#!/bin/sh
for f in \$@
do
+ $rm -f \$f
$targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
done
exit 0
@@ -2461,6 +2510,7 @@ EOF
#!/bin/sh
for f in \$@
do
+ $rm -f \$f
cp $targetdir/\$f . || exit 1
done
exit 0
@@ -13793,7 +13843,6 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
output=''
set try -DTRY_FPUTC
if eval $compile; then
- $rm -f try.out
$run ./try 2>/dev/null
code="$?"
$from try.out
@@ -13805,7 +13854,6 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
'')
set try -DTRY_FPRINTF
if eval $compile; then
- $rm -f try.out
$run ./try 2>/dev/null
code="$?"
$from try.out
@@ -13820,7 +13868,6 @@ fi
case "$fflushNULL" in
'') set try -DTRY_FFLUSH_NULL $output
if eval $compile; then
- $rm -f try.out
$run ./try 2>/dev/null
code="$?"
$from try.out
@@ -13945,7 +13992,6 @@ EOM
$cat >&4 <<EOM
(Now testing the other method--but note that this also may fail.)
EOM
- $rm -f try.out
$run ./try 2>/dev/null
code=$?
$from try.out
diff --git a/Makefile.SH b/Makefile.SH
index 133fd339cd..808ca9c504 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -481,6 +481,7 @@ miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
*)
$spitshell >>Makefile <<'!NO!SUBS!'
miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
+ -@rm -f miniperl.xok
$(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \
miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
$(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
@@ -491,6 +492,7 @@ miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
$spitshell >>Makefile <<'!NO!SUBS!'
perl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT)
+ -@rm -f miniperl.xok
$(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILING) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
# Purify/Quantify Perls.
@@ -823,7 +825,7 @@ _mopup:
-rm -f perl.loadmap miniperl.loadmap perl.prelmap miniperl.prelmap
-rm -f perl.third lib*.so.perl.third perl.3log t/perl.third t/perl.3log
-rm -f perl.pixie lib*.so.perl.pixie lib*.so.Addrs
- -rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts
+ -rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
rm -f perl suidperl miniperl $(LIBPERL) libperl.* microperl
# Do not 'make _tidy' directly.