# how to tr(anslate) newlines
TRNL = '$trnl'
+OPTIMIZE = $optimize
+
+EXTRAS = $extras
+
+INSTALLPREFIXEXP = $prefix
+
!GROK!THIS!
# not used by Makefile but by installperl;
# mentioned here so that metaconfig picks these up
# $installusrbinperl
# $versiononly
+case "${osname}:${osvers}" in
+darwin:*)
+$spitshell >>Makefile <<EOF
+
+# Your locales are broken (osname $osname, osvers $osvers)
+# and to avoid the numerous
+# perl: warning: Setting locale failed.
+# warnings during the build process we reset the locale variables.
+
+LC_ALL=C
+LANG=C
+LANGUAGE=C
+EOF
+ ;;
+esac
## In the following dollars and backticks do not need the extra backslash.
$spitshell >>Makefile <<'!NO!SUBS!'
CCCMDSRC = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $(LIBPERL) $<`
-private = preplibrary lib/ExtUtils/Miniperl.pm lib/Config.pm
+private = preplibrary lib/Config.pm lib/ExtUtils/Miniperl.pm
# Files to be built with variable substitution before miniperl
# is available.
h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h
h3 = opcode.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h
h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h
-h5 = utf8.h warnings.h
+h5 = utf8.h warnings.h sharedsv.h
h = $(h1) $(h2) $(h3) $(h4) $(h5)
c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c
c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c
c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c xsutils.c
-c4 = globals.c perlio.c perlapi.c numeric.c locale.c pp_pack.c
+c4 = globals.c perlio.c perlapi.c numeric.c locale.c pp_pack.c sharedsv.c
c = $(c1) $(c2) $(c3) $(c4) miniperlmain.c perlmain.c
obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT)
obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT)
-obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT)
+obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) sharedsv$(OBJ_EXT)
obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
.PHONY: all compile translators utilities
-all: $(FIRSTMAKEFILE) miniperl extra.pods $(private) $(public) $(dynamic_ext) $(nonxs_ext)
+all: $(FIRSTMAKEFILE) miniperl extra.pods $(private) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
@echo " ";
@echo " Everything is up to date. 'make test' to run test suite."
# test -d lib/auto || mkdir lib/auto
#
.PHONY: preplibrary
-preplibrary: miniperl lib/Config.pm lib/lib.pm lib/re.pm
+preplibrary: miniperl lib/Config.pm lib/lib.pm
@sh ./makedir lib/auto
@echo " AutoSplitting perl library"
$(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
+ $(MAKE) lib/re.pm
# Take care to avoid modifying lib/Config.pm without reason
# (If trying to create a new port and having problems with the configpm script,
# try 'make minitest' and/or commenting out the tests at the end of configpm.)
-lib/Config.pm: config.sh miniperl configpm lib/re.pm
+lib/Config.pm: config.sh miniperl configpm
$(LDLIBPTH) ./miniperl configpm configpm.tmp
sh mv-if-diff configpm.tmp $@
lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.pl lib/Config.pm
$(LDLIBPTH) ./miniperl minimod.pl > minimod.tmp
sh mv-if-diff minimod.tmp $@
+ -touch lib/ExtUtils/Miniperl.pm
lib/re.pm: ext/re/re.pm
- @-rm -f $@
- cat ext/re/re.pm > $@
+ cp ext/re/re.pm ext/re/re.tmp && sh mv-if-diff ext/re/re.tmp lib/re.pm
$(plextract): miniperl lib/Config.pm
@-rm -f $@
cd pod ; $(LNS) ../$$x "perl"$$nx".pod" ; cd .. ; \
echo "pod/perl"$$nx".pod" >> extra.pods ; \
done
+ -@rm -f pod/perlvms.pod
-@test -f vms/perlvms.pod && cd pod && $(LNS) ../vms/perlvms.pod perlvms.pod && cd .. && echo "pod/perlvms.pod" >> extra.pods
+extras.make: perl
+ -@test -s extras.lst && $(LDLIBPTH) PATH=`pwd`:${PATH} PERL5LIB=`pwd`/lib ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
+
+extras.test: perl
+ -@test -s extras.lst && $(LDLIBPTH) PATH=`pwd`:${PATH} PERL5LIB=`pwd`/lib ./perl -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
+
+extras.install: perl
+ -@test -s extras.lst && $(LDLIBPTH) PATH=`pwd`:${PATH} PERL5LIB=`pwd`/lib ./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 installman install.html installhtml
else :; \
fi
$(LDLIBPTH) ./perl installperl $(INSTALLFLAGS) $(STRIPFLAGS)
+ $(MAKE) extras.install
install.man: all installman
$(LDLIBPTH) ./perl installman $(INSTALLFLAGS)
# keywords.pl: keywords.h
# opcode.pl: opcode.h opnames.h pp_proto.h pp.sym
# [* embed.pl needs pp.sym generated by opcode.pl! *]
-# embed.pl: proto.h embed.h embedvar.h global.sym objXSUB.h
+# embed.pl: proto.h embed.h embedvar.h global.sym
# perlapi.h perlapi.c pod/perlintern.pod
# pod/perlapi.pod
# bytecode.pl: ext/ByteLoader/byterun.h ext/ByteLoader/byterun.c
# To force them to be regenerated, type
# make regen_headers
-keywords.h: keywords.pl
- -perl keywords.pl
-
-OPCODE_PL_OUTPUT = opcode.h opnames.h pp_proto.h pp.sym
-
-$(OPCODE_PL_OUTPUT): opcode.pl
- -perl opcode.pl
-
-# Really the prerequisites for the next rule should only be "embed.pl pp.sym"
-# Writing it this way gives make a big hint to always run opcode.pl before
-# embed.pl. The alternative - running embed.pl then opcode.pl causes embed.pl
-# to be re-run next make invocation, and then all object files get recompiled.
-
-proto.h embed.h embedvar.h global.sym objXSUB.h perlapi.h perlapi.c pod/perlintern.pod pod/perlapi.pod: embed.pl $(OPCODE_PL_OUTPUT)
- -perl embed.pl
-
-ext/ByteLoader/byterun.h ext/ByteLoader/byterun.c ext/B/B/Asmdata.pm: bytecode.pl
- -perl bytecode.pl
-
-regnodes.h: regcomp.pl
- -perl regcomp.pl
-
-warnings.h lib/warnings.pm: warnings.pl
- -perl warnings.pl
-
AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h \
embed.h embedvar.h global.sym \
pod/perlintern.pod pod/perlapi.pod \
- objXSUB.h perlapi.h perlapi.c ext/ByteLoader/byterun.h \
+ perlapi.h perlapi.c ext/ByteLoader/byterun.h \
ext/ByteLoader/byterun.c ext/B/B/Asmdata.pm regnodes.h \
warnings.h lib/warnings.pm
@$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
d_dummy $(dynamic_ext): miniperl preplibrary $(DYNALOADER) FORCE
- @-rm -f lib/re.pm
- @cat ext/re/re.pm > lib/re.pm
@$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE
- @-rm -f lib/re.pm
- @cat ext/re/re.pm > lib/re.pm
@$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
n_dummy $(nonxs_ext): miniperl preplibrary $(DYNALOADER) FORCE
_clobber:
-@rm -f Cross/run-* Cross/to-* Cross/from-*
- rm -f config.sh cppstdin Policy.sh
+ rm -f config.sh cppstdin Policy.sh extras.lst
clobber: _realcleaner _mopup _clobber
utest ucheck test.utf8 check.utf8 \
test.third check.third utest.third ucheck.third test_notty.third \
test.deparse test_notty.deparse \
- minitest
+ minitest coretest
# Cannot delegate rebuilding of t/perl to make
# to allow interlaced test and minitest
test_prep_pre: preplibrary utilities $(nonxs_ext)
-test_prep: test_prep_pre miniperl ./perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
+test_prep: test_prep_pre miniperl perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
PERL=./perl $(MAKE) _test_prep
_test_tty:
utest ucheck test.utf8 check.utf8: test_prep
PERL=./perl TEST_ARGS=-utf8 $(MAKE) _test
+coretest: test_prep
+ PERL=./perl TEST_ARGS=-core $(MAKE) _test
+
test-prep: test_prep
test-tty: test_tty