This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use a buildcustomize.pl to set @INC in miniperl when building extensions.
[perl5.git] / Cross / Makefile-cross-SH
old mode 100755 (executable)
new mode 100644 (file)
index d5bbef5..d1d2cbf
@@ -12,7 +12,7 @@ Makefile=Makefile-cross-$CROSS_NAME
 # H.Merijn Brand [17 Feb 2004]
 # This comment is just to ensure that Configure will find variables that
 # are removed/replaced in patches on blead, but are still needed in the
-# 5.8.x, 5.6.x and 5.005.x maintainance tracks.
+# 5.8.x, 5.6.x and 5.005.x maintenance tracks.
 # metaconfig -m will scan all .SH files on this level (not deeper), and
 # not in x2p and other subfolders. This file is as good as any .SH
 # patch   references
@@ -324,27 +324,17 @@ $spitshell >>$Makefile <<'!NO!SUBS!'
 
 CONFIGPM = xlib/$(CROSS_NAME)/Config.pm
 
-private = preplibrary $(CONFIGPM) $(CROSS_LIB)/Config.pod
+private = preplibrary $(CONFIGPM) $(CROSS_LIB)/Config.pod lib/buildcustomize.pl
 
-shextract = Makefile cflags config.h makeaperl makedepend \
+shextract = Makefile cflags config.h makedepend \
        makedir myconfig writemain pod/Makefile
 
-# Files to be built with variable substitution after miniperl is
-# available.  Dependencies handled manually below (for now).
-
-pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL \
-       pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL
-
-# lib/lib.pm is not listed here because it has a rule of its own.
-plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text \
-       pod/pod2usage pod/podchecker pod/podselect
-
-addedbyconf = UU $(shextract) $(plextract) lib/lib.pm pstruct
+addedbyconf = UU $(shextract) lib/lib.pm pstruct
 
 # Unicode data files generated by mktables
-unidatafiles = lib/unicore/Canonical.pl lib/unicore/Exact.pl \
-       lib/unicore/Properties lib/unicore/Decomposition.pl \
-       lib/unicore/CombiningClass.pl lib/unicore/Name.pl lib/unicore/PVA.pl
+unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \
+       lib/unicore/CombiningClass.pl lib/unicore/Name.pl \
+       lib/unicore/Heavy.pl lib/unicore/mktables.lst
 
 # Directories of Unicode data files generated by mktables
 unidatadirs = lib/unicore/To lib/unicore/lib
@@ -358,7 +348,7 @@ h = $(h1) $(h2) $(h3) $(h4) $(h5)
 
 c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro.c perl.c
 c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c
-c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c
+c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c keywords.c
 c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c
 c5 = $(madlysrc) $(mallocsrc)
 
@@ -744,19 +734,20 @@ lib/re.pm: ext/re/re.pm
        @-rm -f $@
        cp ext/re/re.pm lib/re.pm
 
-$(plextract):  miniperl $(CONFIGPM) x2p/s2p
-       @-rm -f $@
-       $(LDLIBPTH) ./miniperl -I`pwd`/lib $@.PL
-
 lib/lib.pm:    miniperl $(CONFIGPM)
        @-rm -f $@
        $(LDLIBPTH) ./miniperl -Ilib -MCross lib/lib_pm.PL
 
+lib/buildcustomize.pl: $(MINIPERL_EXE) write_buildcustomize.pl
+       $(MINIPERL) write_buildcustomize.pl >lib/buildcustomize.pl
+
 unidatafiles $(unidatafiles): uni.data
 
 uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
-       cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -w
-       touch uni.data
+       cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -P ../../pod -maketest -makelist -p
+#      Commented out so always runs, mktables looks at far more files than we
+#      can in this makefile to decide if needs to run or not
+#      touch uni.data
 
 extra.pods: miniperl
        -@test ! -f extra.pods || rm -f `cat extra.pods`
@@ -822,7 +813,7 @@ install.html: all installhtml
       --splithead=pod/perlipc     \
       --splititem=pod/perlfunc    \
       --libpods=perlfunc:perlguts:perlvar:perlrun:perlop \
-      --ignore=Porting/Maintainers.pm,Porting/patching.pod,Porting/pumpkin.pod,Porting/repository.pod \
+      --ignore=Porting/Maintainers.pm,Porting/pumpkin.pod,Porting/repository.pod \
       --verbose
 
 
@@ -849,9 +840,7 @@ perly.c: perly.y
 perly.h: perly.y
        -@sh -c true
 
-# No compat3.sym here since and including the 5.004_50.
-# No interp.sym since 5.005_03.
-SYM  = global.sym globvar.sym perlio.sym pp.sym
+SYM  = global.sym globvar.sym perlio.sym
 
 SYMH = perlvars.h intrpvar.h
 
@@ -860,9 +849,7 @@ CHMOD_W = chmod +w
 # The following files are generated automatically
 #      embed.pl:       proto.h embed.h embedvar.h global.sym
 #                      perlapi.h perlapi.c 
-# [* embed.pl needs pp.sym generated by opcode.pl! *]
-#      keywords.pl:    keywords.h
-#      opcode.pl:      opcode.h opnames.h pp_proto.h pp.sym
+#      opcode.pl:      opcode.h opnames.h pp_proto.h
 #      regcomp.pl:     regnodes.h
 #      warnings.pl:    warnings.h lib/warnings.pm
 # The correct versions should be already supplied with the perl kit,
@@ -872,7 +859,7 @@ CHMOD_W = chmod +w
 # with your existing copy of perl
 # (make regen_headers is kept for backwards compatibility)
 
-AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h \
+AUTOGEN_FILES = opcode.h opnames.h pp_proto.h proto.h \
                embed.h embedvar.h global.sym \
                perlapi.h perlapi.c regnodes.h \
                warnings.h lib/warnings.pm
@@ -920,16 +907,16 @@ manicheck:        FORCE
 
 
 
-$(DYNALOADER): preplibrary FORCE
+$(DYNALOADER): lib/buildcustomize.pl preplibrary FORCE
        @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
 
-d_dummy $(dynamic_ext):        miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
+d_dummy $(dynamic_ext):        miniperl$(EXE_EXT) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE
        @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
 
-s_dummy $(static_ext): miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
+s_dummy $(static_ext): miniperl$(EXE_EXT) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE
        @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
 
-n_dummy $(nonxs_ext):  miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
+n_dummy $(nonxs_ext):  miniperl$(EXE_EXT) lib/buildcustomize.pl preplibrary $(DYNALOADER) FORCE
        @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
 !NO!SUBS!
 
@@ -945,19 +932,18 @@ printconfig:
 
 .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
        realclean _realcleaner clobber _clobber \
-       distclean veryclean _verycleaner \
-       cleanup_unpacked_files unpack_files
+       distclean veryclean _verycleaner
 
-clean:         cleanup_unpacked_files _tidy _mopup 
+clean:         _tidy _mopup 
 
-realclean:     cleanup_unpacked_files _realcleaner _mopup
+realclean:     _realcleaner _mopup
        @echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
 
 _clobber:
        -@rm -f Cross/run-* Cross/to-* Cross/from-*
        rm -f config.sh cppstdin Policy.sh extras.lst
 
-clobber:       cleanup_unpacked_files _realcleaner _mopup _clobber
+clobber:       _realcleaner _mopup _clobber
 
 distclean:     clobber
 
@@ -979,7 +965,6 @@ _mopup:
        -rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
        -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
        -rm -f perl$(EXE_EXT) miniperl$(EXE_EXT) $(LIBPERL) libperl.* microperl
-       -rm -f opcode.h-old opnames.h-old pp.sym-old pp_proto.h-old
        -rm -f config.over
 
 # Do not 'make _tidy' directly.
@@ -1093,14 +1078,14 @@ makedepend: makedepend.SH config.sh
 
 TESTFILE=TEST
 
-_test_prep: unpack_files
+_test_prep:
        cd t && (rm -f $(PERL)$(EXE_EXT); $(LNS) ../$(PERL)$(EXE_EXT) $(PERL)$(EXE_EXT))
 
 # Architecture-neutral stuff:
 
 test_prep_pre: preplibrary utilities $(nonxs_ext)
 
-test_prep: test_prep_pre miniperl$(EXE_EXT) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
+test_prep: test_prep_pre miniperl$(EXE_EXT) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL) x2p/s2p
        PERL=./perl $(MAKE) _test_prep
 
 _test_tty:
@@ -1109,12 +1094,6 @@ _test_tty:
 _test_notty:
        cd t && $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS)
 
-unpack_files:
-       $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -u -m
-
-cleanup_unpacked_files:
-       -@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
-
 # The second branch is for testing without a tty or controlling terminal,
 # see t/op/stat.t
 _test:
@@ -1257,7 +1236,7 @@ noknack:  utilities
 nokfilenack:   utilities
        $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
 
-.PHONY: clist hlist shlist pllist
+.PHONY: clist hlist shlist
 
 clist: $(c)
        echo $(c) | tr ' ' $(TRNL) >.clist
@@ -1268,9 +1247,6 @@ hlist:  $(h)
 shlist: $(sh)
        echo $(sh) | tr ' ' $(TRNL) >.shlist
 
-pllist: $(pl)
-       echo $(pl) | tr ' ' $(TRNL) >.pllist
-
 Makefile: Makefile.SH ./config.sh
        $(SHELL) Makefile.SH
 
@@ -1291,7 +1267,7 @@ etags:    TAGS
 TAGS: emacs/cperl-mode.elc
        sh emacs/ptags
 
-# Let's hope make will not go into an infinite loop on case-unsensitive systems
+# Let's hope make will not go into an infinite loop on case-insensitive systems
 # This may also fail if . is in the head of the path, since perl will
 # require -Ilib
 tags:  TAGS