utils/instmodsh.PL Give information about installed extensions
utils/libnetcfg.PL libnet
utils.lst Lists utilities bundled with Perl
-utils/Makefile Extract the utility scripts
+utils/Makefile.SH Extract the utility scripts
utils/perlbug.PL A simple tool to submit a bug report
utils/perldoc.PL A simple tool to find & display perl's documentation
utils/perlivp.PL installation verification procedure
fi
+# Some environment have no system(), which mkpport uses.
+# Let's try running the commands with shell.
+case "${osname}" in
+catamount)
+$spitshell >>Makefile <<!GROK!THIS!
+.PHONY: makeppport
+makeppport: miniperl\$(EXE_EXT) \$(CONFIGPM)
+ -@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
+ (cd ext/Devel/PPPort && `pwd`/run.sh ../../../miniperl -I../../../lib \$\$f); \
+ done
+
+!GROK!THIS!
+;;
+*)
+$spitshell >>Makefile <<'!NO!SUBS!'
+.PHONY: makeppport
+makeppport: miniperl$(EXE_EXT) $(CONFIGPM)
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport
+
+!NO!SUBS!
+;;
+esac
+
$spitshell >>Makefile <<'!NO!SUBS!'
sperl$(OBJ_EXT): perl.c $(h)
autosplit_lib_modules(@ARGV)' lib/*/*.pm
$(MAKE) lib/re.pm
-.PHONY: makeppport
-makeppport: miniperl$(EXE_EXT) $(CONFIGPM)
- $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport
-
lib/Config.pod: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
$(LDLIBPTH) $(RUN) ./miniperl -Ilib configpm
-@test -f pod/perl595delta.pod && cd pod && $(LNS) perl595delta.pod perldelta.pod && cd .. && echo "pod/perldelta.pod" >> extra.pods # See buildtoc
extras.make: perl$(EXE_EXT)
- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
+ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) $(RUN) ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
extras.test: perl$(EXE_EXT)
- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
+ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) $(RUN) ./perl -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
extras.install: perl$(EXE_EXT)
- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
+ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) $(RUN) ./perl -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
.PHONY: install install-strip install-all install-verbose install-silent \
no-install install.perl install.man install.html
INSTALL_DEPENDENCE = all
install.perl: $(INSTALL_DEPENDENCE) installperl
- $(LDLIBPTH) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
+ $(LDLIBPTH) $(RUN) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
-@test ! -s extras.lst || $(MAKE) extras.install
install.man: all installman
- $(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
+ $(LDLIBPTH) $(RUN) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
# XXX Experimental. Hardwired values, but useful for testing.
# Eventually Configure could ask for some of these values.
install.html: all installhtml
-@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd ..
- $(LDLIBPTH) ./perl installhtml \
+ $(LDLIBPTH) $(RUN) ./perl installhtml \
--podroot=. --podpath=. --recurse \
--htmldir=$(privlib)/html \
--htmlroot=$(privlib)/html \
.PHONY: printconfig
printconfig:
- @eval `$(LDLIBPTH) ./perl -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
+ @eval `$(LDLIBPTH) $(RUN) ./perl -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
.PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
realclean _realcleaner clobber _clobber \
minitest.utf16: minitest.prep
- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
- && $(LDLIBPTH) ./perl TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+ && $(LDLIBPTH) $(RUN) ./perl TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
test.utf16 check.utf16: test_prep
PERL=./perl $(MAKE) TEST_ARGS=-utf16 _test
# is crashing.
minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
- && $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+ && $(LDLIBPTH) $(RUN) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
# Test via harness
.PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack
ok: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
okfile: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
oknack: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
okfilenack: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
nok: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
nokfile: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
noknack: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
nokfilenack: utilities
- $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
+ $(LDLIBPTH) $(RUN) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
.PHONY: clist hlist shlist pllist
exit 0 # not an error ?
fi
-
case "$osname" in
-catamount) # Snowball's chance to build extensions.
+catamount) # Snowball's chance of building extensions.
echo "This is $osname, not building $mname, sorry."
exit 0
;;
# cause weird errors during the Perl build:
# 1182003549.604836:3-24:(super.c:1516:llu_iop_fcntl()): unsupported fcntl cmd 2
#
-# As of 2007-Jun (pre-5.9.5) miniperl and libperl.a can be successfully built;
-# building any extensions would be hard since Perl cannot run anything
-# external (which breaks MakeMaker, and confuses ext/util/make_ext).
+# As of 2007-Sep (pre-5.10) miniperl, libperl.a, and perl can be successfully
+# built; no extensions are built. It would be hard since Perl cannot run
+# anything external (pipes, system(), backticks or fork/exec, or globbing)
+# (which breaks MakeMaker, and confuses ext/util/make_ext).
#
-# To build libperl.a (which also gets miniperl built):
+# To build:
#
# sh Configure -des -Dusedevel
-# make libperl.a
+# make perl
#
-# The -Dusedevel is required for Perl 5.9, it is not required for Perl 5.10
-# sources, once they come out. You will need to have the run.sh execution
-# wrapper around (it gets created in the Perl build directory) if you want to
-# run the miniperl in the XT4. It collects the exit status (note that yod
-# is run with "-sz 1", so only one instance is run), and possible crash status.
-# For example:
+# The -Dusedevel is required for Perl 5.9, it is not required for the Perl
+# 5.10 sources, once they come out. "make install" won't work since it
+# assumes file globbing (see above). You can try the following manually:
#
-# sh run.sh ./miniperl -le 'print 42'
+# mkdir -p /opt/perl-catamount
+# mkdir -p /opt/perl-catamount/include
+# mkdir -p /opt/perl-catamount/lib
+# mkdir -p /opt/perl-catamount/lib/perl5/5.9.5
+# mkdir -p /opt/perl-catamount/bin
+# cp *.h /opt/perl-catamount/include
+# cp libperl.a /opt/perl-catamount/lib
+# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.9.5
+# cp miniperl perl run.sh cc.sh /opt/perl-catamount/lib
+#
+# (For Perl 5.10.0 do the obvious renaming above.)
+# With the headers and the libperl.a you can embed Perl to your Catamount
+# application, see pod/perlembed.pod. You can do for example:
+#
+# cc -I/opt/perl-catamount/include -L/opt/perl-catamount/lib -o embed embed.c
+# yod -sz 1 ./embed -le 'print sqrt(2)'
+#
+# You might want to have the run.sh execution wrapper around (it gets created
+# in the Perl build directory) if you want to run the miniperl or perl in
+# the XT4. It collects the exit status (note that yod is run with "-sz 1",
+# so only one instance is run), and possible crash status (bare yod does
+# not collect the exit status). For example:
+#
+# sh /opt/perl-catamount/bin/run.sh /opt/perl-catamount/bin/perl -le 'print 42'
+#
+# or if you are still in the build directory:
+#
+# sh run.sh ./perl -le 'print 2*3*7'
+#
+# The cc.sh is a wrapper for the Catamount cc used when building Perl
+# (and before that, when running Configure), it arranges for the main()
+# exit(), _exit() to be wrapped so that the exit/crash status can be
+# collected (by run.sh).
#
case "$prefix" in
__EOF1__
archname='x86_64-catamount'
-archobjs='cata.o'
+archobjs='catalib.o'
d_mmap='undef'
d_setlocale='undef' # There is setlocale() but no locales.
d_vprintf='define'
installusrbinperl='undef'
libswanted="m crypt c"
libpth=' '
-locincpth=''
-onlyextensions='Fcntl' # Not that we can build this, really.
+locincpth=' '
+nonxs_ext=' '
osname='catamount'
procselfexe='undef'
+static_ext=' '
usedl='undef'
useithreads='undef'
uselargefiles='define'
# This is essentially a frontend driver for the Catamount cc.
# We arrange for (1) the main(), exit(), _exit() being wrapped (cpp-defined)
# catamain(), cataexit(), and _cataexit() (2) the actual main() etc. are in
-# cata.c, and cata.o is linked in when needed (3) signals being caught
+# cata.c, and cata*.o are linked in when needed (3) signals being caught
# All this mostly for being able to catch the exit status (or crash cause).
#
argv=''
cat >> $cc <<'__EOF3b__'
case "$1" in
--cata_o) ;;
-*) if test ! -f cata.o
+*) if test ! -f catalib.o
then
- if test ! -f cata.c
+ if test ! -f catalib.c
then
- if test -f ../cata.c # If compiling in UU during Configure.
+ if test -f ../catalib.c # If compiling in UU during Configure.
then
- cp ../cata.c cata.c
+ cp ../catalib.c catalib.c
+ cp ../catamain.c catamain.c
cp ../cata.h cata.h
fi
fi
- $0 --cata_o -c cata.c || exit 1
+ $0 --cata_o -c catalib.c || exit 1
+ $0 --cata_o -c catamain.c || exit 1
fi
;;
esac
case "$exe" in
'') ;;
*) case "$argv" in
- *cata.o*) ;;
- *) argv="$argv cata.o" ;;
+ *catalib.o*|*" perlmain.o "*) ;;
+ *) argv="$argv catalib.o" ;;
+ esac
+ case "$argv" in
+ *catamain.o*) ;;
+ *) argv="$argv catamain.o" ;;
esac
;;
esac
#endif
#endif
#endif
+#ifdef argv0
+#define ARGV0 STRINGIFY(argv0)
+#else
+#define ARGV0 argv0
+#endif
__EOF6__
-cat >cata.c<<__EOF7__
+cat >catalib.c<<__EOF7__
#include <stdio.h>
#include <signal.h>
#undef printf
#undef exit
#undef _exit
#include "cata.h"
-#ifndef STRINGIFY
-#define STRINGIFY(a) #a
-#endif
-#ifdef argv0
-#define ARGV0 STRINGIFY(argv0)
-#else
-static char* argv0;
-#define ARGV0 argv0
-#endif
+char* argv0;
void cataexit(int status) {
printf("cata: exe %s pid %d exit %d\n", ARGV0, getpid(), status);
exit(status);
signal(SIGPWR, catasighandle);
signal(SIGSYS, catasighandle);
}
+void boot_DynaLoader (void* cv) { }
+__EOF7__
+cat >catamain.c<<__EOF8__
+#include <stdio.h>
+#undef printf
+#undef main
+#undef exit
+#undef _exit
+#include "cata.h"
+extern char* argv0;
int main(int argc, char *argv[], char *envv[]) {
int status;
#ifndef argv0
printf("cata: exe %s pid %d main %d\n", ARGV0, getpid(), status);
return status;
}
-__EOF7__
+__EOF8__
echo "Faking DynaLoader"
touch DynaLoader.o # Oh, the agony.
+case $PERL_CONFIG_SH in
+'')
+ if test -f config.sh; then TOP=.;
+ elif test -f ../config.sh; then TOP=..;
+ elif test -f ../../config.sh; then TOP=../..;
+ elif test -f ../../../config.sh; then TOP=../../..;
+ elif test -f ../../../../config.sh; then TOP=../../../..;
+ else
+ echo "Can't find config.sh."; exit 1
+ fi
+ . $TOP/config.sh
+ ;;
+esac
+: This forces SH files to create target in same directory as SH file.
+: This is so that make depend always knows where to find SH derivatives.
+case "$0" in
+*/Makefile.SH) cd `expr X$0 : 'X\(.*\)/'` ;;
+Makefile.SH) ;;
+*) case `pwd` in
+ */utils) ;;
+ *) if test -d utils; then cd utils
+ else echo "Can't figure out where to write output."; exit 1
+ fi;;
+ esac;;
+esac
+
+echo "Extracting utils/Makefile (with variable substitutions)"
+rm -f Makefile
+cat >Makefile <<!GROK!THIS!
PERL = ../miniperl
REALPERL = ../perl
+RUN = $run
+
+!GROK!THIS!
+
+cat >>Makefile <<'!NO!SUBS!'
# Files to be built with variable substitution after miniperl is
# available. Dependencies handled manually below (for now).
all: $(plextract)
$(plextract):
- $(PERL) -I../lib $@.PL
+ $(RUN) $(PERL) -I../lib $@.PL
c2ph: c2ph.PL ../config.sh
veryclean: distclean
-rm -f *~ *.org
+!NO!SUBS!
+$eunicefix Makefile
+case `pwd` in
+*SH)
+ $rm -f ../Makefile
+ $ln Makefile ../Makefile
+ ;;
+esac
+rm -f $firstmakefile
.SUFFIXES: .c \$(OBJ_EXT)
+RUN = $run
+
!GROK!THIS!
cat >>Makefile <<'!NO!SUBS!'
# These should be automatically generated
$(plextract):
- ../miniperl -I../lib $@.PL
+ $(RUN) ../miniperl -I../lib $@.PL
find2perl: find2perl.PL