summaryrefslogtreecommitdiff
path: root/hints/os2.sh
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-05-28 08:13:00 -0400
committerJarkko Hietaniemi <jhi@iki.fi>1999-05-28 16:50:54 +0000
commitd6a255e6be67358d1e8a71b939edbfc895ee4fa6 (patch)
tree9ca6b9b4ba46c2b2a496cda3e0b83c68e1fc98d6 /hints/os2.sh
parent4435c47799d17bebb53fa0fbe063f550be95a17c (diff)
downloadperl-d6a255e6be67358d1e8a71b939edbfc895ee4fa6.tar.gz
Cosmetic OS/2-related patches
To: perl5-porters@perl.org (Mailing list Perl5) Message-Id: <199905281613.MAA02048@monk.mps.ohio-state.edu> p4raw-id: //depot/cfgperl@3497
Diffstat (limited to 'hints/os2.sh')
-rw-r--r--hints/os2.sh49
1 files changed, 48 insertions, 1 deletions
diff --git a/hints/os2.sh b/hints/os2.sh
index 5365522c5a..e49ab7f124 100644
--- a/hints/os2.sh
+++ b/hints/os2.sh
@@ -257,9 +257,56 @@ d_setprior='define'
# Commented:
#startsh='extproc ksh\\n#! sh'
+# Find patch:
+gnupatch='patch'
+if (gnupatch -v || gnupatch --version) 2>&1 >/dev/null; then
+ gnupatch=gnupatch
+else
+ if (gpatch -v || gpatch --version) 2>&1 >/dev/null; then
+ gnupatch=gpatch
+ else
+ # They may have a special PATH during configuring
+ if (patch -v || patch --version) 2>&1 >/dev/null; then
+ gnupatch="`./UU/loc patch.exe undef $pth`"
+ fi
+ fi
+fi
+
+# Apply patches if needed
+case "$0$running_c_cmd" in
+ *[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd
+ if grep "^libnames" ./Configure > /dev/null; then
+ # Not patched!
+ if test -f ./Configure.cmd ; then
+ echo "!!!" >&2
+ echo "!!! ./Configure not patched, but ./Configure.cmd exits" >&2
+ echo "!!! Do not know what to do!" >&2
+ echo "!!!" >&2
+ exit 2
+ fi
+ echo "!!!" >&2
+ echo "!!! You did not patch ./Configure!" >&2
+ echo "!!! I create Configure.cmd and patch it from ./os2/diff.configure." >&2
+ echo "!!!" >&2
+ echo "$gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch" >&2
+ ($gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch) >&2
+ echo "!!!" >&2
+ echo "!!! The report of patching is copied to 00_auto_patch." >&2
+ echo "!!! Now you need to restart Configure.cmd with all the options" >&2
+ echo "!!!" >&2
+ echo "extproc sh" > Configure.ctm
+ cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd
+ exit 0
+ else
+ echo "!!! Apparently we are running a patched Configure." >&2
+ fi
+ ;;
+ *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2
+esac
+
# Copy pod:
-cp ./README.os2 ./pod/perlos2.pod
+cp -uf ./README.os2 ./pod/perlos2.pod
# This script UU/usethreads.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use threads.