This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure: eliminate some left over debug output
[metaconfig.git] / dist / U / Finish.U
1 ?RCS: $Id$
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4 ?RCS:
5 ?RCS: You may redistribute only under the terms of the Artistic License,
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 License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
10 ?RCS:
11 ?RCS: $Log: Finish.U,v $
12 ?RCS: Revision 3.0.1.6  1995/02/15  14:09:30  ram
13 ?RCS: patch51: now clearer about how to edit config.sh at the prompt (WED)
14 ?RCS:
15 ?RCS: Revision 3.0.1.5  1994/10/29  15:53:14  ram
16 ?RCS: patch36: added ?F: line for metalint file checking
17 ?RCS:
18 ?RCS: Revision 3.0.1.4  1994/05/06  14:19:37  ram
19 ?RCS: patch23: added blank lines around 'End of Configure'
20 ?RCS:
21 ?RCS: Revision 3.0.1.3  1993/10/16  13:46:09  ram
22 ?RCS: patch12: replaced Config_h by Magic_h in the dependency line
23 ?RCS:
24 ?RCS: Revision 3.0.1.2  1993/09/13  15:45:26  ram
25 ?RCS: patch10: fixed shell evaluation w/o shell escape while in silent mode
26 ?RCS:
27 ?RCS: Revision 3.0.1.1  1993/08/30  08:55:59  ram
28 ?RCS: patch8: prevents myread from blocking on empty answers, exceptionally
29 ?RCS:
30 ?RCS: Revision 3.0  1993/08/18  12:04:55  ram
31 ?RCS: Baseline for dist 3.0 netwide release.
32 ?RCS:
33 ?X:
34 ?X: This unit is the very last one in the Configure script.  It runs all the
35 ?X: SH files, which among other things produce config.h and (usually) Makefile.
36 ?X: It offers to do a make depend if the Makefile contains that target.
37 ?X:
38 ?MAKE:Finish: Chk_MANI Extract Myread Oldsym Magic_h cat rm contains \
39         test package make
40 ?MAKE:  -pick add $@ %<
41 ?F:!config.sh
42 ?T:pwd
43 : Finish up by extracting the .SH files
44 case "$alldone" in
45 exit)
46 ?X: They supplied the -E switch
47         echo "Stopping at your request, leaving temporary files around."
48         exit 0
49         ;;
50 cont)
51         ;;
52 '')
53         dflt=''
54         nostick=true
55         $cat <<EOM
56
57 If you'd like to make any changes to the config.sh file before I begin
58 to configure things, do it as a shell escape now (e.g. !vi config.sh).
59
60 EOM
61         rp="Press return or use a shell escape to edit config.sh:"
62         . UU/myread
63         nostick=''
64         case "$ans" in
65         '') ;;
66         *) : in case they cannot read
67                 sh 1>&4 -c "$ans";;
68         esac
69         ;;
70 esac
71
72 : if this fails, just run all the .SH files by hand
73 . ./config.sh
74
75 ?X:
76 ?X: Turn silent mode off from now on (we want a verbose file extraction).
77 ?X: This means we have to explicitly test for '$silent' from now on to
78 ?X: strip off any verbose messages.
79 ?X:
80 echo " "
81 exec 1>&4
82 pwd=`pwd`
83 . ./UU/extract
84 cd "$pwd"
85
86 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
87         dflt=y
88         case "$silent" in
89         true) ;;
90         *)
91                 $cat <<EOM
92
93 Now you need to generate make dependencies by running "$make depend".
94 You might prefer to run it in background: "$make depend > makedepend.out &"
95 It can take a while, so you might not want to run it right now.
96
97 EOM
98                 ;;
99         esac
100         rp="Run $make depend now?"
101         . UU/myread
102         case "$ans" in
103         y*)
104                 $make depend && echo "Now you must run '$make'."
105                 ;;
106         *)
107                 echo "You must run '$make depend' then '$make'."
108                 ;;
109         esac
110 elif test -f [Mm]akefile; then
111         echo " "
112         echo "Now you must run a $make."
113 else
114         echo "Configure done."
115 fi
116
117 if $test -f Policy.sh; then
118     $cat <<EOM
119
120 If you compile $package on a different machine or from a different object
121 directory, copy the Policy.sh file from this object directory to the
122 new one before you run Configure -- this will help you with most of
123 the policy defaults.
124
125 EOM
126 fi
127 if $test -f UU/config.msg; then
128     echo "Hmm.  I also noted the following information while running:"
129     echo " "
130     $cat UU/config.msg >&4
131 fi
132 ?X:
133 ?X: kit*isdone files are left over by shell archives built using the makedist
134 ?X: script which comes from dist, while ark*isdone files are left over by
135 ?X: the cshar archive maker.
136 ?X:
137 $rm -f kit*isdone ark*isdone
138 $rm -rf UU
139
140 : End of Configure
141