Resolve conflicts.
This commit is contained in:
parent
2b0d64b9da
commit
ba0d106e3a
@ -1,7 +1,18 @@
|
||||
# $FreeBSD$
|
||||
use ExtUtils::MakeMaker;
|
||||
use Config;
|
||||
my @libs;
|
||||
if ($^O ne 'MSWin32') {
|
||||
if ($Config{archname} =~ /RM\d\d\d-svr4/) {
|
||||
@libs = ('LIBS' => ["-lm -lc -lposix -lcposix"]);
|
||||
}
|
||||
else {
|
||||
@libs = ('LIBS' => ["-lm -lposix -lcposix"]);
|
||||
}
|
||||
}
|
||||
WriteMakefile(
|
||||
NAME => 'POSIX',
|
||||
($^O eq 'MSWin32' ? () : (LIBS => ["-lm -lposix -lcposix"])),
|
||||
@libs,
|
||||
MAN3PODS => {}, # Pods will be built by installman.
|
||||
XSPROTOARG => '-noprototypes', # XXX remove later?
|
||||
VERSION_FROM => 'POSIX.pm',
|
||||
|
@ -2,11 +2,14 @@
|
||||
#ifdef WIN32
|
||||
#define _POSIX_
|
||||
#endif
|
||||
|
||||
#define PERL_NO_GET_CONTEXT
|
||||
|
||||
#include "EXTERN.h"
|
||||
#define PERLIO_NOT_STDIO 1
|
||||
#include "perl.h"
|
||||
#include "XSUB.h"
|
||||
#ifdef PERL_OBJECT /* XXX _very_ temporary hacks */
|
||||
#if defined(PERL_OBJECT) || defined(PERL_CAPI) || defined(PERL_IMPLICIT_SYS)
|
||||
# undef signal
|
||||
# undef open
|
||||
# undef setmode
|
||||
@ -79,6 +82,7 @@
|
||||
/* The non-POSIX CRTL times() has void return type, so we just get the
|
||||
current time directly */
|
||||
clock_t vms_times(struct tms *PL_bufptr) {
|
||||
dTHX;
|
||||
clock_t retval;
|
||||
/* Get wall time and convert to 10 ms intervals to
|
||||
* produce the return value that the POSIX standard expects */
|
||||
@ -103,6 +107,9 @@
|
||||
}
|
||||
# define times(t) vms_times(t)
|
||||
#else
|
||||
#if defined (__CYGWIN__)
|
||||
# define tzname _tzname
|
||||
#endif
|
||||
#if defined (WIN32)
|
||||
# undef mkfifo
|
||||
# define mkfifo(a,b) not_here("mkfifo")
|
||||
@ -136,8 +143,12 @@
|
||||
#else
|
||||
|
||||
# ifndef HAS_MKFIFO
|
||||
# ifndef mkfifo
|
||||
# define mkfifo(path, mode) (mknod((path), (mode) | S_IFIFO, 0))
|
||||
# ifdef OS2
|
||||
# define mkfifo(a,b) not_here("mkfifo")
|
||||
# else /* !( defined OS2 ) */
|
||||
# ifndef mkfifo
|
||||
# define mkfifo(path, mode) (mknod((path), (mode) | S_IFIFO, 0))
|
||||
# endif
|
||||
# endif
|
||||
# endif /* !HAS_MKFIFO */
|
||||
|
||||
@ -178,10 +189,10 @@ typedef struct termios* POSIX__Termios;
|
||||
#endif
|
||||
|
||||
/* Possibly needed prototypes */
|
||||
char *cuserid _((char *));
|
||||
double strtod _((const char *, char **));
|
||||
long strtol _((const char *, char **, int));
|
||||
unsigned long strtoul _((const char *, char **, int));
|
||||
char *cuserid (char *);
|
||||
double strtod (const char *, char **);
|
||||
long strtol (const char *, char **, int);
|
||||
unsigned long strtoul (const char *, char **, int);
|
||||
|
||||
#ifndef HAS_CUSERID
|
||||
#define cuserid(a) (char *) not_here("cuserid")
|
||||
@ -279,7 +290,7 @@ unsigned long strtoul _((const char *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifdef HAS_TZNAME
|
||||
# ifndef WIN32
|
||||
# if !defined(WIN32) && !defined(__CYGWIN__)
|
||||
extern char *tzname[];
|
||||
# endif
|
||||
#else
|
||||
@ -304,14 +315,13 @@ char *tzname[] = { "" , "" };
|
||||
*/
|
||||
#ifdef HAS_GNULIBC
|
||||
# ifndef STRUCT_TM_HASZONE
|
||||
# define STRUCT_TM_HAS_ZONE
|
||||
# define STRUCT_TM_HASZONE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef STRUCT_TM_HASZONE
|
||||
static void
|
||||
init_tm(ptm) /* see mktime, strftime and asctime */
|
||||
struct tm *ptm;
|
||||
init_tm(struct tm *ptm) /* see mktime, strftime and asctime */
|
||||
{
|
||||
Time_t now;
|
||||
(void)time(&now);
|
||||
@ -322,6 +332,202 @@ init_tm(ptm) /* see mktime, strftime and asctime */
|
||||
# define init_tm(ptm)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* mini_mktime - normalise struct tm values without the localtime()
|
||||
* semantics (and overhead) of mktime().
|
||||
*/
|
||||
static void
|
||||
mini_mktime(struct tm *ptm)
|
||||
{
|
||||
int yearday;
|
||||
int secs;
|
||||
int month, mday, year, jday;
|
||||
int odd_cent, odd_year;
|
||||
|
||||
#define DAYS_PER_YEAR 365
|
||||
#define DAYS_PER_QYEAR (4*DAYS_PER_YEAR+1)
|
||||
#define DAYS_PER_CENT (25*DAYS_PER_QYEAR-1)
|
||||
#define DAYS_PER_QCENT (4*DAYS_PER_CENT+1)
|
||||
#define SECS_PER_HOUR (60*60)
|
||||
#define SECS_PER_DAY (24*SECS_PER_HOUR)
|
||||
/* parentheses deliberately absent on these two, otherwise they don't work */
|
||||
#define MONTH_TO_DAYS 153/5
|
||||
#define DAYS_TO_MONTH 5/153
|
||||
/* offset to bias by March (month 4) 1st between month/mday & year finding */
|
||||
#define YEAR_ADJUST (4*MONTH_TO_DAYS+1)
|
||||
/* as used here, the algorithm leaves Sunday as day 1 unless we adjust it */
|
||||
#define WEEKDAY_BIAS 6 /* (1+6)%7 makes Sunday 0 again */
|
||||
|
||||
/*
|
||||
* Year/day algorithm notes:
|
||||
*
|
||||
* With a suitable offset for numeric value of the month, one can find
|
||||
* an offset into the year by considering months to have 30.6 (153/5) days,
|
||||
* using integer arithmetic (i.e., with truncation). To avoid too much
|
||||
* messing about with leap days, we consider January and February to be
|
||||
* the 13th and 14th month of the previous year. After that transformation,
|
||||
* we need the month index we use to be high by 1 from 'normal human' usage,
|
||||
* so the month index values we use run from 4 through 15.
|
||||
*
|
||||
* Given that, and the rules for the Gregorian calendar (leap years are those
|
||||
* divisible by 4 unless also divisible by 100, when they must be divisible
|
||||
* by 400 instead), we can simply calculate the number of days since some
|
||||
* arbitrary 'beginning of time' by futzing with the (adjusted) year number,
|
||||
* the days we derive from our month index, and adding in the day of the
|
||||
* month. The value used here is not adjusted for the actual origin which
|
||||
* it normally would use (1 January A.D. 1), since we're not exposing it.
|
||||
* We're only building the value so we can turn around and get the
|
||||
* normalised values for the year, month, day-of-month, and day-of-year.
|
||||
*
|
||||
* For going backward, we need to bias the value we're using so that we find
|
||||
* the right year value. (Basically, we don't want the contribution of
|
||||
* March 1st to the number to apply while deriving the year). Having done
|
||||
* that, we 'count up' the contribution to the year number by accounting for
|
||||
* full quadracenturies (400-year periods) with their extra leap days, plus
|
||||
* the contribution from full centuries (to avoid counting in the lost leap
|
||||
* days), plus the contribution from full quad-years (to count in the normal
|
||||
* leap days), plus the leftover contribution from any non-leap years.
|
||||
* At this point, if we were working with an actual leap day, we'll have 0
|
||||
* days left over. This is also true for March 1st, however. So, we have
|
||||
* to special-case that result, and (earlier) keep track of the 'odd'
|
||||
* century and year contributions. If we got 4 extra centuries in a qcent,
|
||||
* or 4 extra years in a qyear, then it's a leap day and we call it 29 Feb.
|
||||
* Otherwise, we add back in the earlier bias we removed (the 123 from
|
||||
* figuring in March 1st), find the month index (integer division by 30.6),
|
||||
* and the remainder is the day-of-month. We then have to convert back to
|
||||
* 'real' months (including fixing January and February from being 14/15 in
|
||||
* the previous year to being in the proper year). After that, to get
|
||||
* tm_yday, we work with the normalised year and get a new yearday value for
|
||||
* January 1st, which we subtract from the yearday value we had earlier,
|
||||
* representing the date we've re-built. This is done from January 1
|
||||
* because tm_yday is 0-origin.
|
||||
*
|
||||
* Since POSIX time routines are only guaranteed to work for times since the
|
||||
* UNIX epoch (00:00:00 1 Jan 1970 UTC), the fact that this algorithm
|
||||
* applies Gregorian calendar rules even to dates before the 16th century
|
||||
* doesn't bother me. Besides, you'd need cultural context for a given
|
||||
* date to know whether it was Julian or Gregorian calendar, and that's
|
||||
* outside the scope for this routine. Since we convert back based on the
|
||||
* same rules we used to build the yearday, you'll only get strange results
|
||||
* for input which needed normalising, or for the 'odd' century years which
|
||||
* were leap years in the Julian calander but not in the Gregorian one.
|
||||
* I can live with that.
|
||||
*
|
||||
* This algorithm also fails to handle years before A.D. 1 gracefully, but
|
||||
* that's still outside the scope for POSIX time manipulation, so I don't
|
||||
* care.
|
||||
*/
|
||||
|
||||
year = 1900 + ptm->tm_year;
|
||||
month = ptm->tm_mon;
|
||||
mday = ptm->tm_mday;
|
||||
/* allow given yday with no month & mday to dominate the result */
|
||||
if (ptm->tm_yday >= 0 && mday <= 0 && month <= 0) {
|
||||
month = 0;
|
||||
mday = 0;
|
||||
jday = 1 + ptm->tm_yday;
|
||||
}
|
||||
else {
|
||||
jday = 0;
|
||||
}
|
||||
if (month >= 2)
|
||||
month+=2;
|
||||
else
|
||||
month+=14, year--;
|
||||
yearday = DAYS_PER_YEAR * year + year/4 - year/100 + year/400;
|
||||
yearday += month*MONTH_TO_DAYS + mday + jday;
|
||||
/*
|
||||
* Note that we don't know when leap-seconds were or will be,
|
||||
* so we have to trust the user if we get something which looks
|
||||
* like a sensible leap-second. Wild values for seconds will
|
||||
* be rationalised, however.
|
||||
*/
|
||||
if ((unsigned) ptm->tm_sec <= 60) {
|
||||
secs = 0;
|
||||
}
|
||||
else {
|
||||
secs = ptm->tm_sec;
|
||||
ptm->tm_sec = 0;
|
||||
}
|
||||
secs += 60 * ptm->tm_min;
|
||||
secs += SECS_PER_HOUR * ptm->tm_hour;
|
||||
if (secs < 0) {
|
||||
if (secs-(secs/SECS_PER_DAY*SECS_PER_DAY) < 0) {
|
||||
/* got negative remainder, but need positive time */
|
||||
/* back off an extra day to compensate */
|
||||
yearday += (secs/SECS_PER_DAY)-1;
|
||||
secs -= SECS_PER_DAY * (secs/SECS_PER_DAY - 1);
|
||||
}
|
||||
else {
|
||||
yearday += (secs/SECS_PER_DAY);
|
||||
secs -= SECS_PER_DAY * (secs/SECS_PER_DAY);
|
||||
}
|
||||
}
|
||||
else if (secs >= SECS_PER_DAY) {
|
||||
yearday += (secs/SECS_PER_DAY);
|
||||
secs %= SECS_PER_DAY;
|
||||
}
|
||||
ptm->tm_hour = secs/SECS_PER_HOUR;
|
||||
secs %= SECS_PER_HOUR;
|
||||
ptm->tm_min = secs/60;
|
||||
secs %= 60;
|
||||
ptm->tm_sec += secs;
|
||||
/* done with time of day effects */
|
||||
/*
|
||||
* The algorithm for yearday has (so far) left it high by 428.
|
||||
* To avoid mistaking a legitimate Feb 29 as Mar 1, we need to
|
||||
* bias it by 123 while trying to figure out what year it
|
||||
* really represents. Even with this tweak, the reverse
|
||||
* translation fails for years before A.D. 0001.
|
||||
* It would still fail for Feb 29, but we catch that one below.
|
||||
*/
|
||||
jday = yearday; /* save for later fixup vis-a-vis Jan 1 */
|
||||
yearday -= YEAR_ADJUST;
|
||||
year = (yearday / DAYS_PER_QCENT) * 400;
|
||||
yearday %= DAYS_PER_QCENT;
|
||||
odd_cent = yearday / DAYS_PER_CENT;
|
||||
year += odd_cent * 100;
|
||||
yearday %= DAYS_PER_CENT;
|
||||
year += (yearday / DAYS_PER_QYEAR) * 4;
|
||||
yearday %= DAYS_PER_QYEAR;
|
||||
odd_year = yearday / DAYS_PER_YEAR;
|
||||
year += odd_year;
|
||||
yearday %= DAYS_PER_YEAR;
|
||||
if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
|
||||
month = 1;
|
||||
yearday = 29;
|
||||
}
|
||||
else {
|
||||
yearday += YEAR_ADJUST; /* recover March 1st crock */
|
||||
month = yearday*DAYS_TO_MONTH;
|
||||
yearday -= month*MONTH_TO_DAYS;
|
||||
/* recover other leap-year adjustment */
|
||||
if (month > 13) {
|
||||
month-=14;
|
||||
year++;
|
||||
}
|
||||
else {
|
||||
month-=2;
|
||||
}
|
||||
}
|
||||
ptm->tm_year = year - 1900;
|
||||
if (yearday) {
|
||||
ptm->tm_mday = yearday;
|
||||
ptm->tm_mon = month;
|
||||
}
|
||||
else {
|
||||
ptm->tm_mday = 31;
|
||||
ptm->tm_mon = month - 1;
|
||||
}
|
||||
/* re-build yearday based on Jan 1 to get tm_yday */
|
||||
year--;
|
||||
yearday = year*DAYS_PER_YEAR + year/4 - year/100 + year/400;
|
||||
yearday += 14*MONTH_TO_DAYS + 1;
|
||||
ptm->tm_yday = jday - yearday;
|
||||
/* fix tm_wday if not overridden by caller */
|
||||
if ((unsigned)ptm->tm_wday > 6)
|
||||
ptm->tm_wday = (jday + WEEKDAY_BIAS) % 7;
|
||||
}
|
||||
|
||||
#ifdef HAS_LONG_DOUBLE
|
||||
# if LONG_DOUBLESIZE > DOUBLESIZE
|
||||
@ -349,7 +555,7 @@ not_here(char *s)
|
||||
}
|
||||
|
||||
static
|
||||
#ifdef HAS_LONG_DOUBLE
|
||||
#if defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE)
|
||||
long double
|
||||
#else
|
||||
double
|
||||
@ -1520,9 +1726,10 @@ constant(char *name, int arg)
|
||||
#else
|
||||
goto not_there;
|
||||
#endif
|
||||
if (strEQ(name, "L_tmpname"))
|
||||
#ifdef L_tmpname
|
||||
return L_tmpname;
|
||||
/* L_tmpnam[e] was a typo--retained for compatibility */
|
||||
if (strEQ(name, "L_tmpname") || strEQ(name, "L_tmpnam"))
|
||||
#ifdef L_tmpnam
|
||||
return L_tmpnam;
|
||||
#else
|
||||
goto not_there;
|
||||
#endif
|
||||
@ -3046,7 +3253,7 @@ setlocale(category, locale = 0)
|
||||
else
|
||||
#endif
|
||||
newctype = RETVAL;
|
||||
perl_new_ctype(newctype);
|
||||
new_ctype(newctype);
|
||||
}
|
||||
#endif /* USE_LOCALE_CTYPE */
|
||||
#ifdef USE_LOCALE_COLLATE
|
||||
@ -3063,7 +3270,7 @@ setlocale(category, locale = 0)
|
||||
else
|
||||
#endif
|
||||
newcoll = RETVAL;
|
||||
perl_new_collate(newcoll);
|
||||
new_collate(newcoll);
|
||||
}
|
||||
#endif /* USE_LOCALE_COLLATE */
|
||||
#ifdef USE_LOCALE_NUMERIC
|
||||
@ -3080,7 +3287,7 @@ setlocale(category, locale = 0)
|
||||
else
|
||||
#endif
|
||||
newnum = RETVAL;
|
||||
perl_new_numeric(newnum);
|
||||
new_numeric(newnum);
|
||||
}
|
||||
#endif /* USE_LOCALE_NUMERIC */
|
||||
}
|
||||
@ -3168,17 +3375,15 @@ sigaction(sig, action, oldaction = 0)
|
||||
# This code is really grody because we're trying to make the signal
|
||||
# interface look beautiful, which is hard.
|
||||
|
||||
if (!PL_siggv)
|
||||
gv_fetchpv("SIG", TRUE, SVt_PVHV);
|
||||
|
||||
{
|
||||
GV *siggv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
|
||||
struct sigaction act;
|
||||
struct sigaction oact;
|
||||
POSIX__SigSet sigset;
|
||||
SV** svp;
|
||||
SV** sigsvp = hv_fetch(GvHVn(PL_siggv),
|
||||
sig_name[sig],
|
||||
strlen(sig_name[sig]),
|
||||
SV** sigsvp = hv_fetch(GvHVn(siggv),
|
||||
PL_sig_name[sig],
|
||||
strlen(PL_sig_name[sig]),
|
||||
TRUE);
|
||||
STRLEN n_a;
|
||||
|
||||
@ -3197,7 +3402,7 @@ sigaction(sig, action, oldaction = 0)
|
||||
croak("Can't supply an action without a HANDLER");
|
||||
sv_setpv(*sigsvp, SvPV(*svp, n_a));
|
||||
mg_set(*sigsvp); /* handles DEFAULT and IGNORE */
|
||||
act.sa_handler = sighandler;
|
||||
act.sa_handler = PL_sighandlerp;
|
||||
|
||||
/* Set up any desired mask. */
|
||||
svp = hv_fetch(action, "MASK", 4, FALSE);
|
||||
@ -3263,7 +3468,7 @@ INIT:
|
||||
}
|
||||
else if (sv_derived_from(ST(2), "POSIX::SigSet")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(2)));
|
||||
oldsigset = (POSIX__SigSet) tmp;
|
||||
oldsigset = INT2PTR(POSIX__SigSet,tmp);
|
||||
}
|
||||
else {
|
||||
New(0, oldsigset, 1, sigset_t);
|
||||
@ -3368,9 +3573,18 @@ write(fd, buffer, nbytes)
|
||||
char * buffer
|
||||
size_t nbytes
|
||||
|
||||
char *
|
||||
tmpnam(s = 0)
|
||||
char * s = 0;
|
||||
SV *
|
||||
tmpnam()
|
||||
PREINIT:
|
||||
STRLEN i;
|
||||
int len;
|
||||
CODE:
|
||||
RETVAL = newSVpvn("", 0);
|
||||
SvGROW(RETVAL, L_tmpnam);
|
||||
len = strlen(tmpnam(SvPV(RETVAL, i)));
|
||||
SvCUR_set(RETVAL, len);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
abort()
|
||||
@ -3435,10 +3649,12 @@ strtol(str, base = 0)
|
||||
char *unparsed;
|
||||
PPCODE:
|
||||
num = strtol(str, &unparsed, base);
|
||||
if (num >= IV_MIN && num <= IV_MAX)
|
||||
PUSHs(sv_2mortal(newSViv((IV)num)));
|
||||
else
|
||||
#if IVSIZE <= LONGSIZE
|
||||
if (num < IV_MIN || num > IV_MAX)
|
||||
PUSHs(sv_2mortal(newSVnv((double)num)));
|
||||
else
|
||||
#endif
|
||||
PUSHs(sv_2mortal(newSViv((IV)num)));
|
||||
if (GIMME == G_ARRAY) {
|
||||
EXTEND(SP, 1);
|
||||
if (unparsed)
|
||||
@ -3645,7 +3861,7 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
|
||||
mytm.tm_isdst = sisdst;
|
||||
mytm.tm_zone = szone;
|
||||
#else
|
||||
(void) mktime(&mytm);
|
||||
mini_mktime(&mytm);
|
||||
#endif
|
||||
len = strftime(tmpbuf, sizeof tmpbuf, fmt, &mytm);
|
||||
/*
|
||||
@ -3662,28 +3878,35 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
|
||||
** If there is a better way to make it portable, go ahead by
|
||||
** all means.
|
||||
*/
|
||||
if ( ( len > 0 && len < sizeof(tmpbuf) )
|
||||
|| ( len == 0 && strlen(fmt) == 0 ) ) {
|
||||
if ((len > 0 && len < sizeof(tmpbuf)) || (len == 0 && *fmt == '\0'))
|
||||
ST(0) = sv_2mortal(newSVpv(tmpbuf, len));
|
||||
} else {
|
||||
else {
|
||||
/* Possibly buf overflowed - try again with a bigger buf */
|
||||
int bufsize = strlen(fmt) + sizeof(tmpbuf);
|
||||
int fmtlen = strlen(fmt);
|
||||
int bufsize = fmtlen + sizeof(tmpbuf);
|
||||
char* buf;
|
||||
int buflen;
|
||||
|
||||
New(0, buf, bufsize, char);
|
||||
while( buf ) {
|
||||
while (buf) {
|
||||
buflen = strftime(buf, bufsize, fmt, &mytm);
|
||||
if ( buflen > 0 && buflen < bufsize ) break;
|
||||
if (buflen > 0 && buflen < bufsize)
|
||||
break;
|
||||
/* heuristic to prevent out-of-memory errors */
|
||||
if (bufsize > 100*fmtlen) {
|
||||
Safefree(buf);
|
||||
buf = NULL;
|
||||
break;
|
||||
}
|
||||
bufsize *= 2;
|
||||
Renew(buf, bufsize, char);
|
||||
}
|
||||
if ( buf ) {
|
||||
ST(0) = sv_2mortal(newSVpv(buf, buflen));
|
||||
if (buf) {
|
||||
ST(0) = sv_2mortal(newSVpvn(buf, buflen));
|
||||
Safefree(buf);
|
||||
} else {
|
||||
ST(0) = sv_2mortal(newSVpv(tmpbuf, len));
|
||||
}
|
||||
else
|
||||
ST(0) = sv_2mortal(newSVpvn(tmpbuf, len));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3694,8 +3917,8 @@ void
|
||||
tzname()
|
||||
PPCODE:
|
||||
EXTEND(SP,2);
|
||||
PUSHs(sv_2mortal(newSVpv(tzname[0],strlen(tzname[0]))));
|
||||
PUSHs(sv_2mortal(newSVpv(tzname[1],strlen(tzname[1]))));
|
||||
PUSHs(sv_2mortal(newSVpvn(tzname[0],strlen(tzname[0]))));
|
||||
PUSHs(sv_2mortal(newSVpvn(tzname[1],strlen(tzname[1]))));
|
||||
|
||||
SysRet
|
||||
access(filename, mode)
|
||||
|
@ -1,3 +1,4 @@
|
||||
# $FreeBSD$
|
||||
# Original based on info from
|
||||
# Carl M. Fongheiser <cmf@ins.infonet.net>
|
||||
# Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT)
|
||||
@ -99,23 +100,11 @@ esac
|
||||
case "$osvers" in
|
||||
0.*|1.0*) ;;
|
||||
|
||||
# allow a 2.2.* a.out --> 3.0 ELF to work.
|
||||
2.2*) objformat=`objformat`
|
||||
if [ x$objformat = xelf ]; then
|
||||
libpth="/usr/lib /usr/local/lib"
|
||||
glibpth="/usr/lib /usr/local/lib"
|
||||
ldflags="-Wl,-E "
|
||||
lddlflags="-shared "
|
||||
else
|
||||
if [ -e /usr/lib/aout ]; then
|
||||
libpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
||||
glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
||||
fi
|
||||
lddlflags='-Bshareable'
|
||||
fi
|
||||
cccdlflags='-DPIC -fpic'
|
||||
1*|2*) cccdlflags='-DPIC -fpic'
|
||||
lddlflags="-Bshareable $lddlflags"
|
||||
;;
|
||||
3.*|4.0*)
|
||||
|
||||
*)
|
||||
objformat=`/usr/bin/objformat`
|
||||
if [ x$objformat = xelf ]; then
|
||||
libpth="/usr/lib /usr/local/lib"
|
||||
@ -124,17 +113,23 @@ case "$osvers" in
|
||||
lddlflags="-shared "
|
||||
else
|
||||
if [ -e /usr/lib/aout ]; then
|
||||
libpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
||||
glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
||||
fi
|
||||
lddlflags='-Bshareable'
|
||||
libpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
||||
glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
||||
fi
|
||||
lddlflags='-Bshareable'
|
||||
fi
|
||||
cccdlflags='-DPIC -fpic'
|
||||
;;
|
||||
esac
|
||||
|
||||
*) cccdlflags='-DPIC -fpic'
|
||||
lddlflags="-Bshareable $lddlflags"
|
||||
;;
|
||||
case "$osvers" in
|
||||
0*|1*|2*|3*) ;;
|
||||
|
||||
*)
|
||||
if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
|
||||
usenm=false
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
cat <<'EOM' >&4
|
||||
@ -163,8 +158,8 @@ case "$osvers" in
|
||||
# the equivalent in the main Configure so we copy a little
|
||||
# from Configure XXX Configure should be fixed.
|
||||
if $test -r $src/patchlevel.h;then
|
||||
patchlevel=`awk '/define[ ]+PATCHLEVEL/ {print $3}' $src/patchlevel.h`
|
||||
subversion=`awk '/define[ ]+SUBVERSION/ {print $3}' $src/patchlevel.h`
|
||||
patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h`
|
||||
subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h`
|
||||
else
|
||||
patchlevel=0
|
||||
subversion=0
|
||||
@ -180,22 +175,17 @@ esac
|
||||
cat > UU/usethreads.cbu <<'EOCBU'
|
||||
case "$usethreads" in
|
||||
$define|true|[yY]*)
|
||||
lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'`
|
||||
lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|tail -1`
|
||||
case "$osvers" in
|
||||
2.2.8*|3.*|4.*)
|
||||
if [ ! -r "$lc_r" ]; then
|
||||
cat <<EOM >&4
|
||||
POSIX threads should be supported by FreeBSD $osvers --
|
||||
but your system is missing the shared libc_r.
|
||||
(/sbin/ldconfig -r doesn't find any).
|
||||
0*|1*|2.0*|2.1*) cat <<EOM >&4
|
||||
I did not know that FreeBSD $osvers supports POSIX threads.
|
||||
|
||||
Consider using the latest STABLE release.
|
||||
Feel free to tell perlbug@perl.com otherwise.
|
||||
EOM
|
||||
exit 1
|
||||
fi
|
||||
ldflags="-pthread $ldflags"
|
||||
exit 1
|
||||
;;
|
||||
2.2*)
|
||||
|
||||
2.2.[0-7]*)
|
||||
cat <<EOM >&4
|
||||
POSIX threads are not supported well by FreeBSD $osvers.
|
||||
|
||||
@ -208,13 +198,21 @@ or preferably to 3.something.
|
||||
EOM
|
||||
exit 1
|
||||
;;
|
||||
*) cat <<EOM >&4
|
||||
I did not know that FreeBSD $osvers supports POSIX threads.
|
||||
|
||||
Feel free to tell perlbug@perl.com otherwise.
|
||||
*)
|
||||
if [ ! -r "$lc_r" ]; then
|
||||
cat <<EOM >&4
|
||||
POSIX threads should be supported by FreeBSD $osvers --
|
||||
but your system is missing the shared libc_r.
|
||||
(/sbin/ldconfig -r doesn't find any).
|
||||
|
||||
Consider using the latest STABLE release.
|
||||
EOM
|
||||
exit 1
|
||||
exit 1
|
||||
fi
|
||||
ldflags="-pthread $ldflags"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
set `echo X "$libswanted "| sed -e 's/ c / c_r /'`
|
||||
|
@ -1,3 +1,4 @@
|
||||
# $FreeBSD$
|
||||
package Cwd;
|
||||
require 5.000;
|
||||
|
||||
@ -20,7 +21,7 @@ getcwd - get pathname of current working directory
|
||||
chdir "/tmp";
|
||||
print $ENV{'PWD'};
|
||||
|
||||
use Cwd 'abs_path';
|
||||
use Cwd 'abs_path'; # aka realpath()
|
||||
print abs_path($ENV{'PWD'});
|
||||
|
||||
use Cwd 'fast_abs_path';
|
||||
@ -32,8 +33,11 @@ The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
|
||||
in Perl.
|
||||
|
||||
The abs_path() function takes a single argument and returns the
|
||||
absolute pathname for that argument. It uses the same algorithm as
|
||||
getcwd(). (actually getcwd() is abs_path("."))
|
||||
absolute pathname for that argument. It uses the same algorithm
|
||||
as getcwd(). (Actually, getcwd() is abs_path(".")) Symbolic links
|
||||
and relative-path components ("." and "..") are resolved to return
|
||||
the canonical pathname, just like realpath(3). Also callable as
|
||||
realpath().
|
||||
|
||||
The fastcwd() function looks the same as getcwd(), but runs faster.
|
||||
It's also more dangerous because it might conceivably chdir() you out
|
||||
@ -67,12 +71,12 @@ kept up to date if all packages which use chdir import it from Cwd.
|
||||
|
||||
use Carp;
|
||||
|
||||
$VERSION = '2.01';
|
||||
$VERSION = '2.02';
|
||||
|
||||
require Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
|
||||
@EXPORT_OK = qw(chdir abs_path fast_abs_path);
|
||||
@EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
|
||||
|
||||
|
||||
# The 'natural and safe form' for UNIX (pwd may be setuid root)
|
||||
@ -105,9 +109,6 @@ sub getcwd
|
||||
# This is a faster version of getcwd. It's also more dangerous because
|
||||
# you might chdir out of a directory that you can't chdir back into.
|
||||
|
||||
# List of metachars taken from do_exec() in doio.c
|
||||
my $quoted_shell_meta = quotemeta('$&*(){}[]";\\|?<>~`'."'\n");
|
||||
|
||||
sub fastcwd {
|
||||
my($odev, $oino, $cdev, $cino, $tdev, $tino);
|
||||
my(@path, $path);
|
||||
@ -136,9 +137,10 @@ sub fastcwd {
|
||||
unshift(@path, $direntry);
|
||||
}
|
||||
$path = '/' . join('/', @path);
|
||||
if ($^O eq 'apollo') { $path = "/".$path; }
|
||||
# At this point $path may be tainted (if tainting) and chdir would fail.
|
||||
# To be more useful we untaint it then check that we landed where we started.
|
||||
$path = $1 if $path =~ /^(.*)$/; # untaint
|
||||
$path = $1 if $path =~ /^(.*)\z/s; # untaint
|
||||
CORE::chdir($path) || return undef;
|
||||
($cdev, $cino) = stat('.');
|
||||
die "Unstable directory path, current directory changed unexpectedly"
|
||||
@ -166,7 +168,7 @@ sub chdir_init {
|
||||
$ENV{'PWD'} = cwd();
|
||||
}
|
||||
# Strip an automounter prefix (where /tmp_mnt/foo/bar == /foo/bar)
|
||||
if ($ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|) {
|
||||
if ($ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
|
||||
my($pd,$pi) = stat($2);
|
||||
my($dd,$di) = stat($1);
|
||||
if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
|
||||
@ -183,7 +185,7 @@ sub chdir {
|
||||
return 0 unless CORE::chdir $newdir;
|
||||
if ($^O eq 'VMS') { return $ENV{'PWD'} = $ENV{'DEFAULT'} }
|
||||
|
||||
if ($newdir =~ m#^/#) {
|
||||
if ($newdir =~ m#^/#s) {
|
||||
$ENV{'PWD'} = $newdir;
|
||||
} else {
|
||||
my @curdir = split(m#/#,$ENV{'PWD'});
|
||||
@ -256,6 +258,10 @@ sub abs_path
|
||||
$cwd;
|
||||
}
|
||||
|
||||
# added function alias for those of us more
|
||||
# used to the libc function. --tchrist 27-Jan-00
|
||||
*realpath = \&abs_path;
|
||||
|
||||
sub fast_abs_path {
|
||||
my $cwd = getcwd();
|
||||
my $path = shift || '.';
|
||||
@ -265,6 +271,10 @@ sub fast_abs_path {
|
||||
$realpath;
|
||||
}
|
||||
|
||||
# added function alias to follow principle of least surprise
|
||||
# based on previous aliasing. --tchrist 27-Jan-00
|
||||
*fast_realpath = \&fast_abs_path;
|
||||
|
||||
|
||||
# --- PORTING SECTION ---
|
||||
|
||||
@ -330,7 +340,7 @@ sub _qnx_abs_path {
|
||||
}
|
||||
|
||||
{
|
||||
local $^W = 0; # assignments trigger 'subroutine redefined' warning
|
||||
no warnings; # assignments trigger 'subroutine redefined' warning
|
||||
|
||||
if ($^O eq 'VMS') {
|
||||
*cwd = \&_vms_cwd;
|
||||
@ -371,6 +381,12 @@ sub _qnx_abs_path {
|
||||
*abs_path = \&_qnx_abs_path;
|
||||
*fast_abs_path = \&_qnx_abs_path;
|
||||
}
|
||||
elsif ($^O eq 'cygwin') {
|
||||
*getcwd = \&cwd;
|
||||
*fastgetcwd = \&cwd;
|
||||
*fastcwd = \&cwd;
|
||||
*abs_path = \&fast_abs_path;
|
||||
}
|
||||
}
|
||||
|
||||
# package main; eval join('',<DATA>) || die $@; # quick test
|
||||
|
@ -1,5 +1,8 @@
|
||||
# $FreeBSD$
|
||||
package ExtUtils::Install;
|
||||
|
||||
use 5.005_64;
|
||||
our(@ISA, @EXPORT, $VERSION);
|
||||
$VERSION = substr q$Revision: 1.28 $, 10;
|
||||
# $Date: 1998/01/25 07:08:24 $
|
||||
# $FreeBSD$
|
||||
@ -7,7 +10,6 @@ $VERSION = substr q$Revision: 1.28 $, 10;
|
||||
use Exporter;
|
||||
use Carp ();
|
||||
use Config qw(%Config);
|
||||
use vars qw(@ISA @EXPORT $VERSION);
|
||||
@ISA = ('Exporter');
|
||||
@EXPORT = ('install','uninstall','pm_to_blib', 'install_default');
|
||||
$Is_VMS = $^O eq 'VMS';
|
||||
@ -16,7 +18,7 @@ my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' : ':';
|
||||
my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || '';
|
||||
my $Inc_uninstall_warn_handler;
|
||||
|
||||
#use vars qw( @EXPORT @ISA $Is_VMS );
|
||||
#our(@EXPORT, @ISA, $Is_VMS);
|
||||
#use strict;
|
||||
|
||||
sub forceunlink {
|
||||
@ -68,7 +70,6 @@ sub install {
|
||||
}
|
||||
$packlist->read($pack{"read"}) if (-f $pack{"read"});
|
||||
my $cwd = cwd();
|
||||
my $umask = umask 0 unless $Is_VMS;
|
||||
|
||||
my($source);
|
||||
MOD_INSTALL: foreach $source (sort keys %hash) {
|
||||
@ -89,9 +90,7 @@ sub install {
|
||||
exists $hash{"blib/arch"} and
|
||||
directory_not_empty("blib/arch")) {
|
||||
$targetroot = $hash{"blib/arch"};
|
||||
print "Files found in blib/arch --> Installing files in "
|
||||
. "blib/lib into architecture dependend library tree!\n"
|
||||
; #if $verbose>1;
|
||||
print "Files found in blib/arch: installing files in blib/lib into architecture dependent library tree\n";
|
||||
}
|
||||
chdir($source) or next;
|
||||
find(sub {
|
||||
@ -142,7 +141,6 @@ sub install {
|
||||
}, ".");
|
||||
chdir($cwd) or Carp::croak("Couldn't chdir to $cwd: $!");
|
||||
}
|
||||
umask $umask unless $Is_VMS;
|
||||
if ($pack{'write'}) {
|
||||
$dir = dirname($pack{'write'});
|
||||
mkpath($dir,0,0755);
|
||||
@ -201,7 +199,6 @@ sub uninstall {
|
||||
forceunlink($_) unless $nonono;
|
||||
}
|
||||
print "unlink $fil\n" if $verbose;
|
||||
close P;
|
||||
forceunlink($fil) unless $nonono;
|
||||
}
|
||||
|
||||
@ -234,7 +231,7 @@ sub inc_uninstall {
|
||||
if ($nonono) {
|
||||
if ($verbose) {
|
||||
$Inc_uninstall_warn_handler ||= new ExtUtils::Install::Warn;
|
||||
$libdir =~ s|^\./|| ; # That's just cosmetics, no need to port. It looks prettier.
|
||||
$libdir =~ s|^\./||s ; # That's just cosmetics, no need to port. It looks prettier.
|
||||
$Inc_uninstall_warn_handler->add("$libdir/$file",$targetfile);
|
||||
}
|
||||
# if not verbose, we just say nothing
|
||||
@ -267,7 +264,6 @@ sub pm_to_blib {
|
||||
close(FROMTO);
|
||||
}
|
||||
|
||||
my $umask = umask 0022 unless $Is_VMS;
|
||||
mkpath($autodir,0,0755);
|
||||
foreach (keys %$fromto) {
|
||||
next if -f $fromto->{$_} && -M $fromto->{$_} < -M $_;
|
||||
@ -285,10 +281,9 @@ sub pm_to_blib {
|
||||
utime($atime,$mtime+$Is_VMS,$fromto->{$_});
|
||||
chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$fromto->{$_});
|
||||
print "cp $_ $fromto->{$_}\n";
|
||||
next unless /\.pm$/;
|
||||
next unless /\.pm\z/;
|
||||
autosplit($fromto->{$_},$autodir);
|
||||
}
|
||||
umask $umask unless $Is_VMS;
|
||||
}
|
||||
|
||||
package ExtUtils::Install::Warn;
|
||||
@ -351,7 +346,7 @@ There are two keys with a special meaning in the hash: "read" and
|
||||
target files to the file named by C<$hashref-E<gt>{write}>. If there is
|
||||
another file named by C<$hashref-E<gt>{read}>, the contents of this file will
|
||||
be merged into the written file. The read and the written file may be
|
||||
identical, but on AFS it is quite likely, people are installing to a
|
||||
identical, but on AFS it is quite likely that people are installing to a
|
||||
different directory than the one where the files later appear.
|
||||
|
||||
install_default() takes one or less arguments. If no arguments are
|
||||
@ -364,7 +359,7 @@ The argument-less form is convenient for install scripts like
|
||||
|
||||
perl -MExtUtils::Install -e install_default Tk/Canvas
|
||||
|
||||
Assuming this command is executed in a directory with populated F<blib>
|
||||
Assuming this command is executed in a directory with a populated F<blib>
|
||||
directory, it will proceed as if the F<blib> was build by MakeMaker on
|
||||
this machine. This is useful for binary distributions.
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
# $FreeBSD$
|
||||
package ExtUtils::Liblist;
|
||||
use vars qw($VERSION);
|
||||
|
||||
use 5.005_64;
|
||||
# Broken out of MakeMaker from version 4.11
|
||||
|
||||
$VERSION = substr q$Revision: 1.1.1.2 $, 10;
|
||||
our $VERSION = substr q$Revision: 1.25 $, 10;
|
||||
|
||||
use Config;
|
||||
use Cwd 'cwd';
|
||||
@ -108,13 +110,14 @@ sub _unix_os2_ext {
|
||||
} elsif (-f ($fullname="$thispth/lib$thislib.$so")
|
||||
&& (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
|
||||
} elsif (-f ($fullname="$thispth/lib${thislib}_s$Config_libext")
|
||||
&& (! $Config{'archname'} =~ /RM\d\d\d-svr4/)
|
||||
&& ($thislib .= "_s") ){ # we must explicitly use _s version
|
||||
} elsif (-f ($fullname="$thispth/lib$thislib$Config_libext")){
|
||||
} elsif (-f ($fullname="$thispth/$thislib$Config_libext")){
|
||||
} elsif (-f ($fullname="$thispth/Slib$thislib$Config_libext")){
|
||||
} elsif ($^O eq 'dgux'
|
||||
&& -l ($fullname="$thispth/lib$thislib$Config_libext")
|
||||
&& readlink($fullname) =~ /^elink:/) {
|
||||
&& readlink($fullname) =~ /^elink:/s) {
|
||||
# Some of DG's libraries look like misconnected symbolic
|
||||
# links, but development tools can follow them. (They
|
||||
# look like this:
|
||||
@ -136,7 +139,7 @@ sub _unix_os2_ext {
|
||||
# Now update library lists
|
||||
|
||||
# what do we know about this library...
|
||||
my $is_dyna = ($fullname !~ /\Q$Config_libext\E$/);
|
||||
my $is_dyna = ($fullname !~ /\Q$Config_libext\E\z/);
|
||||
my $in_perl = ($libs =~ /\B-l\Q$ {thislib}\E\b/s);
|
||||
|
||||
# Do not add it into the list if it is already linked in
|
||||
@ -362,7 +365,7 @@ sub _vms_ext {
|
||||
return ('', '', $crtlstr, '');
|
||||
}
|
||||
|
||||
my(@dirs,@libs,$dir,$lib,%sh,%olb,%obj,$ldlib);
|
||||
my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib);
|
||||
my $cwd = cwd();
|
||||
my($so,$lib_ext,$obj_ext) = @Config{'so','lib_ext','obj_ext'};
|
||||
# List of common Unix library names and there VMS equivalents
|
||||
@ -430,28 +433,28 @@ sub _vms_ext {
|
||||
warn "\tChecking $name\n" if $verbose > 2;
|
||||
if (-f ($test = VMS::Filespec::rmsexpand($name))) {
|
||||
# It's got its own suffix, so we'll have to figure out the type
|
||||
if ($test =~ /(?:$so|exe)$/i) { $type = 'sh'; }
|
||||
elsif ($test =~ /(?:$lib_ext|olb)$/i) { $type = 'olb'; }
|
||||
if ($test =~ /(?:$so|exe)$/i) { $type = 'SHR'; }
|
||||
elsif ($test =~ /(?:$lib_ext|olb)$/i) { $type = 'OLB'; }
|
||||
elsif ($test =~ /(?:$obj_ext|obj)$/i) {
|
||||
warn "Note (probably harmless): "
|
||||
."Plain object file $test found in library list\n";
|
||||
$type = 'obj';
|
||||
$type = 'OBJ';
|
||||
}
|
||||
else {
|
||||
warn "Note (probably harmless): "
|
||||
."Unknown library type for $test; assuming shared\n";
|
||||
$type = 'sh';
|
||||
$type = 'SHR';
|
||||
}
|
||||
}
|
||||
elsif (-f ($test = VMS::Filespec::rmsexpand($name,$so)) or
|
||||
-f ($test = VMS::Filespec::rmsexpand($name,'.exe'))) {
|
||||
$type = 'sh';
|
||||
$type = 'SHR';
|
||||
$name = $test unless $test =~ /exe;?\d*$/i;
|
||||
}
|
||||
elsif (not length($ctype) and # If we've got a lib already, don't bother
|
||||
( -f ($test = VMS::Filespec::rmsexpand($name,$lib_ext)) or
|
||||
-f ($test = VMS::Filespec::rmsexpand($name,'.olb')))) {
|
||||
$type = 'olb';
|
||||
$type = 'OLB';
|
||||
$name = $test unless $test =~ /olb;?\d*$/i;
|
||||
}
|
||||
elsif (not length($ctype) and # If we've got a lib already, don't bother
|
||||
@ -459,17 +462,18 @@ sub _vms_ext {
|
||||
-f ($test = VMS::Filespec::rmsexpand($name,'.obj')))) {
|
||||
warn "Note (probably harmless): "
|
||||
."Plain object file $test found in library list\n";
|
||||
$type = 'obj';
|
||||
$type = 'OBJ';
|
||||
$name = $test unless $test =~ /obj;?\d*$/i;
|
||||
}
|
||||
if (defined $type) {
|
||||
$ctype = $type; $cand = $name;
|
||||
last if $ctype eq 'sh';
|
||||
last if $ctype eq 'SHR';
|
||||
}
|
||||
}
|
||||
if ($ctype) {
|
||||
eval '$' . $ctype . "{'$cand'}++";
|
||||
die "Error recording library: $@" if $@;
|
||||
# This has to precede any other CRTLs, so just make it first
|
||||
if ($cand eq 'VAXCCURSE') { unshift @{$found{$ctype}}, $cand; }
|
||||
else { push @{$found{$ctype}}, $cand; }
|
||||
warn "\tFound as $cand (really $test), type $ctype\n" if $verbose > 1;
|
||||
next LIB;
|
||||
}
|
||||
@ -478,15 +482,10 @@ sub _vms_ext {
|
||||
."No library found for $lib\n";
|
||||
}
|
||||
|
||||
@libs = sort keys %obj;
|
||||
# This has to precede any other CRTLs, so just make it first
|
||||
if ($olb{VAXCCURSE}) {
|
||||
push(@libs,"$olb{VAXCCURSE}/Library");
|
||||
delete $olb{VAXCCURSE};
|
||||
}
|
||||
push(@libs, map { "$_/Library" } sort keys %olb);
|
||||
push(@libs, map { "$_/Share" } sort keys %sh);
|
||||
$lib = join(' ',@libs);
|
||||
push @fndlibs, @{$found{OBJ}} if exists $found{OBJ};
|
||||
push @fndlibs, map { "$_/Library" } @{$found{OLB}} if exists $found{OLB};
|
||||
push @fndlibs, map { "$_/Share" } @{$found{SHR}} if exists $found{SHR};
|
||||
$lib = join(' ',@fndlibs);
|
||||
|
||||
$ldlib = $crtlstr ? "$lib $crtlstr" : $lib;
|
||||
warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose;
|
||||
@ -544,7 +543,7 @@ below.
|
||||
=head2 EXTRALIBS
|
||||
|
||||
List of libraries that need to be linked with when linking a perl
|
||||
binary which includes this extension Only those libraries that
|
||||
binary which includes this extension. Only those libraries that
|
||||
actually exist are included. These are written to a file and used
|
||||
when linking perl.
|
||||
|
||||
@ -566,7 +565,7 @@ object file. This list is used to create a .bs (bootstrap) file.
|
||||
=head1 PORTABILITY
|
||||
|
||||
This module deals with a lot of system dependencies and has quite a
|
||||
few architecture specific B<if>s in the code.
|
||||
few architecture specific C<if>s in the code.
|
||||
|
||||
=head2 VMS implementation
|
||||
|
||||
@ -686,7 +685,7 @@ enable searching for default libraries specified by C<$Config{libs}>.
|
||||
|
||||
The libraries specified may be a mixture of static libraries and
|
||||
import libraries (to link with DLLs). Since both kinds are used
|
||||
pretty transparently on the win32 platform, we do not attempt to
|
||||
pretty transparently on the Win32 platform, we do not attempt to
|
||||
distinguish between them.
|
||||
|
||||
=item *
|
||||
|
@ -1,3 +1,4 @@
|
||||
# $FreeBSD$
|
||||
package ExtUtils::MM_Unix;
|
||||
|
||||
use Exporter ();
|
||||
@ -8,11 +9,10 @@ use strict;
|
||||
use vars qw($VERSION $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Dos $Is_PERL_OBJECT
|
||||
$Verbose %pm %static $Xsubpp_Version);
|
||||
|
||||
$VERSION = substr q$Revision: 1.1.1.2 $, 10;
|
||||
# $Id: MM_Unix.pm,v 1.1.1.2 1999/05/02 14:25:31 markm Exp $
|
||||
$VERSION = substr q$Revision: 1.12603 $, 10;
|
||||
# $Id: MM_Unix.pm,v 1.126 1998/06/28 21:32:49 k Exp k $
|
||||
|
||||
Exporter::import('ExtUtils::MakeMaker',
|
||||
qw( $Verbose &neatvalue));
|
||||
Exporter::import('ExtUtils::MakeMaker', qw($Verbose &neatvalue));
|
||||
|
||||
$Is_OS2 = $^O eq 'os2';
|
||||
$Is_Mac = $^O eq 'MacOS';
|
||||
@ -81,13 +81,13 @@ path. On UNIX eliminated successive slashes and successive "/.".
|
||||
sub canonpath {
|
||||
my($self,$path) = @_;
|
||||
my $node = '';
|
||||
if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/| ) {
|
||||
if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/|s ) {
|
||||
$node = $1;
|
||||
}
|
||||
$path =~ s|(?<=[^/])/+|/|g ; # xx////xx -> xx/xx
|
||||
$path =~ s|(/\.)+/|/|g ; # xx/././xx -> xx/xx
|
||||
$path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx
|
||||
$path =~ s|(?<=[^/])/$|| ; # xx/ -> xx
|
||||
$path =~ s|^(\./)+||s unless $path eq "./"; # ./xx -> xx
|
||||
$path =~ s|(?<=[^/])/\z|| ; # xx/ -> xx
|
||||
"$node$path";
|
||||
}
|
||||
|
||||
@ -188,6 +188,7 @@ sub ExtUtils::MM_Unix::fixin ;
|
||||
sub ExtUtils::MM_Unix::force ;
|
||||
sub ExtUtils::MM_Unix::guess_name ;
|
||||
sub ExtUtils::MM_Unix::has_link_code ;
|
||||
sub ExtUtils::MM_Unix::htmlifypods ;
|
||||
sub ExtUtils::MM_Unix::init_dirscan ;
|
||||
sub ExtUtils::MM_Unix::init_main ;
|
||||
sub ExtUtils::MM_Unix::init_others ;
|
||||
@ -375,21 +376,45 @@ sub cflags {
|
||||
$self->{uc $_} ||= $cflags{$_}
|
||||
}
|
||||
|
||||
if ($self->{CAPI} && $Is_PERL_OBJECT) {
|
||||
$self->{CCFLAGS} =~ s/-DPERL_OBJECT(\s|$)//;
|
||||
$self->{CCFLAGS} .= ' -DPERL_CAPI ';
|
||||
if ($Is_Win32 && $Config{'cc'} =~ /^cl.exe/i) {
|
||||
# Turn off C++ mode of the MSC compiler
|
||||
$self->{CCFLAGS} =~ s/-TP(\s|$)//;
|
||||
$self->{OPTIMIZE} =~ s/-TP(\s|$)//;
|
||||
if ($Is_PERL_OBJECT) {
|
||||
$self->{CCFLAGS} =~ s/-DPERL_OBJECT(\b|$)/-DPERL_CAPI/g;
|
||||
if ($Is_Win32) {
|
||||
if ($Config{'cc'} =~ /^cl/i) {
|
||||
# Turn off C++ mode of the MSC compiler
|
||||
$self->{CCFLAGS} =~ s/-TP(\s|$)//g;
|
||||
$self->{OPTIMIZE} =~ s/-TP(\s|$)//g;
|
||||
}
|
||||
elsif ($Config{'cc'} =~ /^bcc32/i) {
|
||||
# Turn off C++ mode of the Borland compiler
|
||||
$self->{CCFLAGS} =~ s/-P(\s|$)//g;
|
||||
$self->{OPTIMIZE} =~ s/-P(\s|$)//g;
|
||||
}
|
||||
elsif ($Config{'cc'} =~ /^gcc/i) {
|
||||
# Turn off C++ mode of the GCC compiler
|
||||
$self->{CCFLAGS} =~ s/-xc\+\+(\s|$)//g;
|
||||
$self->{OPTIMIZE} =~ s/-xc\+\+(\s|$)//g;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($self->{POLLUTE}) {
|
||||
$self->{CCFLAGS} .= ' -DPERL_POLLUTE ';
|
||||
}
|
||||
|
||||
my $pollute = '';
|
||||
if ($Config{usemymalloc} and not $Config{bincompat5005}
|
||||
and not $Config{ccflags} =~ /-DPERL_POLLUTE_MALLOC\b/
|
||||
and $self->{PERL_MALLOC_OK}) {
|
||||
$pollute = '$(PERL_MALLOC_DEF)';
|
||||
}
|
||||
|
||||
return $self->{CFLAGS} = qq{
|
||||
CCFLAGS = $self->{CCFLAGS}
|
||||
OPTIMIZE = $self->{OPTIMIZE}
|
||||
PERLTYPE = $self->{PERLTYPE}
|
||||
LARGE = $self->{LARGE}
|
||||
SPLIT = $self->{SPLIT}
|
||||
MPOLLUTE = $pollute
|
||||
};
|
||||
|
||||
}
|
||||
@ -413,13 +438,26 @@ clean ::
|
||||
');
|
||||
# clean subdirectories first
|
||||
for $dir (@{$self->{DIR}}) {
|
||||
push @m, "\t-cd $dir && \$(TEST_F) $self->{MAKEFILE} && \$(MAKE) clean\n";
|
||||
if ($Is_Win32 && Win32::IsWin95()) {
|
||||
push @m, <<EOT;
|
||||
cd $dir
|
||||
\$(TEST_F) $self->{MAKEFILE}
|
||||
\$(MAKE) clean
|
||||
cd ..
|
||||
EOT
|
||||
}
|
||||
else {
|
||||
push @m, <<EOT;
|
||||
-cd $dir && \$(TEST_F) $self->{MAKEFILE} && \$(MAKE) clean
|
||||
EOT
|
||||
}
|
||||
}
|
||||
|
||||
my(@otherfiles) = values %{$self->{XS}}; # .c files from *.xs files
|
||||
push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
|
||||
push(@otherfiles, qw[./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all
|
||||
perlmain.c mon.out core so_locations pm_to_blib
|
||||
perlmain.c mon.out core core.*perl.*.?
|
||||
*perl.core so_locations pm_to_blib
|
||||
*~ */*~ */*/*~ *$(OBJ_EXT) *$(LIB_EXT) perl.exe
|
||||
$(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def
|
||||
$(BASEEXT).exp
|
||||
@ -446,7 +484,7 @@ sub const_cccmd {
|
||||
return '' unless $self->needs_linking();
|
||||
return $self->{CONST_CCCMD} =
|
||||
q{CCCMD = $(CC) -c $(INC) $(CCFLAGS) $(OPTIMIZE) \\
|
||||
$(PERLTYPE) $(LARGE) $(SPLIT) $(DEFINE_VERSION) \\
|
||||
$(PERLTYPE) $(LARGE) $(SPLIT) $(MPOLLUTE) $(DEFINE_VERSION) \\
|
||||
$(XS_DEFINE_VERSION)};
|
||||
}
|
||||
|
||||
@ -519,7 +557,7 @@ sub constants {
|
||||
INSTALLSITEARCH INSTALLBIN INSTALLSCRIPT PERL_LIB
|
||||
PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB
|
||||
FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC
|
||||
PERL_INC PERL FULLPERL
|
||||
PERL_INC PERL FULLPERL FULL_AR
|
||||
|
||||
/ ) {
|
||||
next unless defined $self->{$tmp};
|
||||
@ -531,6 +569,7 @@ VERSION_MACRO = VERSION
|
||||
DEFINE_VERSION = -D\$(VERSION_MACRO)=\\\"\$(VERSION)\\\"
|
||||
XS_VERSION_MACRO = XS_VERSION
|
||||
XS_DEFINE_VERSION = -D\$(XS_VERSION_MACRO)=\\\"\$(XS_VERSION)\\\"
|
||||
PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
|
||||
};
|
||||
|
||||
push @m, qq{
|
||||
@ -560,12 +599,19 @@ XS_FILES= ".join(" \\\n\t", sort keys %{$self->{XS}})."
|
||||
C_FILES = ".join(" \\\n\t", @{$self->{C}})."
|
||||
O_FILES = ".join(" \\\n\t", @{$self->{O_FILES}})."
|
||||
H_FILES = ".join(" \\\n\t", @{$self->{H}})."
|
||||
HTMLLIBPODS = ".join(" \\\n\t", sort keys %{$self->{HTMLLIBPODS}})."
|
||||
HTMLSCRIPTPODS = ".join(" \\\n\t", sort keys %{$self->{HTMLSCRIPTPODS}})."
|
||||
MAN1PODS = ".join(" \\\n\t", sort keys %{$self->{MAN1PODS}})."
|
||||
MAN3PODS = ".join(" \\\n\t", sort keys %{$self->{MAN3PODS}})."
|
||||
";
|
||||
|
||||
for $tmp (qw/
|
||||
INST_MAN1DIR INSTALLMAN1DIR MAN1EXT INST_MAN3DIR INSTALLMAN3DIR MAN3EXT
|
||||
INST_HTMLPRIVLIBDIR INSTALLHTMLPRIVLIBDIR
|
||||
INST_HTMLSITELIBDIR INSTALLHTMLSITELIBDIR
|
||||
INST_HTMLSCRIPTDIR INSTALLHTMLSCRIPTDIR
|
||||
INST_HTMLLIBDIR HTMLEXT
|
||||
INST_MAN1DIR INSTALLMAN1DIR MAN1EXT
|
||||
INST_MAN3DIR INSTALLMAN3DIR MAN3EXT
|
||||
/) {
|
||||
next unless defined $self->{$tmp};
|
||||
push @m, "$tmp = $self->{$tmp}\n";
|
||||
@ -693,7 +739,7 @@ sub dir_target {
|
||||
my($targ) = $self->catfile($dir,'.exists');
|
||||
# catfile may have adapted syntax of $dir to target OS, so...
|
||||
if ($Is_VMS) { # Just remove file name; dirspec is often in macro
|
||||
($targdir = $targ) =~ s:/?\.exists$::;
|
||||
($targdir = $targ) =~ s:/?\.exists\z::;
|
||||
}
|
||||
else { # while elsewhere we expect to see the dir separator in $targ
|
||||
$targdir = dirname($targ);
|
||||
@ -1079,10 +1125,10 @@ Takes as argument a path and returns true, if it is an absolute path.
|
||||
sub file_name_is_absolute {
|
||||
my($self,$file) = @_;
|
||||
if ($Is_Dos){
|
||||
$file =~ m{^([a-z]:)?[\\/]}i ;
|
||||
$file =~ m{^([a-z]:)?[\\/]}is ;
|
||||
}
|
||||
else {
|
||||
$file =~ m:^/: ;
|
||||
$file =~ m:^/:s ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1265,7 +1311,7 @@ sub guess_name {
|
||||
my($self) = @_;
|
||||
use Cwd 'cwd';
|
||||
my $name = basename(cwd());
|
||||
$name =~ s|[\-_][\d\.\-]+$||; # this is new with MM 5.00, we
|
||||
$name =~ s|[\-_][\d\.\-]+\z||; # this is new with MM 5.00, we
|
||||
# strip minus or underline
|
||||
# followed by a float or some such
|
||||
print "Warning: Guessing NAME [$name] from current directory name.\n";
|
||||
@ -1290,9 +1336,60 @@ sub has_link_code {
|
||||
return $self->{HAS_LINK_CODE} = 0;
|
||||
}
|
||||
|
||||
=item htmlifypods (o)
|
||||
|
||||
Defines targets and routines to translate the pods into HTML manpages
|
||||
and put them into the INST_HTMLLIBDIR and INST_HTMLSCRIPTDIR
|
||||
directories.
|
||||
|
||||
=cut
|
||||
|
||||
sub htmlifypods {
|
||||
my($self, %attribs) = @_;
|
||||
return "\nhtmlifypods : pure_all\n\t$self->{NOECHO}\$(NOOP)\n" unless
|
||||
%{$self->{HTMLLIBPODS}} || %{$self->{HTMLSCRIPTPODS}};
|
||||
my($dist);
|
||||
my($pod2html_exe);
|
||||
if (defined $self->{PERL_SRC}) {
|
||||
$pod2html_exe = $self->catfile($self->{PERL_SRC},'pod','pod2html');
|
||||
} else {
|
||||
$pod2html_exe = $self->catfile($Config{scriptdirexp},'pod2html');
|
||||
}
|
||||
unless ($pod2html_exe = $self->perl_script($pod2html_exe)) {
|
||||
# No pod2html but some HTMLxxxPODS to be installed
|
||||
print <<END;
|
||||
|
||||
Warning: I could not locate your pod2html program. Please make sure,
|
||||
your pod2html program is in your PATH before you execute 'make'
|
||||
|
||||
END
|
||||
$pod2html_exe = "-S pod2html";
|
||||
}
|
||||
my(@m);
|
||||
push @m,
|
||||
qq[POD2HTML_EXE = $pod2html_exe\n],
|
||||
qq[POD2HTML = \$(PERL) -we 'use File::Basename; use File::Path qw(mkpath); %m=\@ARGV;for (keys %m){' \\\n],
|
||||
q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "],
|
||||
$self->{MAKEFILE}, q[";' \\
|
||||
-e 'print "Htmlifying $$m{$$_}\n";' \\
|
||||
-e '$$dir = dirname($$m{$$_}); mkpath($$dir) unless -d $$dir;' \\
|
||||
-e 'system(qq[$$^X ].q["-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(POD2HTML_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\\047t install $$m{$$_}\n";' \\
|
||||
-e 'chmod(oct($(PERM_RW))), $$m{$$_} or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'
|
||||
];
|
||||
push @m, "\nhtmlifypods : pure_all ";
|
||||
push @m, join " \\\n\t", keys %{$self->{HTMLLIBPODS}}, keys %{$self->{HTMLSCRIPTPODS}};
|
||||
|
||||
push(@m,"\n");
|
||||
if (%{$self->{HTMLLIBPODS}} || %{$self->{HTMLSCRIPTPODS}}) {
|
||||
push @m, "\t$self->{NOECHO}\$(POD2HTML) \\\n\t";
|
||||
push @m, join " \\\n\t", %{$self->{HTMLLIBPODS}}, %{$self->{HTMLSCRIPTPODS}};
|
||||
}
|
||||
join('', @m);
|
||||
}
|
||||
|
||||
=item init_dirscan
|
||||
|
||||
Initializes DIR, XS, PM, C, O_FILES, H, PL_FILES, MAN*PODS, EXE_FILES.
|
||||
Initializes DIR, XS, PM, C, O_FILES, H, PL_FILES, HTML*PODS, MAN*PODS, EXE_FILES.
|
||||
|
||||
=cut
|
||||
|
||||
@ -1309,24 +1406,26 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
|
||||
if (-d $name){
|
||||
next if -l $name; # We do not support symlinks at all
|
||||
$dir{$name} = $name if (-f $self->catfile($name,"Makefile.PL"));
|
||||
} elsif ($name =~ /\.xs$/){
|
||||
my($c); ($c = $name) =~ s/\.xs$/.c/;
|
||||
} elsif ($name =~ /\.xs\z/){
|
||||
my($c); ($c = $name) =~ s/\.xs\z/.c/;
|
||||
$xs{$name} = $c;
|
||||
$c{$c} = 1;
|
||||
} elsif ($name =~ /\.c(pp|xx|c)?$/i){ # .c .C .cpp .cxx .cc
|
||||
} elsif ($name =~ /\.c(pp|xx|c)?\z/i){ # .c .C .cpp .cxx .cc
|
||||
$c{$name} = 1
|
||||
unless $name =~ m/perlmain\.c/; # See MAP_TARGET
|
||||
} elsif ($name =~ /\.h$/i){
|
||||
} elsif ($name =~ /\.h\z/i){
|
||||
$h{$name} = 1;
|
||||
} elsif ($name =~ /\.PL$/) {
|
||||
($pl_files{$name} = $name) =~ s/\.PL$// ;
|
||||
} elsif ($Is_VMS && $name =~ /\.pl$/) { # case-insensitive filesystem
|
||||
} elsif ($name =~ /\.PL\z/) {
|
||||
($pl_files{$name} = $name) =~ s/\.PL\z// ;
|
||||
} elsif (($Is_VMS || $Is_Dos) && $name =~ /[._]pl$/i) {
|
||||
# case-insensitive filesystem, one dot per name, so foo.h.PL
|
||||
# under Unix appears as foo.h_pl under VMS or fooh.pl on Dos
|
||||
local($/); open(PL,$name); my $txt = <PL>; close PL;
|
||||
if ($txt =~ /Extracting \S+ \(with variable substitutions/) {
|
||||
($pl_files{$name} = $name) =~ s/\.pl$// ;
|
||||
($pl_files{$name} = $name) =~ s/[._]pl\z//i ;
|
||||
}
|
||||
else { $pm{$name} = $self->catfile('$(INST_LIBDIR)',$name); }
|
||||
} elsif ($name =~ /\.(p[ml]|pod)$/){
|
||||
} elsif ($name =~ /\.(p[ml]|pod)\z/){
|
||||
$pm{$name} = $self->catfile('$(INST_LIBDIR)',$name);
|
||||
}
|
||||
}
|
||||
@ -1401,70 +1500,64 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
|
||||
$self->{PM} = \%pm unless $self->{PM};
|
||||
$self->{C} = [sort keys %c] unless $self->{C};
|
||||
my(@o_files) = @{$self->{C}};
|
||||
$self->{O_FILES} = [grep s/\.c(pp|xx|c)?$/$self->{OBJ_EXT}/i, @o_files] ;
|
||||
$self->{O_FILES} = [grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files] ;
|
||||
$self->{H} = [sort keys %h] unless $self->{H};
|
||||
$self->{PL_FILES} = \%pl_files unless $self->{PL_FILES};
|
||||
|
||||
# Set up names of manual pages to generate from pods
|
||||
if ($self->{MAN1PODS}) {
|
||||
} elsif ( $self->{INST_MAN1DIR} =~ /^(none|\s*)$/ ) {
|
||||
$self->{MAN1PODS} = {};
|
||||
} else {
|
||||
my %manifypods = ();
|
||||
my %pods;
|
||||
foreach my $man (qw(MAN1 MAN3 HTMLLIB HTMLSCRIPT)) {
|
||||
unless ($self->{"${man}PODS"}) {
|
||||
$self->{"${man}PODS"} = {};
|
||||
$pods{$man} = 1 unless $self->{"INST_${man}DIR"} =~ /^(none|\s*)$/;
|
||||
}
|
||||
}
|
||||
|
||||
if ($pods{MAN1} || $pods{HTMLSCRIPT}) {
|
||||
if ( exists $self->{EXE_FILES} ) {
|
||||
foreach $name (@{$self->{EXE_FILES}}) {
|
||||
# use FileHandle ();
|
||||
# my $fh = new FileHandle;
|
||||
local *FH;
|
||||
my($ispod)=0;
|
||||
# if ($fh->open("<$name")) {
|
||||
if (open(FH,"<$name")) {
|
||||
# while (<$fh>) {
|
||||
while (<FH>) {
|
||||
if (/^=head1\s+\w+/) {
|
||||
$ispod=1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
# $fh->close;
|
||||
close FH;
|
||||
} else {
|
||||
# If it doesn't exist yet, we assume, it has pods in it
|
||||
$ispod = 1;
|
||||
}
|
||||
if( $ispod ) {
|
||||
$manifypods{$name} =
|
||||
$self->catfile('$(INST_MAN1DIR)',
|
||||
basename($name).'.$(MAN1EXT)');
|
||||
next unless $ispod;
|
||||
if ($pods{HTMLSCRIPT}) {
|
||||
$self->{HTMLSCRIPTPODS}->{$name} =
|
||||
$self->catfile("\$(INST_HTMLSCRIPTDIR)", basename($name).".\$(HTMLEXT)");
|
||||
}
|
||||
if ($pods{MAN1}) {
|
||||
$self->{MAN1PODS}->{$name} =
|
||||
$self->catfile("\$(INST_MAN1DIR)", basename($name).".\$(MAN1EXT)");
|
||||
}
|
||||
}
|
||||
}
|
||||
$self->{MAN1PODS} = \%manifypods;
|
||||
}
|
||||
if ($self->{MAN3PODS}) {
|
||||
} elsif ( $self->{INST_MAN3DIR} =~ /^(none|\s*)$/ ) {
|
||||
$self->{MAN3PODS} = {};
|
||||
} else {
|
||||
if ($pods{MAN3} || $pods{HTMLLIB}) {
|
||||
my %manifypods = (); # we collect the keys first, i.e. the files
|
||||
# we have to convert to pod
|
||||
foreach $name (keys %{$self->{PM}}) {
|
||||
if ($name =~ /\.pod$/ ) {
|
||||
if ($name =~ /\.pod\z/ ) {
|
||||
$manifypods{$name} = $self->{PM}{$name};
|
||||
} elsif ($name =~ /\.p[ml]$/ ) {
|
||||
# use FileHandle ();
|
||||
# my $fh = new FileHandle;
|
||||
} elsif ($name =~ /\.p[ml]\z/ ) {
|
||||
local *FH;
|
||||
my($ispod)=0;
|
||||
# $fh->open("<$name");
|
||||
if (open(FH,"<$name")) {
|
||||
# while (<$fh>) {
|
||||
while (<FH>) {
|
||||
if (/^=head1\s+\w+/) {
|
||||
$ispod=1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
# $fh->close;
|
||||
close FH;
|
||||
} else {
|
||||
$ispod = 1;
|
||||
@ -1478,19 +1571,25 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
|
||||
# Remove "Configure.pm" and similar, if it's not the only pod listed
|
||||
# To force inclusion, just name it "Configure.pod", or override MAN3PODS
|
||||
foreach $name (keys %manifypods) {
|
||||
if ($name =~ /(config|setup).*\.pm/i) {
|
||||
if ($name =~ /(config|setup).*\.pm/is) {
|
||||
delete $manifypods{$name};
|
||||
next;
|
||||
}
|
||||
my($manpagename) = $name;
|
||||
unless ($manpagename =~ s!^\W*lib\W+!!) { # everything below lib is ok
|
||||
$manpagename =~ s/\.p(od|m|l)\z//;
|
||||
if ($pods{HTMLLIB}) {
|
||||
$self->{HTMLLIBPODS}->{$name} =
|
||||
$self->catfile("\$(INST_HTMLLIBDIR)", "$manpagename.\$(HTMLEXT)");
|
||||
}
|
||||
unless ($manpagename =~ s!^\W*lib\W+!!s) { # everything below lib is ok
|
||||
$manpagename = $self->catfile(split(/::/,$self->{PARENT_NAME}),$manpagename);
|
||||
}
|
||||
$manpagename =~ s/\.p(od|m|l)$//;
|
||||
$manpagename = $self->replace_manpage_separator($manpagename);
|
||||
$manifypods{$name} = $self->catfile("\$(INST_MAN3DIR)","$manpagename.\$(MAN3EXT)");
|
||||
if ($pods{MAN3}) {
|
||||
$manpagename = $self->replace_manpage_separator($manpagename);
|
||||
$self->{MAN3PODS}->{$name} =
|
||||
$self->catfile("\$(INST_MAN3DIR)", "$manpagename.\$(MAN3EXT)");
|
||||
}
|
||||
}
|
||||
$self->{MAN3PODS} = \%manifypods;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1531,7 +1630,7 @@ sub init_main {
|
||||
$modfname = &DynaLoader::mod2fname(\@modparts);
|
||||
}
|
||||
|
||||
($self->{PARENT_NAME}, $self->{BASEEXT}) = $self->{NAME} =~ m!(?:([\w:]+)::)?(\w+)$! ;
|
||||
($self->{PARENT_NAME}, $self->{BASEEXT}) = $self->{NAME} =~ m!(?:([\w:]+)::)?(\w+)\z! ;
|
||||
|
||||
if (defined &DynaLoader::mod2fname) {
|
||||
# As of 5.001m, dl_os2 appends '_'
|
||||
@ -1601,10 +1700,34 @@ from the perl source tree.
|
||||
}
|
||||
} else {
|
||||
# we should also consider $ENV{PERL5LIB} here
|
||||
my $old = $self->{PERL_LIB} || $self->{PERL_ARCHLIB} || $self->{PERL_INC};
|
||||
$self->{PERL_LIB} ||= $Config::Config{privlibexp};
|
||||
$self->{PERL_ARCHLIB} ||= $Config::Config{archlibexp};
|
||||
$self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
|
||||
my $perl_h;
|
||||
|
||||
if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))
|
||||
and not $old){
|
||||
# Maybe somebody tries to build an extension with an
|
||||
# uninstalled Perl outside of Perl build tree
|
||||
my $found;
|
||||
for my $dir (@INC) {
|
||||
$found = $dir, last if -e $self->catdir($dir, "Config.pm");
|
||||
}
|
||||
if ($found) {
|
||||
my $inc = dirname $found;
|
||||
if (-e $self->catdir($inc, "perl.h")) {
|
||||
$self->{PERL_LIB} = $found;
|
||||
$self->{PERL_ARCHLIB} = $found;
|
||||
$self->{PERL_INC} = $inc;
|
||||
$self->{UNINSTALLED_PERL} = 1;
|
||||
print STDOUT <<EOP;
|
||||
... Detected uninstalled Perl. Trying to continue.
|
||||
EOP
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unless (-f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))){
|
||||
die qq{
|
||||
Error: Unable to locate installed Perl libraries or Perl source code.
|
||||
@ -1695,8 +1818,7 @@ usually solves this kind of problem.
|
||||
|
||||
my($install_variable,$search_prefix,$replace_prefix);
|
||||
|
||||
# The rule, taken from Configure, is that if prefix contains perl,
|
||||
# we shape the tree
|
||||
# If the prefix contains perl, Configure shapes the tree as follows:
|
||||
# perlprefix/lib/ INSTALLPRIVLIB
|
||||
# perlprefix/lib/pod/
|
||||
# perlprefix/lib/site_perl/ INSTALLSITELIB
|
||||
@ -1708,6 +1830,11 @@ usually solves this kind of problem.
|
||||
# prefix/lib/perl5/site_perl/ INSTALLSITELIB
|
||||
# prefix/bin/ INSTALLBIN
|
||||
# prefix/lib/perl5/man/ INSTALLMAN1DIR
|
||||
#
|
||||
# The above results in various kinds of breakage on various
|
||||
# platforms, so we cope with it as follows: if prefix/lib/perl5
|
||||
# or prefix/lib/perl5/man exist, we'll replace those instead
|
||||
# of /prefix/{lib,man}
|
||||
|
||||
$replace_prefix = qq[\$\(PREFIX\)];
|
||||
$search_prefix = $self->catdir($configure_prefix,"local");
|
||||
@ -1717,36 +1844,45 @@ usually solves this kind of problem.
|
||||
/) {
|
||||
$self->prefixify($install_variable,$search_prefix,$replace_prefix);
|
||||
}
|
||||
$search_prefix = $configure_prefix =~ /perl/ ?
|
||||
$self->catdir($configure_prefix,"lib") :
|
||||
$self->catdir($configure_prefix,"lib","perl5");
|
||||
my $funkylibdir = $self->catdir($configure_prefix,"lib","perl5");
|
||||
$funkylibdir = '' unless -d $funkylibdir;
|
||||
$search_prefix = $funkylibdir || $self->catdir($configure_prefix,"lib");
|
||||
if ($self->{LIB}) {
|
||||
$self->{INSTALLPRIVLIB} = $self->{INSTALLSITELIB} = $self->{LIB};
|
||||
$self->{INSTALLARCHLIB} = $self->{INSTALLSITEARCH} =
|
||||
$self->catdir($self->{LIB},$Config{'archname'});
|
||||
} else {
|
||||
$replace_prefix = $self->{PREFIX} =~ /perl/ ?
|
||||
$self->catdir(qq[\$\(PREFIX\)],"lib") :
|
||||
$self->catdir(qq[\$\(PREFIX\)],"lib","perl5");
|
||||
}
|
||||
else {
|
||||
if (-d $self->catdir($self->{PREFIX},"lib","perl5")) {
|
||||
$replace_prefix = $self->catdir(qq[\$\(PREFIX\)],"lib", "perl5");
|
||||
}
|
||||
else {
|
||||
$replace_prefix = $self->catdir(qq[\$\(PREFIX\)],"lib");
|
||||
}
|
||||
for $install_variable (qw/
|
||||
INSTALLPRIVLIB
|
||||
INSTALLARCHLIB
|
||||
INSTALLSITELIB
|
||||
INSTALLSITEARCH
|
||||
/) {
|
||||
/)
|
||||
{
|
||||
$self->prefixify($install_variable,$search_prefix,$replace_prefix);
|
||||
}
|
||||
}
|
||||
$search_prefix = $configure_prefix =~ /perl/ ?
|
||||
$self->catdir($configure_prefix,"man") :
|
||||
$self->catdir($configure_prefix,"lib","perl5","man");
|
||||
$replace_prefix = $self->{PREFIX} =~ /perl/ ?
|
||||
$self->catdir(qq[\$\(PREFIX\)],"man") :
|
||||
$self->catdir(qq[\$\(PREFIX\)],"lib","perl5","man");
|
||||
my $funkymandir = $self->catdir($configure_prefix,"lib","perl5","man");
|
||||
$funkymandir = '' unless -d $funkymandir;
|
||||
$search_prefix = $funkymandir || $self->catdir($configure_prefix,"man");
|
||||
if (-d $self->catdir($self->{PREFIX},"lib","perl5", "man")) {
|
||||
$replace_prefix = $self->catdir(qq[\$\(PREFIX\)],"lib", "perl5", "man");
|
||||
}
|
||||
else {
|
||||
$replace_prefix = $self->catdir(qq[\$\(PREFIX\)],"man");
|
||||
}
|
||||
for $install_variable (qw/
|
||||
INSTALLMAN1DIR
|
||||
INSTALLMAN3DIR
|
||||
/) {
|
||||
/)
|
||||
{
|
||||
$self->prefixify($install_variable,$search_prefix,$replace_prefix);
|
||||
}
|
||||
|
||||
@ -1774,6 +1910,30 @@ usually solves this kind of problem.
|
||||
}
|
||||
$self->{MAN3EXT} ||= $Config::Config{man3ext};
|
||||
|
||||
$self->{INSTALLHTMLPRIVLIBDIR} = $Config::Config{installhtmlprivlibdir}
|
||||
unless defined $self->{INSTALLHTMLPRIVLIBDIR};
|
||||
$self->{INSTALLHTMLSITELIBDIR} = $Config::Config{installhtmlsitelibdir}
|
||||
unless defined $self->{INSTALLHTMLSITELIBDIR};
|
||||
|
||||
unless (defined $self->{INST_HTMLLIBDIR}){
|
||||
if ($self->{INSTALLHTMLSITELIBDIR} =~ /^(none|\s*)$/){
|
||||
$self->{INST_HTMLLIBDIR} = $self->{INSTALLHTMLSITELIBDIR};
|
||||
} else {
|
||||
$self->{INST_HTMLLIBDIR} = $self->catdir($self->curdir,'blib','html','lib');
|
||||
}
|
||||
}
|
||||
|
||||
$self->{INSTALLHTMLSCRIPTDIR} = $Config::Config{installhtmlscriptdir}
|
||||
unless defined $self->{INSTALLHTMLSCRIPTDIR};
|
||||
unless (defined $self->{INST_HTMLSCRIPTDIR}){
|
||||
if ($self->{INSTALLHTMLSCRIPTDIR} =~ /^(none|\s*)$/){
|
||||
$self->{INST_HTMLSCRIPTDIR} = $self->{INSTALLHTMLSCRIPTDIR};
|
||||
} else {
|
||||
$self->{INST_HTMLSCRIPTDIR} = $self->catdir($self->curdir,'blib','html','bin');
|
||||
}
|
||||
}
|
||||
$self->{HTMLEXT} ||= $Config::Config{htmlext} || 'html';
|
||||
|
||||
|
||||
# Get some stuff out of %Config if we haven't yet done so
|
||||
print STDOUT "CONFIG must be an array ref\n"
|
||||
@ -1847,7 +2007,8 @@ usually solves this kind of problem.
|
||||
push @defpath, $component if defined $component;
|
||||
}
|
||||
$self->{PERL} ||=
|
||||
$self->find_perl(5.0, [ $^X, 'miniperl','perl','perl5',"perl$]" ],
|
||||
$self->find_perl(5.0, [ $self->canonpath($^X), 'miniperl',
|
||||
'perl','perl5',"perl$Config{version}" ],
|
||||
\@defpath, $Verbose );
|
||||
# don't check if perl is executable, maybe they have decided to
|
||||
# supply switches with perl
|
||||
@ -1966,6 +2127,8 @@ pure_perl_install ::
|
||||
$(INST_ARCHLIB) $(INSTALLARCHLIB) \
|
||||
$(INST_BIN) $(INSTALLBIN) \
|
||||
$(INST_SCRIPT) $(INSTALLSCRIPT) \
|
||||
$(INST_HTMLLIBDIR) $(INSTALLHTMLPRIVLIBDIR) \
|
||||
$(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \
|
||||
$(INST_MAN1DIR) $(INSTALLMAN1DIR) \
|
||||
$(INST_MAN3DIR) $(INSTALLMAN3DIR)
|
||||
}.$self->{NOECHO}.q{$(WARN_IF_OLD_PACKLIST) \
|
||||
@ -1980,12 +2143,15 @@ pure_site_install ::
|
||||
$(INST_ARCHLIB) $(INSTALLSITEARCH) \
|
||||
$(INST_BIN) $(INSTALLBIN) \
|
||||
$(INST_SCRIPT) $(INSTALLSCRIPT) \
|
||||
$(INST_HTMLLIBDIR) $(INSTALLHTMLSITELIBDIR) \
|
||||
$(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \
|
||||
$(INST_MAN1DIR) $(INSTALLMAN1DIR) \
|
||||
$(INST_MAN3DIR) $(INSTALLMAN3DIR)
|
||||
}.$self->{NOECHO}.q{$(WARN_IF_OLD_PACKLIST) \
|
||||
}.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
|
||||
|
||||
doc_perl_install ::
|
||||
-}.$self->{NOECHO}.q{$(MKPATH) $(INSTALLARCHLIB)
|
||||
-}.$self->{NOECHO}.q{$(DOC_INSTALL) \
|
||||
"Module" "$(NAME)" \
|
||||
"installed into" "$(INSTALLPRIVLIB)" \
|
||||
@ -1995,6 +2161,7 @@ doc_perl_install ::
|
||||
>> }.$self->catfile('$(INSTALLARCHLIB)','perllocal.pod').q{
|
||||
|
||||
doc_site_install ::
|
||||
-}.$self->{NOECHO}.q{$(MKPATH) $(INSTALLARCHLIB)
|
||||
-}.$self->{NOECHO}.q{$(DOC_INSTALL) \
|
||||
"Module" "$(NAME)" \
|
||||
"installed into" "$(INSTALLSITELIB)" \
|
||||
@ -2220,7 +2387,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
|
||||
my $incl;
|
||||
my $xx;
|
||||
|
||||
($xx = $File::Find::name) =~ s,.*?/auto/,,;
|
||||
($xx = $File::Find::name) =~ s,.*?/auto/,,s;
|
||||
$xx =~ s,/?$_,,;
|
||||
$xx =~ s,/,::,g;
|
||||
|
||||
@ -2238,7 +2405,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
|
||||
my $excl;
|
||||
my $xx;
|
||||
|
||||
($xx = $File::Find::name) =~ s,.*?/auto/,,;
|
||||
($xx = $File::Find::name) =~ s,.*?/auto/,,s;
|
||||
$xx =~ s,/?$_,,;
|
||||
$xx =~ s,/,::,g;
|
||||
|
||||
@ -2255,7 +2422,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
|
||||
|
||||
# Once the patch to minimod.PL is in the distribution, I can
|
||||
# drop it
|
||||
return if $File::Find::name =~ m:auto/$self->{FULLEXT}/$self->{BASEEXT}$self->{LIB_EXT}$:;
|
||||
return if $File::Find::name =~ m:auto/$self->{FULLEXT}/$self->{BASEEXT}$self->{LIB_EXT}\z:;
|
||||
use Cwd 'cwd';
|
||||
$static{cwd() . "/" . $_}++;
|
||||
}, grep( -d $_, @{$searchdirs || []}) );
|
||||
@ -2266,7 +2433,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
|
||||
|
||||
$extra = [] unless $extra && ref $extra eq 'ARRAY';
|
||||
for (sort keys %static) {
|
||||
next unless /\Q$self->{LIB_EXT}\E$/;
|
||||
next unless /\Q$self->{LIB_EXT}\E\z/;
|
||||
$_ = dirname($_) . "/extralibs.ld";
|
||||
push @$extra, $_;
|
||||
}
|
||||
@ -2351,7 +2518,7 @@ $tmp/perlmain\$(OBJ_EXT): $tmp/perlmain.c
|
||||
$tmp/perlmain.c: $makefilename}, q{
|
||||
}.$self->{NOECHO}.q{echo Writing $@
|
||||
}.$self->{NOECHO}.q{$(PERL) $(MAP_PERLINC) -MExtUtils::Miniperl \\
|
||||
-e "writemain(grep s#.*/auto/##, split(q| |, q|$(MAP_STATIC)|))" > $@t && $(MV) $@t $@
|
||||
-e "writemain(grep s#.*/auto/##s, split(q| |, q|$(MAP_STATIC)|))" > $@t && $(MV) $@t $@
|
||||
|
||||
};
|
||||
push @m, "\t",$self->{NOECHO}.q{$(PERL) $(INSTALLSCRIPT)/fixpmain
|
||||
@ -2361,6 +2528,7 @@ $tmp/perlmain.c: $makefilename}, q{
|
||||
push @m, q{
|
||||
doc_inst_perl:
|
||||
}.$self->{NOECHO}.q{echo Appending installation info to $(INSTALLARCHLIB)/perllocal.pod
|
||||
-}.$self->{NOECHO}.q{$(MKPATH) $(INSTALLARCHLIB)
|
||||
-}.$self->{NOECHO}.q{$(DOC_INSTALL) \
|
||||
"Perl binary" "$(MAP_TARGET)" \
|
||||
MAP_STATIC "$(MAP_STATIC)" \
|
||||
@ -2442,7 +2610,11 @@ sub manifypods {
|
||||
} else {
|
||||
$pod2man_exe = $self->catfile($Config{scriptdirexp},'pod2man');
|
||||
}
|
||||
unless ($self->perl_script($pod2man_exe)) {
|
||||
unless ($pod2man_exe = $self->perl_script($pod2man_exe)) {
|
||||
# Maybe a build by uninstalled Perl?
|
||||
$pod2man_exe = $self->catfile($self->{PERL_INC}, "pod", "pod2man");
|
||||
}
|
||||
unless ($pod2man_exe = $self->perl_script($pod2man_exe)) {
|
||||
# No pod2man but some MAN3PODS to be installed
|
||||
print <<END;
|
||||
|
||||
@ -2569,7 +2741,9 @@ sub nicetext {
|
||||
|
||||
=item parse_version
|
||||
|
||||
parse a file and return what you think is $VERSION in this file set to
|
||||
parse a file and return what you think is $VERSION in this file set to.
|
||||
It will return the string "undef" if it can't figure out what $VERSION
|
||||
is.
|
||||
|
||||
=cut
|
||||
|
||||
@ -2595,9 +2769,9 @@ sub parse_version {
|
||||
$_
|
||||
}; \$$2
|
||||
};
|
||||
local($^W) = 0;
|
||||
no warnings;
|
||||
$result = eval($eval);
|
||||
die "Could not eval '$eval' in $parsefile: $@" if $@;
|
||||
warn "Could not eval '$eval' in $parsefile: $@" if $@;
|
||||
$result = "undef" unless defined $result;
|
||||
last;
|
||||
}
|
||||
@ -2619,7 +2793,7 @@ sub parse_abstract {
|
||||
open(FH,$parsefile) or die "Could not open '$parsefile': $!";
|
||||
my $inpod = 0;
|
||||
my $package = $self->{DISTNAME};
|
||||
$package =~ s/-/::/;
|
||||
$package =~ s/-/::/g;
|
||||
while (<FH>) {
|
||||
$inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
|
||||
next if !$inpod;
|
||||
@ -2711,16 +2885,53 @@ $(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
|
||||
|
||||
push @m, q{
|
||||
PERL_HDRS = \
|
||||
$(PERL_INC)/EXTERN.h $(PERL_INC)/gv.h $(PERL_INC)/pp.h \
|
||||
$(PERL_INC)/INTERN.h $(PERL_INC)/handy.h $(PERL_INC)/proto.h \
|
||||
$(PERL_INC)/XSUB.h $(PERL_INC)/hv.h $(PERL_INC)/regcomp.h \
|
||||
$(PERL_INC)/av.h $(PERL_INC)/keywords.h $(PERL_INC)/regexp.h \
|
||||
$(PERL_INC)/config.h $(PERL_INC)/mg.h $(PERL_INC)/scope.h \
|
||||
$(PERL_INC)/cop.h $(PERL_INC)/op.h $(PERL_INC)/sv.h \
|
||||
$(PERL_INC)/cv.h $(PERL_INC)/opcode.h $(PERL_INC)/unixish.h \
|
||||
$(PERL_INC)/dosish.h $(PERL_INC)/patchlevel.h $(PERL_INC)/util.h \
|
||||
$(PERL_INC)/embed.h $(PERL_INC)/perl.h $(PERL_INC)/iperlsys.h \
|
||||
$(PERL_INC)/form.h $(PERL_INC)/perly.h
|
||||
$(PERL_INC)/EXTERN.h \
|
||||
$(PERL_INC)/INTERN.h \
|
||||
$(PERL_INC)/XSUB.h \
|
||||
$(PERL_INC)/av.h \
|
||||
$(PERL_INC)/cc_runtime.h \
|
||||
$(PERL_INC)/config.h \
|
||||
$(PERL_INC)/cop.h \
|
||||
$(PERL_INC)/cv.h \
|
||||
$(PERL_INC)/dosish.h \
|
||||
$(PERL_INC)/embed.h \
|
||||
$(PERL_INC)/embedvar.h \
|
||||
$(PERL_INC)/fakethr.h \
|
||||
$(PERL_INC)/form.h \
|
||||
$(PERL_INC)/gv.h \
|
||||
$(PERL_INC)/handy.h \
|
||||
$(PERL_INC)/hv.h \
|
||||
$(PERL_INC)/intrpvar.h \
|
||||
$(PERL_INC)/iperlsys.h \
|
||||
$(PERL_INC)/keywords.h \
|
||||
$(PERL_INC)/mg.h \
|
||||
$(PERL_INC)/nostdio.h \
|
||||
$(PERL_INC)/objXSUB.h \
|
||||
$(PERL_INC)/op.h \
|
||||
$(PERL_INC)/opcode.h \
|
||||
$(PERL_INC)/opnames.h \
|
||||
$(PERL_INC)/patchlevel.h \
|
||||
$(PERL_INC)/perl.h \
|
||||
$(PERL_INC)/perlapi.h \
|
||||
$(PERL_INC)/perlio.h \
|
||||
$(PERL_INC)/perlsdio.h \
|
||||
$(PERL_INC)/perlsfio.h \
|
||||
$(PERL_INC)/perlvars.h \
|
||||
$(PERL_INC)/perly.h \
|
||||
$(PERL_INC)/pp.h \
|
||||
$(PERL_INC)/pp_proto.h \
|
||||
$(PERL_INC)/proto.h \
|
||||
$(PERL_INC)/regcomp.h \
|
||||
$(PERL_INC)/regexp.h \
|
||||
$(PERL_INC)/regnodes.h \
|
||||
$(PERL_INC)/scope.h \
|
||||
$(PERL_INC)/sv.h \
|
||||
$(PERL_INC)/thrdvar.h \
|
||||
$(PERL_INC)/thread.h \
|
||||
$(PERL_INC)/unixish.h \
|
||||
$(PERL_INC)/utf8.h \
|
||||
$(PERL_INC)/util.h \
|
||||
$(PERL_INC)/warnings.h
|
||||
|
||||
$(OBJECT) : $(PERL_HDRS)
|
||||
} if $self->{OBJECT};
|
||||
@ -2884,7 +3095,7 @@ sub prefixify {
|
||||
my($self,$var,$sprefix,$rprefix) = @_;
|
||||
$self->{uc $var} ||= $Config{lc $var};
|
||||
$self->{uc $var} = VMS::Filespec::unixpath($self->{uc $var}) if $Is_VMS;
|
||||
$self->{uc $var} =~ s/\Q$sprefix\E/$rprefix/;
|
||||
$self->{uc $var} =~ s/\Q$sprefix\E/$rprefix/s;
|
||||
}
|
||||
|
||||
=item processPL (o)
|
||||
@ -2928,7 +3139,9 @@ sub realclean {
|
||||
realclean purge :: clean
|
||||
');
|
||||
# realclean subdirectories first (already cleaned)
|
||||
my $sub = "\t-cd %s && \$(TEST_F) %s && \$(MAKE) %s realclean\n";
|
||||
my $sub = ($Is_Win32 && Win32::IsWin95()) ?
|
||||
"\tcd %s\n\t\$(TEST_F) %s\n\t\$(MAKE) %s realclean\n\tcd ..\n" :
|
||||
"\t-cd %s && \$(TEST_F) %s && \$(MAKE) %s realclean\n";
|
||||
foreach(@{$self->{DIR}}){
|
||||
push(@m, sprintf($sub,$_,"$self->{MAKEFILE}.old","-f $self->{MAKEFILE}.old"));
|
||||
push(@m, sprintf($sub,$_,"$self->{MAKEFILE}",''));
|
||||
@ -3006,9 +3219,18 @@ END
|
||||
# then copy that to $(INST_STATIC) and add $(OBJECT) into it.
|
||||
push(@m, "\t$self->{CP} \$(MYEXTLIB) \$\@\n") if $self->{MYEXTLIB};
|
||||
|
||||
my $ar;
|
||||
if (exists $self->{FULL_AR} && -x $self->{FULL_AR}) {
|
||||
# Prefer the absolute pathed ar if available so that PATH
|
||||
# doesn't confuse us. Perl itself is built with the full_ar.
|
||||
$ar = 'FULL_AR';
|
||||
} else {
|
||||
$ar = 'AR';
|
||||
}
|
||||
push @m,
|
||||
q{ $(AR) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@
|
||||
$(CHMOD) $(PERM_RWX) $@
|
||||
"\t\$($ar) ".'$(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@'."\n";
|
||||
push @m,
|
||||
q{ $(CHMOD) $(PERM_RWX) $@
|
||||
}.$self->{NOECHO}.q{echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)/extralibs.ld
|
||||
};
|
||||
# Old mechanism - still available:
|
||||
@ -3072,12 +3294,25 @@ Helper subroutine for subdirs
|
||||
sub subdir_x {
|
||||
my($self, $subdir) = @_;
|
||||
my(@m);
|
||||
qq{
|
||||
if ($Is_Win32 && Win32::IsWin95()) {
|
||||
# XXX: dmake-specific, like rest of Win95 port
|
||||
return <<EOT;
|
||||
subdirs ::
|
||||
@[
|
||||
cd $subdir
|
||||
\$(MAKE) all \$(PASTHRU)
|
||||
cd ..
|
||||
]
|
||||
EOT
|
||||
}
|
||||
else {
|
||||
return <<EOT;
|
||||
|
||||
subdirs ::
|
||||
$self->{NOECHO}cd $subdir && \$(MAKE) all \$(PASTHRU)
|
||||
|
||||
};
|
||||
EOT
|
||||
}
|
||||
}
|
||||
|
||||
=item subdirs (o)
|
||||
@ -3322,13 +3557,13 @@ sub tool_xsubpp {
|
||||
}
|
||||
}
|
||||
|
||||
my $xsubpp = $self->{CAPI} ? "xsubpp -object_capi" : "xsubpp";
|
||||
my $xsubpp = "xsubpp";
|
||||
|
||||
return qq{
|
||||
XSUBPPDIR = $xsdir
|
||||
XSUBPP = \$(XSUBPPDIR)/$xsubpp
|
||||
XSPROTOARG = $self->{XSPROTOARG}
|
||||
XSUBPPDEPS = @tmdeps
|
||||
XSUBPPDEPS = @tmdeps \$(XSUBPP)
|
||||
XSUBPPARGS = @tmargs
|
||||
};
|
||||
};
|
||||
@ -3404,7 +3639,7 @@ sub top_targets {
|
||||
';
|
||||
|
||||
push @m, '
|
||||
all :: pure_all manifypods
|
||||
all :: pure_all htmlifypods manifypods
|
||||
'.$self->{NOECHO}.'$(NOOP)
|
||||
'
|
||||
unless $self->{SKIPHASH}{'all'};
|
||||
@ -3426,13 +3661,25 @@ config :: $(INST_AUTODIR)/.exists
|
||||
'.$self->{NOECHO}.'$(NOOP)
|
||||
';
|
||||
|
||||
push @m, qq{
|
||||
config :: Version_check
|
||||
push @m, $self->dir_target(qw[$(INST_AUTODIR) $(INST_LIBDIR) $(INST_ARCHAUTODIR)]);
|
||||
|
||||
if (%{$self->{HTMLLIBPODS}}) {
|
||||
push @m, qq[
|
||||
config :: \$(INST_HTMLLIBDIR)/.exists
|
||||
$self->{NOECHO}\$(NOOP)
|
||||
|
||||
} unless $self->{PARENT} or ($self->{PERL_SRC} && $self->{INSTALLDIRS} eq "perl") or $self->{NO_VC};
|
||||
];
|
||||
push @m, $self->dir_target(qw[$(INST_HTMLLIBDIR)]);
|
||||
}
|
||||
|
||||
push @m, $self->dir_target(qw[$(INST_AUTODIR) $(INST_LIBDIR) $(INST_ARCHAUTODIR)]);
|
||||
if (%{$self->{HTMLSCRIPTPODS}}) {
|
||||
push @m, qq[
|
||||
config :: \$(INST_HTMLSCRIPTDIR)/.exists
|
||||
$self->{NOECHO}\$(NOOP)
|
||||
|
||||
];
|
||||
push @m, $self->dir_target(qw[$(INST_HTMLSCRIPTDIR)]);
|
||||
}
|
||||
|
||||
if (%{$self->{MAN1PODS}}) {
|
||||
push @m, qq[
|
||||
@ -3496,7 +3743,7 @@ sub xs_c {
|
||||
return '' unless $self->needs_linking();
|
||||
'
|
||||
.xs.c:
|
||||
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.c
|
||||
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
|
||||
';
|
||||
}
|
||||
|
||||
@ -3511,7 +3758,7 @@ sub xs_cpp {
|
||||
return '' unless $self->needs_linking();
|
||||
'
|
||||
.xs.cpp:
|
||||
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp
|
||||
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.cpp
|
||||
';
|
||||
}
|
||||
|
||||
@ -3527,7 +3774,7 @@ sub xs_o { # many makes are too dumb to use xs_c then c_o
|
||||
return '' unless $self->needs_linking();
|
||||
'
|
||||
.xs$(OBJ_EXT):
|
||||
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.c
|
||||
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
|
||||
$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
|
||||
';
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ BEGIN {require 5.002;} # MakeMaker 5.17 was the last MakeMaker that was compatib
|
||||
|
||||
package ExtUtils::MakeMaker;
|
||||
|
||||
$VERSION = "5.4302";
|
||||
$VERSION = "5.45";
|
||||
$Version_OK = "5.17"; # Makefiles older than $Version_OK will die
|
||||
# (Will be checked from MakeMaker version 4.13 onwards)
|
||||
($Revision = substr(q$Revision: 1.222 $, 10)) =~ s/\s+$//;
|
||||
@ -19,7 +19,7 @@ use Carp ();
|
||||
use vars qw(
|
||||
|
||||
@ISA @EXPORT @EXPORT_OK $AUTOLOAD
|
||||
$ISA_TTY $Is_Mac $Is_OS2 $Is_VMS $Revision $Setup_done
|
||||
$ISA_TTY $Is_Mac $Is_OS2 $Is_VMS $Revision
|
||||
$VERSION $Verbose $Version_OK %Config %Keep_after_flush
|
||||
%MM_Sections %Prepend_dot_dot %Recognized_Att_Keys
|
||||
@Get_from_Config @MM_Sections @Overridable @Parent
|
||||
@ -72,6 +72,7 @@ $Is_VMS = $^O eq 'VMS';
|
||||
$Is_OS2 = $^O eq 'os2';
|
||||
$Is_Mac = $^O eq 'MacOS';
|
||||
$Is_Win32 = $^O eq 'MSWin32';
|
||||
$Is_Cygwin= $^O eq 'cygwin';
|
||||
|
||||
require ExtUtils::MM_Unix;
|
||||
|
||||
@ -88,36 +89,15 @@ if ($Is_Mac) {
|
||||
if ($Is_Win32) {
|
||||
require ExtUtils::MM_Win32;
|
||||
}
|
||||
|
||||
# The SelfLoader would bring a lot of overhead for MakeMaker, because
|
||||
# we know for sure we will use most of the autoloaded functions once
|
||||
# we have to use one of them. So we write our own loader
|
||||
|
||||
sub AUTOLOAD {
|
||||
my $code;
|
||||
if (defined fileno(DATA)) {
|
||||
my $fh = select DATA;
|
||||
my $o = $/; # For future reads from the file.
|
||||
$/ = "\n__END__\n";
|
||||
$code = <DATA>;
|
||||
$/ = $o;
|
||||
select $fh;
|
||||
close DATA;
|
||||
eval $code;
|
||||
if ($@) {
|
||||
$@ =~ s/ at .*\n//;
|
||||
Carp::croak $@;
|
||||
}
|
||||
} else {
|
||||
warn "AUTOLOAD called unexpectedly for $AUTOLOAD";
|
||||
}
|
||||
defined(&$AUTOLOAD) or die "Myloader inconsistency error";
|
||||
goto &$AUTOLOAD;
|
||||
if ($Is_Cygwin) {
|
||||
require ExtUtils::MM_Cygwin;
|
||||
}
|
||||
|
||||
# The only subroutine we do not SelfLoad is Version_Check because it's
|
||||
# called so often. Loading this minimum still requires 1.2 secs on my
|
||||
# Indy :-(
|
||||
full_setup();
|
||||
|
||||
# The use of the Version_check target has been dropped between perl
|
||||
# 5.5.63 and 5.5.64. We must keep the subroutine for a while so that
|
||||
# old Makefiles can satisfy the Version_check target.
|
||||
|
||||
sub Version_check {
|
||||
my($checkversion) = @_;
|
||||
@ -138,38 +118,10 @@ sub warnhandler {
|
||||
warn @_;
|
||||
}
|
||||
|
||||
sub ExtUtils::MakeMaker::eval_in_subdirs ;
|
||||
sub ExtUtils::MakeMaker::eval_in_x ;
|
||||
sub ExtUtils::MakeMaker::full_setup ;
|
||||
sub ExtUtils::MakeMaker::writeMakefile ;
|
||||
sub ExtUtils::MakeMaker::new ;
|
||||
sub ExtUtils::MakeMaker::check_manifest ;
|
||||
sub ExtUtils::MakeMaker::parse_args ;
|
||||
sub ExtUtils::MakeMaker::check_hints ;
|
||||
sub ExtUtils::MakeMaker::mv_all_methods ;
|
||||
sub ExtUtils::MakeMaker::skipcheck ;
|
||||
sub ExtUtils::MakeMaker::flush ;
|
||||
sub ExtUtils::MakeMaker::mkbootstrap ;
|
||||
sub ExtUtils::MakeMaker::mksymlists ;
|
||||
sub ExtUtils::MakeMaker::neatvalue ;
|
||||
sub ExtUtils::MakeMaker::selfdocument ;
|
||||
sub ExtUtils::MakeMaker::WriteMakefile ;
|
||||
sub ExtUtils::MakeMaker::prompt ($;$) ;
|
||||
|
||||
1;
|
||||
|
||||
__DATA__
|
||||
|
||||
package ExtUtils::MakeMaker;
|
||||
|
||||
sub WriteMakefile {
|
||||
Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
|
||||
local $SIG{__WARN__} = \&warnhandler;
|
||||
|
||||
unless ($Setup_done++){
|
||||
full_setup();
|
||||
undef &ExtUtils::MakeMaker::full_setup; #safe memory
|
||||
}
|
||||
my %att = @_;
|
||||
MM->new(\%att)->flush;
|
||||
}
|
||||
@ -230,7 +182,6 @@ sub eval_in_x {
|
||||
|
||||
sub full_setup {
|
||||
$Verbose ||= 0;
|
||||
$^W=1;
|
||||
|
||||
# package name for the classes into which the first object will be blessed
|
||||
$PACKNAME = "PACK000";
|
||||
@ -239,15 +190,19 @@ sub full_setup {
|
||||
|
||||
AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
|
||||
C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
|
||||
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FUNCLIST H IMPORTS
|
||||
INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLMAN1DIR
|
||||
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FUNCLIST H
|
||||
HTMLLIBPODS HTMLSCRIPTPOD IMPORTS
|
||||
INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLHTMLPRIVLIBDIR
|
||||
INSTALLHTMLSCRIPTDIR INSTALLHTMLSITELIBDIR INSTALLMAN1DIR
|
||||
INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
|
||||
INSTALLSITELIB INST_ARCHLIB INST_BIN INST_EXE INST_LIB
|
||||
INST_HTMLLIBDIR INST_HTMLSCRIPTDIR
|
||||
INST_MAN1DIR INST_MAN3DIR INST_SCRIPT LDFROM LIB LIBPERL_A LIBS
|
||||
LINKTYPE MAKEAPERL MAKEFILE MAN1PODS MAN3PODS MAP_TARGET MYEXTLIB
|
||||
PERL_MALLOC_OK
|
||||
NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC
|
||||
PERL_ARCHLIB PERL_LIB PERL_SRC PERM_RW PERM_RWX
|
||||
PL_FILES PM PMLIBDIRS PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREFIX
|
||||
PL_FILES PM PMLIBDIRS POLLUTE PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREFIX
|
||||
PREREQ_PM SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
|
||||
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
|
||||
tool_autosplit
|
||||
@ -274,7 +229,8 @@ sub full_setup {
|
||||
pasthru
|
||||
|
||||
c_o xs_c xs_o top_targets linkext dlsyms dynamic dynamic_bs
|
||||
dynamic_lib static static_lib manifypods processPL installbin subdirs
|
||||
dynamic_lib static static_lib htmlifypods manifypods processPL
|
||||
installbin subdirs
|
||||
clean realclean dist_basics dist_core dist_dir dist_test dist_ci
|
||||
install force perldepend makefile staticmake test ppd
|
||||
|
||||
@ -305,7 +261,8 @@ sub full_setup {
|
||||
@Get_from_Config =
|
||||
qw(
|
||||
ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc
|
||||
lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so exe_ext
|
||||
lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so
|
||||
exe_ext full_ar
|
||||
);
|
||||
|
||||
my $item;
|
||||
@ -326,8 +283,9 @@ sub full_setup {
|
||||
%Prepend_dot_dot =
|
||||
qw(
|
||||
|
||||
INST_BIN 1 INST_EXE 1 INST_LIB 1 INST_ARCHLIB 1 INST_SCRIPT
|
||||
1 MAP_TARGET 1 INST_MAN1DIR 1 INST_MAN3DIR 1 PERL_SRC 1
|
||||
INST_BIN 1 INST_EXE 1 INST_LIB 1 INST_ARCHLIB 1 INST_SCRIPT 1
|
||||
MAP_TARGET 1 INST_HTMLLIBDIR 1 INST_HTMLSCRIPTDIR 1
|
||||
INST_MAN1DIR 1 INST_MAN3DIR 1 PERL_SRC 1
|
||||
|
||||
);
|
||||
|
||||
@ -374,9 +332,13 @@ sub ExtUtils::MakeMaker::new {
|
||||
|
||||
my($prereq);
|
||||
foreach $prereq (sort keys %{$self->{PREREQ_PM}}) {
|
||||
my $eval = "use $prereq $self->{PREREQ_PM}->{$prereq}";
|
||||
my $eval = "require $prereq";
|
||||
eval $eval;
|
||||
if ($@){
|
||||
|
||||
if ($@) {
|
||||
warn "Warning: prerequisite $prereq failed to load: $@";
|
||||
}
|
||||
elsif ($prereq->VERSION < $self->{PREREQ_PM}->{$prereq} ){
|
||||
warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not found";
|
||||
# Why is/was this 'delete' here? We need PREREQ_PM later to make PPDs.
|
||||
# } else {
|
||||
@ -442,11 +404,13 @@ sub ExtUtils::MakeMaker::new {
|
||||
}
|
||||
if ($self->{PARENT}) {
|
||||
$self->{PARENT}->{CHILDREN}->{$newclass} = $self;
|
||||
if (exists $self->{PARENT}->{CAPI}
|
||||
and not exists $self->{CAPI})
|
||||
{
|
||||
# inherit, but only if already unspecified
|
||||
$self->{CAPI} = $self->{PARENT}->{CAPI};
|
||||
foreach my $opt (qw(CAPI POLLUTE)) {
|
||||
if (exists $self->{PARENT}->{$opt}
|
||||
and not exists $self->{$opt})
|
||||
{
|
||||
# inherit, but only if already unspecified
|
||||
$self->{$opt} = $self->{PARENT}->{$opt};
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -472,7 +436,7 @@ sub ExtUtils::MakeMaker::new {
|
||||
else {
|
||||
$pthinks =~ s!/Config\.pm$!!; $pthinks =~ s!.*/!!;
|
||||
}
|
||||
print STDOUT <<END;
|
||||
print STDOUT <<END unless $self->{UNINSTALLED_PERL};
|
||||
Your perl and your Config.pm seem to have different ideas about the architecture
|
||||
they are running on.
|
||||
Perl thinks: [$pthinks]
|
||||
@ -974,26 +938,29 @@ want to specify some other option, set C<TESTDB_SW> variable:
|
||||
=head2 make install
|
||||
|
||||
make alone puts all relevant files into directories that are named by
|
||||
the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR, and
|
||||
INST_MAN3DIR. All these default to something below ./blib if you are
|
||||
I<not> building below the perl source directory. If you I<are>
|
||||
building below the perl source, INST_LIB and INST_ARCHLIB default to
|
||||
../../lib, and INST_SCRIPT is not defined.
|
||||
the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_HTMLLIBDIR,
|
||||
INST_HTMLSCRIPTDIR, INST_MAN1DIR, and INST_MAN3DIR. All these default
|
||||
to something below ./blib if you are I<not> building below the perl
|
||||
source directory. If you I<are> building below the perl source,
|
||||
INST_LIB and INST_ARCHLIB default to ../../lib, and INST_SCRIPT is not
|
||||
defined.
|
||||
|
||||
The I<install> target of the generated Makefile copies the files found
|
||||
below each of the INST_* directories to their INSTALL*
|
||||
counterparts. Which counterparts are chosen depends on the setting of
|
||||
INSTALLDIRS according to the following table:
|
||||
|
||||
INSTALLDIRS set to
|
||||
perl site
|
||||
INSTALLDIRS set to
|
||||
perl site
|
||||
|
||||
INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH
|
||||
INST_LIB INSTALLPRIVLIB INSTALLSITELIB
|
||||
INST_BIN INSTALLBIN
|
||||
INST_SCRIPT INSTALLSCRIPT
|
||||
INST_MAN1DIR INSTALLMAN1DIR
|
||||
INST_MAN3DIR INSTALLMAN3DIR
|
||||
INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH
|
||||
INST_LIB INSTALLPRIVLIB INSTALLSITELIB
|
||||
INST_HTMLLIBDIR INSTALLHTMLPRIVLIBDIR INSTALLHTMLSITELIBDIR
|
||||
INST_HTMLSCRIPTDIR INSTALLHTMLSCRIPTDIR
|
||||
INST_BIN INSTALLBIN
|
||||
INST_SCRIPT INSTALLSCRIPT
|
||||
INST_MAN1DIR INSTALLMAN1DIR
|
||||
INST_MAN3DIR INSTALLMAN3DIR
|
||||
|
||||
The INSTALL... macros in turn default to their %Config
|
||||
($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
|
||||
@ -1170,7 +1137,7 @@ MakeMaker gives you much more freedom than needed to configure
|
||||
internal variables and get different results. It is worth to mention,
|
||||
that make(1) also lets you configure most of the variables that are
|
||||
used in the Makefile. But in the majority of situations this will not
|
||||
be necessary, and should only be done, if the author of a package
|
||||
be necessary, and should only be done if the author of a package
|
||||
recommends it (or you know what you're doing).
|
||||
|
||||
=head2 Using Attributes and Parameters
|
||||
@ -1214,6 +1181,9 @@ currently used by MakeMaker but may be handy in Makefile.PLs.
|
||||
|
||||
=item CAPI
|
||||
|
||||
[This attribute is obsolete in Perl 5.6. PERL_OBJECT builds are C-compatible
|
||||
by default.]
|
||||
|
||||
Switch to force usage of the Perl C API even when compiling for PERL_OBJECT.
|
||||
|
||||
Note that this attribute is passed through to any recursive build,
|
||||
@ -1327,6 +1297,20 @@ names are passed through unaltered to the linker options file.
|
||||
|
||||
Ref to array of *.h file names. Similar to C.
|
||||
|
||||
=item HTMLLIBPODS
|
||||
|
||||
Hashref of .pm and .pod files. MakeMaker will default this to all
|
||||
.pod and any .pm files that include POD directives. The files listed
|
||||
here will be converted to HTML format and installed as was requested
|
||||
at Configure time.
|
||||
|
||||
=item HTMLSCRIPTPODS
|
||||
|
||||
Hashref of pod-containing files. MakeMaker will default this to all
|
||||
EXE_FILES files that include POD directives. The files listed
|
||||
here will be converted to HTML format and installed as was requested
|
||||
at Configure time.
|
||||
|
||||
=item IMPORTS
|
||||
|
||||
This attribute is used to specify names to be imported into the
|
||||
@ -1367,6 +1351,22 @@ choose: installprivlib and installarchlib versus installsitelib and
|
||||
installsitearch. The first pair is chosen with INSTALLDIRS=perl, the
|
||||
second with INSTALLDIRS=site. Default is site.
|
||||
|
||||
=item INSTALLHTMLPRIVLIBDIR
|
||||
|
||||
This directory gets the HTML pages at 'make install' time. Defaults to
|
||||
$Config{installhtmlprivlibdir}.
|
||||
|
||||
=item INSTALLHTMLSCRIPTDIR
|
||||
|
||||
This directory gets the HTML pages at 'make install' time. Defaults to
|
||||
$Config{installhtmlscriptdir}.
|
||||
|
||||
=item INSTALLHTMLSITELIBDIR
|
||||
|
||||
This directory gets the HTML pages at 'make install' time. Defaults to
|
||||
$Config{installhtmlsitelibdir}.
|
||||
|
||||
|
||||
=item INSTALLMAN1DIR
|
||||
|
||||
This directory gets the man pages at 'make install' time. Defaults to
|
||||
@ -1416,6 +1416,14 @@ need to use it.
|
||||
Directory where we put library files of this extension while building
|
||||
it.
|
||||
|
||||
=item INST_HTMLLIBDIR
|
||||
|
||||
Directory to hold the man pages in HTML format at 'make' time
|
||||
|
||||
=item INST_HTMLSCRIPTDIR
|
||||
|
||||
Directory to hold the man pages in HTML format at 'make' time
|
||||
|
||||
=item INST_MAN1DIR
|
||||
|
||||
Directory to hold the man pages at 'make' time
|
||||
@ -1427,10 +1435,38 @@ Directory to hold the man pages at 'make' time
|
||||
=item INST_SCRIPT
|
||||
|
||||
Directory, where executable files should be installed during
|
||||
'make'. Defaults to "./blib/bin", just to have a dummy location during
|
||||
'make'. Defaults to "./blib/script", just to have a dummy location during
|
||||
testing. make install will copy the files in INST_SCRIPT to
|
||||
INSTALLSCRIPT.
|
||||
|
||||
=item PERL_MALLOC_OK
|
||||
|
||||
defaults to 0. Should be set to TRUE if the extension can work with
|
||||
the memory allocation routines substituted by the Perl malloc() subsystem.
|
||||
This should be applicable to most extensions with exceptions of those
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
with bugs in memory allocations which are caught by Perl's malloc();
|
||||
|
||||
=item *
|
||||
|
||||
which interact with the memory allocator in other ways than via
|
||||
malloc(), realloc(), free(), calloc(), sbrk() and brk();
|
||||
|
||||
=item *
|
||||
|
||||
which rely on special alignment which is not provided by Perl's malloc().
|
||||
|
||||
=back
|
||||
|
||||
B<NOTE.> Negligence to set this flag in I<any one> of loaded extension
|
||||
nullifies many advantages of Perl's malloc(), such as better usage of
|
||||
system resources, error detection, memory usage reporting, catchable failure
|
||||
of memory allocations, etc.
|
||||
|
||||
=item LDFROM
|
||||
|
||||
defaults to "$(OBJECT)" and is used in the ld command to specify
|
||||
@ -1516,9 +1552,9 @@ Makefile.PL.
|
||||
|
||||
=item NEEDS_LINKING
|
||||
|
||||
MakeMaker will figure out, if an extension contains linkable code
|
||||
MakeMaker will figure out if an extension contains linkable code
|
||||
anywhere down the directory tree, and will set this variable
|
||||
accordingly, but you can speed it up a very little bit, if you define
|
||||
accordingly, but you can speed it up a very little bit if you define
|
||||
this boolean variable yourself.
|
||||
|
||||
=item NOECHO
|
||||
@ -1533,7 +1569,7 @@ Boolean. Attribute to inhibit descending into subdirectories.
|
||||
|
||||
=item NO_VC
|
||||
|
||||
In general any generated Makefile checks for the current version of
|
||||
In general, any generated Makefile checks for the current version of
|
||||
MakeMaker and the version the Makefile was built under. If NO_VC is
|
||||
set, the version check is neglected. Do not write this into your
|
||||
Makefile.PL, use it interactively instead.
|
||||
@ -1560,7 +1596,7 @@ to $(CC).
|
||||
|
||||
=item PERL_ARCHLIB
|
||||
|
||||
Same as above for architecture dependent files
|
||||
Same as above for architecture dependent files.
|
||||
|
||||
=item PERL_LIB
|
||||
|
||||
@ -1614,6 +1650,18 @@ they contain will be installed in the corresponding location in the
|
||||
library. A libscan() method can be used to alter the behaviour.
|
||||
Defining PM in the Makefile.PL will override PMLIBDIRS.
|
||||
|
||||
=item POLLUTE
|
||||
|
||||
Release 5.005 grandfathered old global symbol names by providing preprocessor
|
||||
macros for extension source compatibility. As of release 5.6, these
|
||||
preprocessor definitions are not available by default. The POLLUTE flag
|
||||
specifies that the old names should still be defined:
|
||||
|
||||
perl Makefile.PL POLLUTE=1
|
||||
|
||||
Please inform the module author if this is necessary to successfully install
|
||||
a module under 5.6 or later.
|
||||
|
||||
=item PPM_INSTALL_EXEC
|
||||
|
||||
Name of the executable used to run C<PPM_INSTALL_SCRIPT> below. (e.g. perl)
|
||||
@ -1642,8 +1690,8 @@ only check if any version is installed already.
|
||||
=item SKIP
|
||||
|
||||
Arryref. E.g. [qw(name1 name2)] skip (do not write) sections of the
|
||||
Makefile. Caution! Do not use the SKIP attribute for the neglectible
|
||||
speedup. It may seriously damage the resulting Makefile. Only use it,
|
||||
Makefile. Caution! Do not use the SKIP attribute for the negligible
|
||||
speedup. It may seriously damage the resulting Makefile. Only use it
|
||||
if you really need it.
|
||||
|
||||
=item TYPEMAPS
|
||||
@ -1766,7 +1814,7 @@ NB: Extensions that have nothing but *.pm files had to say
|
||||
{LINKTYPE => ''}
|
||||
|
||||
with Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
|
||||
can be deleted safely. MakeMaker recognizes, when there's nothing to
|
||||
can be deleted safely. MakeMaker recognizes when there's nothing to
|
||||
be linked.
|
||||
|
||||
=item macro
|
||||
@ -1777,9 +1825,13 @@ be linked.
|
||||
|
||||
{FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
|
||||
|
||||
=item test
|
||||
|
||||
{TESTS => 't/*.t'}
|
||||
|
||||
=item tool_autosplit
|
||||
|
||||
{MAXLEN =E<gt> 8}
|
||||
{MAXLEN => 8}
|
||||
|
||||
=back
|
||||
|
||||
@ -1865,7 +1917,7 @@ details)
|
||||
=item make distclean
|
||||
|
||||
does a realclean first and then the distcheck. Note that this is not
|
||||
needed to build a new distribution as long as you are sure, that the
|
||||
needed to build a new distribution as long as you are sure that the
|
||||
MANIFEST file is ok.
|
||||
|
||||
=item make manifest
|
||||
|
2073
contrib/perl5/pp.c
2073
contrib/perl5/pp.c
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/perl
|
||||
# $FreeBSD$
|
||||
|
||||
use Config;
|
||||
use File::Basename qw(basename dirname);
|
||||
@ -528,7 +529,7 @@ sub inc_dirs
|
||||
sub build_preamble_if_necessary
|
||||
{
|
||||
# Increment $VERSION every time this function is modified:
|
||||
my $VERSION = 1;
|
||||
my $VERSION = 2;
|
||||
my $preamble = "$Dest_dir/_h2ph_pre.ph";
|
||||
|
||||
# Can we skip building the preamble file?
|
||||
@ -556,6 +557,9 @@ sub build_preamble_if_necessary
|
||||
if ($define{$_} =~ /^\d+$/) {
|
||||
print PREAMBLE
|
||||
"unless (defined &$_) { sub $_() { $define{$_} } }\n\n";
|
||||
} elsif ($define{$_} =~ /^\w+$/) {
|
||||
print PREAMBLE
|
||||
"unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";
|
||||
} else {
|
||||
print PREAMBLE
|
||||
"unless (defined &$_) { sub $_() { \"",
|
||||
@ -576,8 +580,7 @@ sub _extract_cc_defines
|
||||
|
||||
# Split compiler pre-definitions into `key=value' pairs:
|
||||
foreach (split /\s+/, $allsymbols) {
|
||||
/(.*?)=(.*)/;
|
||||
$define{$1} = $2;
|
||||
/(.+?)=(.+)/ and $define{$1} = $2;
|
||||
|
||||
if ($opt_D) {
|
||||
print STDERR "$_: $1 -> $2\n";
|
||||
|
@ -1,8 +1,10 @@
|
||||
#!/usr/local/bin/perl
|
||||
# $FreeBSD$
|
||||
|
||||
use Config;
|
||||
use File::Basename qw(&basename &dirname);
|
||||
use Cwd;
|
||||
use File::Spec::Functions;
|
||||
|
||||
# List explicitly here the variables you want Configure to
|
||||
# generate. Metaconfig only looks for shell variables, so you
|
||||
@ -23,7 +25,8 @@ open OUT, ">$file" or die "Can't create $file: $!";
|
||||
|
||||
# extract patchlevel.h information
|
||||
|
||||
open PATCH_LEVEL, "<../patchlevel.h" or open PATCH_LEVEL, "<patchlevel.h" or die "Can't open patchlevel.h: $!";
|
||||
open PATCH_LEVEL, "<" . catfile(updir, "patchlevel.h") or open PATCH_LEVEL, "<patchlevel.h"
|
||||
or die "Can't open patchlevel.h: $!";
|
||||
|
||||
my $patchlevel_date = (stat PATCH_LEVEL)[9];
|
||||
|
||||
@ -35,8 +38,8 @@ my @patches;
|
||||
while (<PATCH_LEVEL>) {
|
||||
last if /^\s*}/;
|
||||
chomp;
|
||||
s/^\s+,?"?//;
|
||||
s/"?,?$//;
|
||||
s/^\s+,?\s*"?//;
|
||||
s/"?\s*,?$//;
|
||||
s/(['\\])/\\$1/g;
|
||||
push @patches, $_ unless $_ eq 'NULL';
|
||||
}
|
||||
@ -55,12 +58,14 @@ print "Extracting $file (with variable substitutions)\n";
|
||||
# In this section, perl variables will be expanded during extraction.
|
||||
# You can use $Config{...} to use Configure variables.
|
||||
|
||||
my $extract_version = sprintf("v%vd", $^V);
|
||||
|
||||
print OUT <<"!GROK!THIS!";
|
||||
$Config{startperl}
|
||||
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
|
||||
if \$running_under_some_shell;
|
||||
|
||||
my \$config_tag1 = '$] - $Config{cf_time}';
|
||||
my \$config_tag1 = '$extract_version - $Config{cf_time}';
|
||||
|
||||
my \$patchlevel_date = $patchlevel_date;
|
||||
my \$patch_tags = '$patch_tags';
|
||||
@ -74,6 +79,7 @@ my \@patches = (
|
||||
print OUT <<'!NO!SUBS!';
|
||||
|
||||
use Config;
|
||||
use File::Spec; # keep perlbug Perl 5.005 compatible
|
||||
use Getopt::Std;
|
||||
use strict;
|
||||
|
||||
@ -86,7 +92,7 @@ BEGIN {
|
||||
$::HaveUtil = ($@ eq "");
|
||||
};
|
||||
|
||||
my $Version = "1.26";
|
||||
my $Version = "1.28";
|
||||
|
||||
# Changed in 1.06 to skip Mail::Send and Mail::Util if not available.
|
||||
# Changed in 1.07 to see more sendmail execs, and added pipe output.
|
||||
@ -117,6 +123,8 @@ my $Version = "1.26";
|
||||
# Changed in 1.24 Added '-F<file>' to save report HVDS 98-07-01
|
||||
# Changed in 1.25 Warn on failure to open save file. HVDS 98-07-12
|
||||
# Changed in 1.26 Don't require -t STDIN for -ok. HVDS 98-07-15
|
||||
# Changed in 1.27 Added Mac OS and File::Spec support CNANDOR 99-07-27
|
||||
# Changed in 1.28 Additional questions for Perlbugtron RFOLEY 20.03.2000
|
||||
|
||||
# TODO: - Allow the user to re-name the file on mail failure, and
|
||||
# make sure failure (transmission-wise) of Mail::Send is
|
||||
@ -124,10 +132,12 @@ my $Version = "1.26";
|
||||
# - Test -b option
|
||||
|
||||
my( $file, $usefile, $cc, $address, $perlbug, $testaddress, $filename,
|
||||
$subject, $from, $verbose, $ed, $outfile,
|
||||
$subject, $from, $verbose, $ed, $outfile, $Is_MacOS, $category, $severity,
|
||||
$fh, $me, $Is_MSWin32, $Is_VMS, $msg, $body, $andcc, %REP, $ok);
|
||||
|
||||
my $config_tag2 = "$] - $Config{cf_time}";
|
||||
my $perl_version = $^V ? sprintf("v%vd", $^V) : $];
|
||||
|
||||
my $config_tag2 = "$perl_version - $Config{cf_time}";
|
||||
|
||||
Init();
|
||||
|
||||
@ -149,11 +159,43 @@ Send();
|
||||
|
||||
exit;
|
||||
|
||||
sub ask_for_alternatives {
|
||||
my $name = shift;
|
||||
my $default = shift;
|
||||
my @alts = @_;
|
||||
my $alt = "";
|
||||
paraprint <<EOF;
|
||||
Please pick a \u$name from the following:
|
||||
|
||||
@alts
|
||||
|
||||
EOF
|
||||
my $err = 0;
|
||||
my $joined_alts = join('|', @alts);
|
||||
do {
|
||||
if ($err++ > 5) {
|
||||
die "Invalid $name: aborting.\n";
|
||||
}
|
||||
print "Please enter a \u$name [$default]: ";
|
||||
$alt = <>;
|
||||
chomp $alt;
|
||||
if ($alt =~ /^\s*$/) {
|
||||
$alt = $default;
|
||||
}
|
||||
} while ($alt !~ /^($joined_alts)$/i);
|
||||
lc $alt;
|
||||
}
|
||||
|
||||
sub Init {
|
||||
# -------- Setup --------
|
||||
|
||||
$Is_MSWin32 = $^O eq 'MSWin32';
|
||||
$Is_VMS = $^O eq 'VMS';
|
||||
$Is_MacOS = $^O eq 'MacOS';
|
||||
|
||||
@ARGV = split m/\s+/,
|
||||
MacPerl::Ask('Provide command-line args here (-h for help):')
|
||||
if $Is_MacOS && $MacPerl::Version =~ /App/;
|
||||
|
||||
if (!getopts("dhva:s:b:f:F:r:e:SCc:to:n:")) { Help(); exit; };
|
||||
|
||||
@ -196,6 +238,7 @@ sub Init {
|
||||
$ed = $::opt_e || $ENV{VISUAL} || $ENV{EDITOR} || $ENV{EDIT}
|
||||
|| ($Is_VMS && "edit/tpu")
|
||||
|| ($Is_MSWin32 && "notepad")
|
||||
|| ($Is_MacOS && '')
|
||||
|| "vi";
|
||||
|
||||
# Not OK - provide build failure template by finessing OK report
|
||||
@ -232,8 +275,10 @@ EOF
|
||||
$::opt_C = 1; # don't send a copy to the local admin
|
||||
$::opt_s = 1; # we have a subject line
|
||||
$subject = ($::opt_n ? 'Not ' : '')
|
||||
. "OK: perl $] ${patch_tags}on"
|
||||
. "OK: perl $perl_version ${patch_tags}on"
|
||||
." $::Config{'archname'} $::Config{'osvers'} $subject";
|
||||
$category = "install";
|
||||
$severity = "none";
|
||||
$ok = 1;
|
||||
} else {
|
||||
Help();
|
||||
@ -255,6 +300,7 @@ EOF
|
||||
# My username
|
||||
$me = $Is_MSWin32 ? $ENV{'USERNAME'}
|
||||
: $^O eq 'os2' ? $ENV{'USER'} || $ENV{'LOGNAME'}
|
||||
: $Is_MacOS ? $ENV{'USER'}
|
||||
: eval { getpwuid($<) }; # May be missing
|
||||
|
||||
$from = $::Config{'cf_email'}
|
||||
@ -307,6 +353,13 @@ EOF
|
||||
my $guess;
|
||||
|
||||
$guess = $ENV{'REPLY-TO'} || $ENV{'REPLYTO'} || '';
|
||||
if ($Is_MacOS) {
|
||||
require Mac::InternetConfig;
|
||||
$guess = $Mac::InternetConfig::InternetConfig{
|
||||
Mac::InternetConfig::kICEmail()
|
||||
};
|
||||
}
|
||||
|
||||
unless ($guess) {
|
||||
my $domain;
|
||||
if ($::HaveUtil) {
|
||||
@ -415,6 +468,16 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
# Prompt for category of bug
|
||||
$category ||= ask_for_alternatives("category", "core",
|
||||
qw(core docs install
|
||||
library utilities));
|
||||
|
||||
# Prompt for severity of bug
|
||||
$severity ||= ask_for_alternatives("severity", "low",
|
||||
qw(critical high medium
|
||||
low wishlist none));
|
||||
|
||||
# Generate scratch file to edit report in
|
||||
$filename = filename();
|
||||
|
||||
@ -452,7 +515,7 @@ EOF
|
||||
|
||||
print REP <<EOF;
|
||||
This is a $reptype report for perl from $from,
|
||||
generated with the help of perlbug $Version running under perl $].
|
||||
generated with the help of perlbug $Version running under perl $perl_version.
|
||||
|
||||
EOF
|
||||
|
||||
@ -494,13 +557,19 @@ EOF
|
||||
sub Dump {
|
||||
local(*OUT) = @_;
|
||||
|
||||
print REP "\n---\n";
|
||||
print REP "This perlbug was built using Perl $config_tag1\n",
|
||||
print OUT <<EFF;
|
||||
---
|
||||
Flags:
|
||||
category=$category
|
||||
severity=$severity
|
||||
---
|
||||
EFF
|
||||
print OUT "This perlbug was built using Perl $config_tag1\n",
|
||||
"It is being executed now by Perl $config_tag2.\n\n"
|
||||
if $config_tag2 ne $config_tag1;
|
||||
|
||||
print OUT <<EOF;
|
||||
Site configuration information for perl $]:
|
||||
Site configuration information for perl $perl_version:
|
||||
|
||||
EOF
|
||||
if ($::Config{cf_by} and $::Config{cf_time}) {
|
||||
@ -516,7 +585,7 @@ EOF
|
||||
print OUT <<EOF;
|
||||
|
||||
---
|
||||
\@INC for perl $]:
|
||||
\@INC for perl $perl_version:
|
||||
EOF
|
||||
for my $i (@INC) {
|
||||
print OUT " $i\n";
|
||||
@ -525,18 +594,21 @@ EOF
|
||||
print OUT <<EOF;
|
||||
|
||||
---
|
||||
Environment for perl $]:
|
||||
Environment for perl $perl_version:
|
||||
EOF
|
||||
for my $env (sort
|
||||
(qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR LANGUAGE),
|
||||
grep /^(?:PERL|LC_)/, keys %ENV)
|
||||
) {
|
||||
my @env =
|
||||
qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR LANGUAGE);
|
||||
push @env, $Config{ldlibpthname} if $Config{ldlibpthname} ne '';
|
||||
push @env, grep /^(?:PERL|LC_|LANG)/, keys %ENV;
|
||||
my %env;
|
||||
@env{@env} = @env;
|
||||
for my $env (sort keys %env) {
|
||||
print OUT " $env",
|
||||
exists $ENV{$env} ? "=$ENV{$env}" : ' (unset)',
|
||||
"\n";
|
||||
}
|
||||
if ($verbose) {
|
||||
print OUT "\nComplete configuration data for perl $]:\n\n";
|
||||
print OUT "\nComplete configuration data for perl $perl_version:\n\n";
|
||||
my $value;
|
||||
foreach (sort keys %::Config) {
|
||||
$value = $::Config{$_};
|
||||
@ -559,7 +631,15 @@ EOF
|
||||
}
|
||||
|
||||
tryagain:
|
||||
my $sts = system("$ed $filename");
|
||||
my $sts = system("$ed $filename") unless $Is_MacOS;
|
||||
if ($Is_MacOS) {
|
||||
require ExtUtils::MakeMaker;
|
||||
ExtUtils::MM_MacOS::launch_file($filename);
|
||||
paraprint <<EOF;
|
||||
Press Enter when done.
|
||||
EOF
|
||||
scalar <>;
|
||||
}
|
||||
if ($sts) {
|
||||
paraprint <<EOF;
|
||||
The editor you chose (`$ed') could apparently not be run!
|
||||
@ -783,7 +863,7 @@ Options:
|
||||
-v Include Verbose configuration data in the report
|
||||
-f File containing the body of the report. Use this to
|
||||
quickly send a prepared message.
|
||||
-F File to output the resulting mail message to, instead of mailing.
|
||||
-F File to output the resulting mail message to, instead of mailing.
|
||||
-S Send without asking for confirmation.
|
||||
-a Address to send the report to. Defaults to `$address'.
|
||||
-c Address to send copy of report to. Defaults to `$cc'.
|
||||
@ -796,7 +876,7 @@ Options:
|
||||
this if you don't give it here.
|
||||
-e Editor to use.
|
||||
-t Test mode. The target address defaults to `$testaddress'.
|
||||
-d Data mode (the default if you redirect or pipe output.)
|
||||
-d Data mode (the default if you redirect or pipe output.)
|
||||
This prints out your configuration data, without mailing
|
||||
anything. You can use this with -v to get more complete data.
|
||||
-ok Report successful build on this system to perl porters
|
||||
@ -815,11 +895,12 @@ EOF
|
||||
sub filename {
|
||||
my $dir = $Is_VMS ? 'sys$scratch:'
|
||||
: ($Is_MSWin32 && $ENV{'TEMP'}) ? $ENV{'TEMP'}
|
||||
: '/tmp/';
|
||||
: $Is_MacOS ? $ENV{'TMPDIR'}
|
||||
: '/tmp';
|
||||
$filename = "bugrep0$$";
|
||||
$dir .= "\\" if $Is_MSWin32 and $dir !~ m|[\\/]$|;
|
||||
$filename++ while -e "$dir$filename";
|
||||
$filename = "$dir$filename";
|
||||
# $dir .= "\\" if $Is_MSWin32 and $dir !~ m|[\\/]$|;
|
||||
$filename++ while -e File::Spec->catfile($dir, $filename);
|
||||
$filename = File::Spec->catfile($dir, $filename);
|
||||
}
|
||||
|
||||
sub paraprint {
|
||||
@ -878,7 +959,7 @@ this checklist:
|
||||
|
||||
=over 4
|
||||
|
||||
=item What version of perl you are running?
|
||||
=item What version of Perl you are running?
|
||||
|
||||
Type C<perl -v> at the command line to find out.
|
||||
|
||||
@ -886,16 +967,16 @@ Type C<perl -v> at the command line to find out.
|
||||
|
||||
Look at http://www.perl.com/ to find out. If it is not the latest
|
||||
released version, get that one and see whether your bug has been
|
||||
fixed. Note that bug reports about old versions of perl, especially
|
||||
fixed. Note that bug reports about old versions of Perl, especially
|
||||
those prior to the 5.0 release, are likely to fall upon deaf ears.
|
||||
You are on your own if you continue to use perl1 .. perl4.
|
||||
|
||||
=item Are you sure what you have is a bug?
|
||||
|
||||
A significant number of the bug reports we get turn out to be documented
|
||||
features in perl. Make sure the behavior you are witnessing doesn't fall
|
||||
features in Perl. Make sure the behavior you are witnessing doesn't fall
|
||||
under that category, by glancing through the documentation that comes
|
||||
with perl (we'll admit this is no mean task, given the sheer volume of
|
||||
with Perl (we'll admit this is no mean task, given the sheer volume of
|
||||
it all, but at least have a look at the sections that I<seem> relevant).
|
||||
|
||||
Be aware of the familiar traps that perl programmers of various hues
|
||||
@ -905,10 +986,10 @@ Check in L<perldiag> to see what any Perl error message(s) mean.
|
||||
If message isn't in perldiag, it probably isn't generated by Perl.
|
||||
Consult your operating system documentation instead.
|
||||
|
||||
If you are on a non-UNIX platform check also L<perlport>, some
|
||||
features may not be implemented or work differently.
|
||||
If you are on a non-UNIX platform check also L<perlport>, as some
|
||||
features may be unimplemented or work differently.
|
||||
|
||||
Try to study the problem under the perl debugger, if necessary.
|
||||
Try to study the problem under the Perl debugger, if necessary.
|
||||
See L<perldebug>.
|
||||
|
||||
=item Do you have a proper test case?
|
||||
@ -930,7 +1011,7 @@ If you get a core dump (or equivalent), you may use a debugger
|
||||
(B<dbx>, B<gdb>, etc) to produce a stack trace to include in the bug
|
||||
report. NOTE: unless your Perl has been compiled with debug info
|
||||
(often B<-g>), the stack trace is likely to be somewhat hard to use
|
||||
because it will most probably contain only the function names, not
|
||||
because it will most probably contain only the function names and not
|
||||
their arguments. If possible, recompile your Perl with debug info and
|
||||
reproduce the dump and the stack trace.
|
||||
|
||||
@ -938,8 +1019,8 @@ reproduce the dump and the stack trace.
|
||||
|
||||
The easier it is to understand a reproducible bug, the more likely it
|
||||
will be fixed. Anything you can provide by way of insight into the
|
||||
problem helps a great deal. In other words, try to analyse the
|
||||
problem to the extent you feel qualified and report your discoveries.
|
||||
problem helps a great deal. In other words, try to analyze the
|
||||
problem (to the extent you can) and report your discoveries.
|
||||
|
||||
=item Can you fix the bug yourself?
|
||||
|
||||
@ -973,14 +1054,14 @@ C<perlbug> at all on your system, be sure to include the entire output
|
||||
produced by running C<perl -V> (note the uppercase V).
|
||||
|
||||
Whether you use C<perlbug> or send the email manually, please make
|
||||
your subject informative. "a bug" not informative. Neither is "perl
|
||||
crashes" nor "HELP!!!", these all are null information. A compact
|
||||
description of what's wrong is fine.
|
||||
your Subject line informative. "a bug" not informative. Neither is
|
||||
"perl crashes" nor "HELP!!!". These don't help.
|
||||
A compact description of what's wrong is fine.
|
||||
|
||||
=back
|
||||
|
||||
Having done your bit, please be prepared to wait, to be told the bug
|
||||
is in your code, or even to get no reply at all. The perl maintainers
|
||||
is in your code, or even to get no reply at all. The Perl maintainers
|
||||
are busy folks, so if your problem is a small one or if it is difficult
|
||||
to understand or already known, they may not respond with a personal reply.
|
||||
If it is important to you that your bug be fixed, do monitor the
|
||||
@ -1091,12 +1172,14 @@ Include verbose configuration data in the report.
|
||||
=head1 AUTHORS
|
||||
|
||||
Kenneth Albanowski (E<lt>kjahds@kjahds.comE<gt>), subsequently I<doc>tored
|
||||
by Gurusamy Sarathy (E<lt>gsar@umich.eduE<gt>), Tom Christiansen
|
||||
by Gurusamy Sarathy (E<lt>gsar@activestate.comE<gt>), Tom Christiansen
|
||||
(E<lt>tchrist@perl.comE<gt>), Nathan Torkington (E<lt>gnat@frii.comE<gt>),
|
||||
Charles F. Randall (E<lt>cfr@pobox.comE<gt>), Mike Guy
|
||||
(E<lt>mjtg@cam.a.ukE<gt>), Dominic Dunlop (E<lt>domo@computer.orgE<gt>),
|
||||
Hugo van der Sanden (E<lt>hv@crypt0.demon.co.ukE<gt>), and
|
||||
Jarkko Hietaniemi (E<lt>jhi@iki.fiE<gt>).
|
||||
Hugo van der Sanden (E<lt>hv@crypt0.demon.co.ukE<gt>),
|
||||
Jarkko Hietaniemi (E<lt>jhi@iki.fiE<gt>), Chris Nandor
|
||||
(E<lt>pudge@pobox.comE<gt>), Jon Orwant (E<lt>orwant@media.mit.eduE<gt>,
|
||||
and Richard Foley (E<lt>richard@rfi.netE<gt>).
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user