This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Backport #27632, part 2. sitearch
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Sun, 2 Apr 2006 11:20:37 +0000 (11:20 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Sun, 2 Apr 2006 11:20:37 +0000 (11:20 +0000)
p4raw-id: //depot/metaconfig@27678

U/installdirs/inc_version_list.U
U/installdirs/sitearch.U

index ae6834f..024346c 100644 (file)
@@ -1,7 +1,7 @@
 ?RCS: $Id: inc_version_list.U,v $
 ?RCS:
 ?RCS: Copyright (c) 2000 Andy Dougherty
-?RCS: 
+?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
@@ -24,7 +24,7 @@
 ?S:    default one.  See INSTALL for how this works.  The versioned
 ?S:    site_perl directory was introduced in 5.005, so that is the
 ?S:    lowest possible value.
-?S:    
+?S:
 ?S:    This list includes architecture-dependent directories back to
 ?S:    version $api_versionstring (e.g. 5.5.640) and
 ?S:    architecture-independent directories all the way back to
@@ -32,7 +32,7 @@
 ?S:.
 ?S:inc_version_list_init:
 ?S:     This variable holds the same list as inc_version_list, but
-?S:    each item is enclosed in double quotes and separated by commas, 
+?S:    each item is enclosed in double quotes and separated by commas,
 ?S:    suitable for use in the PERL_INC_VERSION_LIST initialization.
 ?S:.
 ?S:d_inc_version_list:
@@ -46,7 +46,7 @@
 ?C:    for a C initialization string.  See the inc_version_list entry
 ?C:    in Porting/Glossary for more details.
 ?C:.
-?H:#define PERL_INC_VERSION_LIST $inc_version_list_init                /**/
+?H:#$d_inc_version_list PERL_INC_VERSION_LIST $inc_version_list_init           /**/
 ?H:.
 ?T: stem d
 : Determine list of previous versions to include in @INC
@@ -61,7 +61,7 @@ EOPL
        $cat >> getverlist <<'EOPL'
 # Can't have leading @ because metaconfig interprets it as a command!
 ;@inc_version_list=();
-# XXX Redo to do opendir/readdir? 
+# XXX Redo to do opendir/readdir?
 if (-d $stem) {
     chdir($stem);
     ;@candidates = glob("5.*");
@@ -119,8 +119,8 @@ case "$dflt" in
 esac
 $cat <<EOM
 
-In order to ease the process of upgrading, this version of perl 
-can be configured to use modules built and installed with earlier 
+In order to ease the process of upgrading, this version of perl
+can be configured to use modules built and installed with earlier
 versions of perl that were installed under $prefix.  Specify here
 the list of earlier versions that this version of perl should check.
 If Configure detected no earlier versions of perl installed under
@@ -138,7 +138,7 @@ case "$ans" in
 *) inc_version_list="$ans" ;;
 esac
 case "$inc_version_list" in
-''|' ') 
+''|' ')
        inc_version_list_init='0'
        d_inc_version_list="$undef"
        ;;
index f69f8df..8de5917 100644 (file)
@@ -16,8 +16,8 @@
 ?RCS: Revision 3.0.1.1  1997/02/28  16:21:30  ram
 ?RCS: patch61: created
 ?RCS:
-?MAKE:sitearch sitearchexp installsitearch: cat sed Getfile Oldconfig \
-       Setprefixvar Prefixit archname sitelib
+?MAKE:sitearch sitearchexp installsitearch d_sitearch: cat sed Getfile \
+       Oldconfig Setprefixvar Prefixit test archname sitelib
 ?MAKE: -pick add $@ %<
 ?LINT:change prefixvar
 ?Y:TOP
 ?S:    those systems using AFS. For extra portability, only this variable
 ?S:    should be used in makefiles.
 ?S:.
+?D:d_sitearch=''
+?S:d_sitearch:
+?S:    This variable conditionally defines SITEARCH to hold the pathname
+?S:    of architecture-dependent library files for $package.  If
+?S:    $sitearch is the same as $archlib, then this is set to undef.
+?S:.
 ?C:SITEARCH:
 ?C:    This symbol contains the name of the private library for this package.
 ?C:    The library is private in the sense that it needn't be in anyone's
@@ -59,8 +65,8 @@
 ?C:    This symbol contains the ~name expanded version of SITEARCH, to be used
 ?C:    in programs that are not prepared to deal with ~ expansion at run-time.
 ?C:.
-?H:#define SITEARCH "$sitearch"                /**/
-?H:#define SITEARCH_EXP "$sitearchexp"         /**/
+?H:#$d_sitearch SITEARCH "$sitearch"           /**/
+?H:#$d_sitearch SITEARCH_EXP "$sitearchexp"            /**/
 ?H:.
 : determine where site specific architecture-dependent libraries go.
 : sitelib  default is /usr/local/lib/perl5/site_perl/$version
@@ -86,4 +92,9 @@ rp='Pathname for the site-specific architecture-dependent library files?'
 . ./getfile
 prefixvar=sitearch
 . ./setprefixvar
+if $test X"$sitearch" = X"$sitelib"; then
+       d_sitearch="$undef"
+else
+       d_sitearch="$define"
+fi