summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-21 15:37:57 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-21 15:37:57 +0000
commitdafca956013a09f7b5201b464199f47cf100f00f (patch)
tree2f5f6bcc99e74571ccfe362e7aedbabca26371ed /Configure
parent691b83fc019ccd67d851656fb04a49fb880821c4 (diff)
downloadperl-dafca956013a09f7b5201b464199f47cf100f00f.tar.gz
Add Configure option -Dmksymlinks which will create a symlink
forest if the current/build differs from the source directory. TODO: mkdir -p is not portable. p4raw-id: //depot/perl@8218
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure84
1 files changed, 83 insertions, 1 deletions
diff --git a/Configure b/Configure
index b655e62bcb..4897703e7d 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 Tue Dec 19 20:00:06 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Thu Dec 21 17:16:36 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -909,6 +909,7 @@ stdchar=''
d_stdio_stream_array=''
stdio_stream_array=''
sysman=''
+testsyml=''
trnl=''
uidformat=''
uidsign=''
@@ -2168,6 +2169,86 @@ else
fi
$rm -f blurfl sym
+: determine whether symbolic links are supported
+echo " "
+case "$lns" in
+*"ln -s")
+ echo "Checking how to test for symbolic links..." >&4
+ $lns blurfl sym
+ if $test "X$testsyml" = X; then
+ if $test -h sym 2>/dev/null; then
+ testsyml=-h
+ fi
+ fi
+ if $test "X$testsyml" = X; then
+ if $test -L sym 2>/dev/null; then
+ testsyml=-L
+ fi
+ fi
+ if $test "X$testsyml" != X; then
+ echo "You can test for symbolic links with $testsyml." >&4
+ else
+ echo "I do not know how you can test for symbolic links." >&4
+ fi
+ $rm -f blurfl sym
+ ;;
+*) echo "No symbolic links, so not testing for their testing..." >&4
+ ;;
+esac
+echo " "
+
+
+case "$mksymlinks" in
+$define|true|[yY]*)
+ case "$src" in
+ ''|'.') echo "Cannot create symlinks in the original directory." >&4
+ exit 1
+ ;;
+ *) case "$lns:$testsyml" in
+ *"ln -s:-"?)
+ echo "Creating the symbolic links..." >&4
+ echo "(First creating the subdirectories...)" >&4
+ cd ..
+ awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
+ read directory
+ test -z "$directory" && break
+ mkdir -p $directory
+ done
+ # Sanity check 1.
+ if test ! -d t/base; then
+ echo "Failed to create the subdirectories. Aborting." >&4
+ exit 1
+ fi
+ echo "(Then creating the symlinks...)" >&4
+ awk '{print $1}' $src/MANIFEST | while true; do
+ read filename
+ test -z "$filename" && break
+ if test -f $filename; then
+ if test $testsyml $filename; then
+ rm -f $filename
+ fi
+ fi
+ if test -f $filename; then
+ echo "$filename already exists, not symlinking."
+ else
+ ln -s $src/$filename $filename
+ fi
+ done
+ # Sanity check 2.
+ if test ! -f t/base/commonsense.t; then
+ echo "Failed to create the symlinks. Aborting." >&4
+ exit 1
+ fi
+ cd UU
+ ;;
+ *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
: see whether [:lower:] and [:upper:] are supported character classes
echo " "
case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
@@ -16405,6 +16486,7 @@ tar='$tar'
tbl='$tbl'
tee='$tee'
test='$test'
+testsyml='$testsyml'
timeincl='$timeincl'
timetype='$timetype'
touch='$touch'