This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
metaconfig unit changes for #14287.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 15 Jan 2002 17:56:29 +0000 (17:56 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 15 Jan 2002 17:56:29 +0000 (17:56 +0000)
p4raw-id: //depot/metaconfig@14288

U/modified/Chk_MANI.U [new file with mode: 0644]
U/modified/Extract.U
U/modified/Finish.U
U/perl/Extensions.U
U/perl/dlsrc.U

diff --git a/U/modified/Chk_MANI.U b/U/modified/Chk_MANI.U
new file mode 100644 (file)
index 0000000..15c23d4
--- /dev/null
@@ -0,0 +1,84 @@
+?RCS: $Id: Chk_MANI.U,v 3.0.1.2 1997/02/28 14:57:25 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS: 
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: Chk_MANI.U,v $
+?RCS: Revision 3.0.1.2  1997/02/28  14:57:25  ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.1  1994/10/31  09:33:14  ram
+?RCS: patch44: now lists Begin instead of Myinit in its dependencies
+?RCS: patch44: leading comment now explains how this unit is included
+?RCS:
+?RCS: Revision 3.0  1993/08/18  12:04:45  ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit checks the package by making sure every file listed in MANIFEST
+?X: is present. It is systematically "included" via the Finish unit (which
+?X: is always present in every Configure script), although it may result in
+?X: an empty inclusion when no MANIFEST is present.
+?X:
+?MAKE:Chk_MANI: Begin c n rsrc
+?MAKE: -pick wipe $@ %<
+?T:filelist ans tmppwd
+?X: This check happens at metaconfig-time, so it's ok to hard-code the path.
+@if {test -f ../MANIFEST}
+: Now test for existence of everything in MANIFEST
+echo " "
+if test -f "$rsrc/MANIFEST"; then
+       echo "First let's make sure your kit is complete.  Checking..." >&4
+?X:
+?X: Files spelled uppercased and beginning with PACK are produced by the
+?X: shell archive builder and may be removed by the user. Usually, they are
+?X: not listed in the MANIFEST file, but you never know...
+?X:
+       awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | split -50
+       rm -f missing
+       tmppwd=`pwd`
+       for filelist in x??; do
+               (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing")
+       done
+       if test -s missing; then
+               cat missing >&4
+               cat >&4 <<'EOM'
+
+THIS PACKAGE SEEMS TO BE INCOMPLETE.
+
+You have the option of continuing the configuration process, despite the
+distinct possibility that your kit is damaged, by typing 'y'es.  If you
+do, don't blame me if something goes wrong.  I advise you to type 'n'o
+and contact the author (<MAINTLOC>).
+
+EOM
+?X: Can't use $echo at this early stage
+               echo $n "Continue? [n] $c" >&4
+               read ans
+               case "$ans" in
+               y*)
+                       echo "Continuing..." >&4
+                       rm -f missing
+                       ;;
+               *)
+?X:
+?X: Use kill and not exit, so that the trap gets executed to clean up
+?X:
+                       echo "ABORTING..." >&4
+                       kill $$
+                       ;;
+               esac
+       else
+               echo "Looks good..."
+       fi
+else
+       echo "There is no MANIFEST file.  I hope your kit is complete !"
+fi
+rm -f missing x??
+
+@end
index 7c3b5da..5d4d772 100644 (file)
@@ -38,13 +38,13 @@ if test -f MANIFEST; then
        set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
 else
        echo "(Looking for .SH files under the source directory.)"
-       set x `(cd $src; find . -name "*.SH" -print)`
+       set x `(cd "$src"; find . -name "*.SH" -print)`
 fi
 shift
 case $# in
-0) set x `(cd $src; echo *.SH)`; shift;;
+0) set x `(cd "$src"; echo *.SH)`; shift;;
 esac
-if test ! -f $src/$1; then
+if test ! -f "$src/$1"; then
        shift
 fi
 ?X: script to emulate mkdir -p
@@ -71,7 +71,7 @@ for file in $*; do
                */*)
                        dir=`expr X$file : 'X\(.*\)/'`
                        file=`expr X$file : 'X.*/\(.*\)'`
-                       (cd $dir && . ./$file)
+                       (cd "$dir" && . ./$file)
                        ;;
                *)
                        . ./$file
@@ -101,19 +101,19 @@ for file in $*; do
                        dir=`expr X$file : 'X\(.*\)/'`
                        file=`expr X$file : 'X.*/\(.*\)'`
                        (set x $dir; shift; eval $mkdir_p)
-                       sh <$src/$dir/$file
+                       sh <"$src/$dir/$file"
                        ;;
                *)
-                       sh <$src/$file
+                       sh <"$src/$file"
                        ;;
                esac
                ;;
        esac
 done
-if test -f $src/config_h.SH; then
+if test -f "$src/config_h.SH"; then
        if test ! -f config.h; then
        : oops, they left it out of MANIFEST, probably, so do it anyway.
-       . $src/config_h.SH
+       . "$src/config_h.SH"
        fi
 fi
 EOS
index d5325a0..b1e4a94 100644 (file)
@@ -81,7 +81,7 @@ echo " "
 exec 1>&4
 pwd=`pwd`
 . ./UU/extract
-cd $pwd
+cd "$pwd"
 
 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
        dflt=y
index fcc557a..4e221a5 100644 (file)
@@ -81,7 +81,7 @@ find_extensions='
            else
                if $test -d $xxx -a $# -lt 10; then
                    set $1$xxx/ $*;
-                   cd $xxx;
+                   cd "$xxx";
                    eval $find_extensions;
                    cd ..;
                    shift;
@@ -91,7 +91,7 @@ find_extensions='
        esac;
     done'
 tdir=`pwd`
-cd $rsrc/ext
+cd "$rsrc/ext"
 set X
 shift
 eval $find_extensions
@@ -105,7 +105,7 @@ nonxs_extensions="$*"
 set X $known_extensions
 shift
 known_extensions="$*"
-cd $tdir
+cd "$tdir"
 
 : Now see which are supported on this system.
 ?X: avail_ext lists available XS extensions.
index 47978c1..7608df4 100644 (file)
@@ -107,7 +107,7 @@ y*) usedl="$define"
        esac
     echo "The following dynamic loading files are available:"
        : Can not go over to $dldir because getfile has path hard-coded in.
-       tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir
+       tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir"
        rp="Source file to use for dynamic loading"
        fn="fne"
        gfpth="$src"