This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Probe for timegm
[metaconfig.git] / U / modified / Whoa.U
1 ?RCS: $Id: Whoa.U,v 3.0.1.2 1997/02/28 15:21:21 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4 ?RCS: 
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
10 ?RCS:
11 ?RCS: $Log: Whoa.U,v $
12 ?RCS: Revision 3.0.1.2  1997/02/28  15:21:21  ram
13 ?RCS: patch61: whoa script now starts with leading "startsh"
14 ?RCS:
15 ?RCS: Revision 3.0.1.1  1994/10/29  16:02:01  ram
16 ?RCS: patch36: added ?F: line for metalint file checking
17 ?RCS:
18 ?RCS: Revision 3.0  1993/08/18  12:05:19  ram
19 ?RCS: Baseline for dist 3.0 netwide release.
20 ?RCS:
21 ?X:
22 ?X: This unit produces a bit of shell code that must be dotted in in order
23 ?X: to warn the user in case a change into a variable is noticed.
24 ?X:
25 ?X: To use this unit, $was must hold the old value that has changed. Upon
26 ?X: exit, the two variables $td and $tu are set to the correct value for
27 ?X: respectively defining or undefining a variable. For instance, if $vas was
28 ?X: $undef, but now $var is $define, after calling . whoa, you should use
29 ?X: eval "$var=\$tu" to finally set $var to the correct value. See unit Inlibc.
30 ?X:
31 ?MAKE:Whoa: Myread startsh hint
32 ?MAKE:  -pick add $@ %<
33 ?F:./whoa
34 ?T:var was td tu hintfile
35 : set up the script used to warn in case of inconsistency
36 cat <<EOS >whoa
37 $startsh
38 EOS
39 cat <<'EOSC' >>whoa
40 dflt=y
41 case "$hint" in
42     recommended)
43         case "$hintfile" in
44         '')     echo "The $hint value for \$$var on this machine was \"$was\"!" >&4
45                 ;;
46         *)      echo "Hmm.  Based on the hints in hints/$hintfile.sh, " >&4
47                 echo "the $hint value for \$$var on this machine was \"$was\"!" >&4
48                 ;;
49         esac
50         ;;
51     *)  echo " "
52         echo "*** WHOA THERE!!! ***" >&4
53         echo "    The $hint value for \$$var on this machine was \"$was\"!" >&4
54         ;;
55 esac
56 rp="    Keep the $hint value?"
57 . ./myread
58 case "$ans" in
59 y) td=$was; tu=$was;;
60 esac
61 EOSC
62