This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: [PATCH Configure] was RE: [PATCH] was RE: Perl_die() /Perl_croak()
[metaconfig.git] / U / modified / Chk_MANI.U
1 ?RCS: $Id: Chk_MANI.U,v 3.0.1.2 1997/02/28 14:57:25 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: Chk_MANI.U,v $
12 ?RCS: Revision 3.0.1.2  1997/02/28  14:57:25  ram
13 ?RCS: patch61: added support for src.U
14 ?RCS:
15 ?RCS: Revision 3.0.1.1  1994/10/31  09:33:14  ram
16 ?RCS: patch44: now lists Begin instead of Myinit in its dependencies
17 ?RCS: patch44: leading comment now explains how this unit is included
18 ?RCS:
19 ?RCS: Revision 3.0  1993/08/18  12:04:45  ram
20 ?RCS: Baseline for dist 3.0 netwide release.
21 ?RCS:
22 ?X:
23 ?X: This unit checks the package by making sure every file listed in MANIFEST
24 ?X: is present. It is systematically "included" via the Finish unit (which
25 ?X: is always present in every Configure script), although it may result in
26 ?X: an empty inclusion when no MANIFEST is present.
27 ?X:
28 ?MAKE:Chk_MANI: Begin c n rsrc
29 ?MAKE:  -pick wipe $@ %<
30 ?T:filelist ans tmppwd
31 ?X: This check happens at metaconfig-time, so it's ok to hard-code the path.
32 @if {test -f ../MANIFEST}
33 : Now test for existence of everything in MANIFEST
34 echo " "
35 if test -f "$rsrc/MANIFEST"; then
36         echo "First let's make sure your kit is complete.  Checking..." >&4
37 ?X:
38 ?X: Files spelled uppercased and beginning with PACK are produced by the
39 ?X: shell archive builder and may be removed by the user. Usually, they are
40 ?X: not listed in the MANIFEST file, but you never know...
41 ?X: We try the new way of split and the old way of split.
42         awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50)
43         rm -f missing
44         tmppwd=`pwd`
45         for filelist in x??; do
46                 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
47         done
48         if test -s missing; then
49                 cat missing >&4
50                 cat >&4 <<'EOM'
51
52 THIS PACKAGE SEEMS TO BE INCOMPLETE.
53
54 You have the option of continuing the configuration process, despite the
55 distinct possibility that your kit is damaged, by typing 'y'es.  If you
56 do, don't blame me if something goes wrong.  I advise you to type 'n'o
57 and contact the author (<MAINTLOC>).
58
59 EOM
60 ?X: Can't use $echo at this early stage
61                 echo $n "Continue? [n] $c" >&4
62                 read ans
63                 case "$ans" in
64                 y*)
65                         echo "Continuing..." >&4
66                         rm -f missing
67                         ;;
68                 *)
69 ?X:
70 ?X: Use kill and not exit, so that the trap gets executed to clean up
71 ?X:
72                         echo "ABORTING..." >&4
73                         kill $$
74                         ;;
75                 esac
76         else
77                 echo "Looks good..."
78         fi
79 else
80         echo "There is no MANIFEST file.  I hope your kit is complete !"
81 fi
82 rm -f missing x??
83
84 @end