This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
git => dist
[metaconfig.git] / dist / U / package.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: package.U,v $
12 ?RCS: Revision 3.0.1.3  1994/10/29  16:27:21  ram
13 ?RCS: patch36: beware of non-ascii character sets when translating case
14 ?RCS:
15 ?RCS: Revision 3.0.1.2  1993/11/10  17:37:02  ram
16 ?RCS: patch14: skip definition of spackage if not otherwise used
17 ?RCS:
18 ?RCS: Revision 3.0.1.1  1993/09/13  16:11:10  ram
19 ?RCS: patch10: added spackage, suitable for starting sentences
20 ?RCS:
21 ?RCS: Revision 3.0  1993/08/18  12:09:28  ram
22 ?RCS: Baseline for dist 3.0 netwide release.
23 ?RCS:
24 ?MAKE:package spackage: Nothing
25 ?MAKE:  -pick wipe $@ %<
26 ?S:package:
27 ?S:     This variable contains the name of the package being constructed.
28 ?S:     It is primarily intended for the use of later Configure units.
29 ?S:.
30 ?S:spackage:
31 ?S:     This variable contains the name of the package being constructed,
32 ?S:     with the first letter uppercased, i.e. suitable for starting
33 ?S:     sentences.
34 ?S:.
35 ?C:PACKAGE:
36 ?C:     This variable contains the name of the package being built.
37 ?C:.
38 ?H:#define PACKAGE "$package"
39 ?H:.
40 ?T:first last
41 : set package name
42 package='<PACKAGENAME>'
43 @if spackage
44 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
45 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
46 ?X:
47 ?X: So early in the Configure script, we don't have ./tr set up and can't
48 ?X: include Tr in our dependency or that would create a cycle. Therefore,
49 ?X: we have to somehow duplicate the work done in Tr. That's life.
50 ?X:
51 case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
52 ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
53 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
54 esac
55 @end
56