LOGONLY mark dfae30 NODOC as a .t fix
[p5sagit/p5-mst-13.2.git] / Cross / Makefile-cross-SH
index bb1e0e3..79bd165 100755 (executable)
@@ -29,11 +29,6 @@ case "$0" in
 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
 esac
 
-case "$d_dosuid" in
-*define*) suidperl='suidperl' ;;
-*) suidperl='';;
-esac
-
 linklibperl='$(LIBPERL)'
 shrpldflags='$(LDDLFLAGS)'
 ldlibpth=''
@@ -50,7 +45,7 @@ true)
        esac
 
        pldlflags="$cccdlflags"
-       static_target='static_pic'
+       static_ldflags=''
        case "${osname}${osvers}" in
        next4*)
                ld=libtool
@@ -151,7 +146,7 @@ EOT
        ;;
 
 *)     pldlflags=''
-       static_target='static'
+       static_ldflags='CCCDLFLAGS='
        ;;
 esac
 
@@ -237,8 +232,8 @@ SHRPENV = $shrpenv
 # if building a shared libperl.so that might later be linked into
 # another application, then it might be appropriate to also build static
 # extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC
-# for GNU cc).  This is handled by ext/util/make_ext.
-STATIC = $static_target
+# for GNU cc).
+STATIC_LDFLAGS = $static_ldflags
 
 # The following is used to include the current directory in
 # the dynamic loader path you are building a shared libperl.
@@ -252,7 +247,7 @@ DYNALOADER = DynaLoader\$(OBJ_EXT)
 
 libs = $perllibs $cryptlib
 
-public = perl\$(EXE_EXT) $suidperl utilities translators
+public = perl\$(EXE_EXT) utilities translators
 
 shellflags = $shellflags
 
@@ -347,9 +342,9 @@ plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text \
 addedbyconf = UU $(shextract) $(plextract) 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
@@ -363,7 +358,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 xsutils.c pad.c globals.c
+c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c
 c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c
 c5 = $(madlysrc) $(mallocsrc)
 
@@ -371,7 +366,7 @@ c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c perlmain.c opmini.c
 
 obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro$(OBJ_EXT)
 obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) perl$(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) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT)
+obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT)
 
 obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
 
@@ -725,39 +720,14 @@ perl.gcov: perl.config.gcov
 microperl:
        $(MAKE) -f Makefile.micro
 
-# This version, if specified in Configure, does ONLY those scripts which need
-# set-id emulation.  Suidperl must be setuid root.  It contains the "taint"
-# checks as well as the special code to validate that the script in question
-# has been invoked correctly.
-
-suidperl$(EXE_EXT): $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
-       $(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
 !NO!SUBS!
 
 fi
 
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
-sperl$(OBJ_EXT): perl.c $(h)
-       $(RMS) sperl.c
-       $(LNS) perl.c sperl.c
-       $(CCCMD) -DIAMSUID sperl.c
-       $(RMS) sperl.c
-
-# We have to call our ./makedir because Ultrix 4.3 make can't handle the line
-#      test -d lib/auto || mkdir lib/auto
-# We need to autosplit in two steps because VOS can't handle so many args
-#
 .PHONY: preplibrary
-preplibrary: miniperl $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
-       @sh ./makedir lib/auto
-       @echo " AutoSplitting perl library"
-       $(LDLIBPTH) ./miniperl -Ilib -MCross -e 'use AutoSplit; \
-               autosplit_lib_modules(@ARGV)' lib/*.pm
-       $(LDLIBPTH) ./miniperl -Ilib -MCross -e 'use AutoSplit; \
-               autosplit_lib_modules(@ARGV)' lib/*/*.pm
-       $(MAKE) lib/re.pm
+preplibrary: miniperl $(CONFIGPM) lib/lib.pm lib/re.pm $(PREPLIBRARY_LIBPERL)
 
 .PHONY: makeppport
 makeppport: miniperl$(EXE_EXT) $(CONFIGPM)
@@ -785,8 +755,10 @@ lib/lib.pm:        miniperl $(CONFIGPM)
 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`
@@ -799,7 +771,7 @@ extra.pods: miniperl
        -@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
        -@rm -f pod/perldelta.pod
-       -@test -f pod/perl595delta.pod && cd pod && $(LNS) perl595delta.pod perldelta.pod && cd .. && echo "pod/perldelta.pod" >> extra.pods # See buildtoc
+       -@test -f pod/perl5100delta.pod && cd pod && $(LNS) perl5100delta.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`
@@ -852,7 +824,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
 
 
@@ -888,7 +860,6 @@ SYMH = perlvars.h intrpvar.h
 CHMOD_W = chmod +w
 
 # The following files are generated automatically
-#      autodoc.pl:     pod/perlapi.pod pod/perlintern.pod
 #      embed.pl:       proto.h embed.h embedvar.h global.sym
 #                      perlapi.h perlapi.c 
 # [* embed.pl needs pp.sym generated by opcode.pl! *]
@@ -905,19 +876,15 @@ CHMOD_W = chmod +w
 
 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 \
                perlapi.h perlapi.c regnodes.h \
                warnings.h lib/warnings.pm
 
-.PHONY: regen_headers regen_pods regen_all
+.PHONY: regen_headers regen_all
 
 regen regen_headers:   FORCE
        -perl regen.pl
 
-regen_pods:    FORCE
-       -cd pod; $(LDLIBPTH) $(MAKE) regen_pods
-
-regen_all: regen regen_pods
+regen_all: regen
 
 .PHONY:        manisort manicheck
 
@@ -956,16 +923,16 @@ manicheck:        FORCE
 
 
 $(DYNALOADER): preplibrary FORCE
-       @$(LDLIBPTH) sh ext/util/make_ext_cross $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+       @$(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
-       @$(LDLIBPTH) sh ext/util/make_ext_cross dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+       @$(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
-       @$(LDLIBPTH) sh ext/util/make_ext_cross $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+       @$(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
-       @$(LDLIBPTH) sh ext/util/make_ext_cross nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+       @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
 !NO!SUBS!
 
 $spitshell >>$Makefile <<EOF
@@ -980,19 +947,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
 
@@ -1012,8 +978,8 @@ _mopup:
        -rm -f perl.third lib*.so.perl.third perl.3log t/perl.third t/perl.3log
        -rm -f perl.pixie lib*.so.perl.pixie lib*.so.Addrs
        -rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
-       -rm -f perlld cygwin.c ld2 libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
-       -rm -f perl$(EXE_EXT) suidperl$(EXE_EXT) miniperl$(EXE_EXT) $(LIBPERL) libperl.* microperl
+       -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
 
@@ -1023,7 +989,7 @@ _tidy:
        -cd utils; $(LDLIBPTH) $(MAKE) clean
        -cd x2p; $(LDLIBPTH) $(MAKE) clean
        -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
-       $(LDLIBPTH) sh ext/util/make_ext clean $$x MAKE=$(MAKE) ; \
+       $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=clean $$x MAKE=$(MAKE) ; \
        done
 
 _cleaner1:
@@ -1031,9 +997,14 @@ _cleaner1:
        -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
        -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
        -cd x2p; $(LDLIBPTH) $(MAKE) $(CLEAN)
-       -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
-       $(LDLIBPTH) sh ext/util/make_ext $(CLEAN) $$x MAKE=$(MAKE) ; \
-       done
+       -@if test -f miniperl$(EXE_EXT) ; then \
+       for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
+       $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=$(CLEAN) $$x MAKE=$(MAKE) ; \
+       done ; \
+       else \
+       sh $(CLEAN).sh ; \
+       fi
+       rm -f realclean.sh veryclean.sh
        -@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib mkppport --clean
 
 # Some systems do not support "?", so keep these files separate.
@@ -1123,7 +1094,7 @@ 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:
@@ -1139,12 +1110,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: