This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Populate metaconfig branch.
[metaconfig.git] / dist-3.0at70 / mcon / U / Finish.U
1 ?RCS: $Id: Finish.U,v 3.0.1.6 1995/02/15 14:09:30 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: 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 ?MAKE:  -pick add $@ %<
40 ?F:!config.sh
41 : Finish up by extracting the .SH files
42 case "$alldone" in
43 exit)
44         $rm -rf UU
45         echo "Done."
46         exit 0
47         ;;
48 cont)
49         ;;
50 '')
51         dflt=''
52         nostick=true
53         $cat <<EOM
54
55 If you'd like to make any changes to the config.sh file before I begin
56 to configure things, do it as a shell escape now (e.g. !vi config.sh).
57
58 EOM
59         rp="Press return or use a shell escape to edit config.sh:"
60         . UU/myread
61         nostick=''
62         case "$ans" in
63         '') ;;
64         *) : in case they cannot read
65                 sh 1>&4 -c "$ans";;
66         esac
67         ;;
68 esac
69
70 : if this fails, just run all the .SH files by hand
71 . ./config.sh
72
73 ?X:
74 ?X: Turn silent mode off from now on (we want a verbose file extraction).
75 ?X: This means we have to explicitely test for '$silent' from now on to
76 ?X: strip off any verbose messages.
77 ?X:
78 echo " "
79 exec 1>&4
80 . ./UU/extract
81
82 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
83         dflt=y
84         case "$silent" in
85         true) ;;
86         *)
87                 $cat <<EOM
88
89 Now you need to generate make dependencies by running "make depend".
90 You might prefer to run it in background: "make depend > makedepend.out &"
91 It can take a while, so you might not want to run it right now.
92
93 EOM
94                 ;;
95         esac
96         rp="Run make depend now?"
97         . UU/myread
98         case "$ans" in
99         y*)
100                 make depend && echo "Now you must run a make."
101                 ;;
102         *)
103                 echo "You must run 'make depend' then 'make'."
104                 ;;
105         esac
106 elif test -f [Mm]akefile; then
107         echo " "
108         echo "Now you must run a make."
109 else
110         echo "Done."
111 fi
112
113 ?X:
114 ?X: kit*isdone files are left over by shell archives built using the makedist
115 ?X: script which comes from dist, while ark*isdone files are left over by
116 ?X: the cshar archive maker.
117 ?X:
118 $rm -f kit*isdone ark*isdone
119 $rm -rf UU
120
121 : End of Configure
122