make install fails
[p5sagit/p5-mst-13.2.git] / Makefile.SH
index c26b955..050e471 100644 (file)
@@ -85,6 +85,12 @@ for f in $static_ext; do
        static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)"
 done
 
+nonxs_list=' '
+for f in $nonxs_ext; do
+    base=`echo "$f" | sed 's/.*\///'`
+    nonxs_list="$nonxs_list ext/$f/pm_to_blib"
+done
+
 echo "Extracting Makefile (with variable substitutions)"
 $spitshell >Makefile <<!GROK!THIS!
 # Makefile.SH
@@ -140,7 +146,8 @@ LDLIBPTH = $ldlibpth
 
 dynamic_ext = $dynamic_list
 static_ext = $static_list
-ext = \$(dynamic_ext) \$(static_ext)
+nonxs_ext = $nonxs_list
+ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
 DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT)
 
 libs = $libs $cryptlib
@@ -170,6 +177,9 @@ ARCHOBJS = $archobjs
 # grrr
 SHELL = $sh
 
+# how to tr(anslate) newlines
+TRNL = '$trnl'
+
 !GROK!THIS!
 
 ## In the following dollars and backticks do not need the extra backslash.
@@ -199,7 +209,7 @@ addedbyconf = UU $(shextract) $(plextract) pstruct
 h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h
 h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h
 h3 = opcode.h patchlevel.h perl.h perly.h pp.h proto.h regcomp.h
-h4 = regexp.h scope.h sv.h unixish.h util.h perlio.h thread.h
+h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h
 h5 = bytecode.h byterun.h
 h = $(h1) $(h2) $(h3) $(h4) $(h5)
 
@@ -230,8 +240,9 @@ lintflags = -hbvxac
 .c$(OBJ_EXT):
        $(CCCMD) $(PLDLFLAGS) $*.c
 
-all: $(FIRSTMAKEFILE) miniperl $(private) $(plextract) $(public) $(dynamic_ext)
-       @echo " "; echo "       Everything is up to date."
+all: $(FIRSTMAKEFILE) miniperl $(private) $(plextract) $(public) $(dynamic_ext) $(nonxs_ext)
+       @echo " ";
+       @echo " Everything is up to date. 'make test' to run test suite."
 
 compile: all
        echo "testing compilation" > testcompile;
@@ -292,6 +303,7 @@ $(LIBPERL): $& perl$(OBJ_EXT) $(obj)
                case "$osname" in
                aix)
                        $spitshell >>Makefile <<'!NO!SUBS!'
+       rm -f libperl$(OBJ_EXT)
        mv $@ libperl$(OBJ_EXT)
        $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
 !NO!SUBS!
@@ -320,7 +332,7 @@ $(LIBPERL): $& perl$(OBJ_EXT) $(obj)
 
 miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)
        $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) $(LLIBPERL) $(libs)
-       @ $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest
+       $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest
 
 perl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
        $(SHRPENV) $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
@@ -360,7 +372,7 @@ sperl$(OBJ_EXT): perl.c perly.h patchlevel.h $(h)
 preplibrary: miniperl lib/Config.pm $(plextract)
        @sh ./makedir lib/auto
        @echo " AutoSplitting perl library"
-       @$(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
+       $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
                autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
 
 # Take care to avoid modifying lib/Config.pm without reason
@@ -368,13 +380,18 @@ preplibrary: miniperl lib/Config.pm $(plextract)
 # try 'make minitest' and/or commenting out the tests at the end of configpm.)
 lib/Config.pm: config.sh miniperl configpm
        $(LDLIBPTH) ./miniperl configpm tmp
-       sh mv-if-diff tmp lib/Config.pm
+       sh mv-if-diff tmp $@
 
 lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.pl lib/Config.pm
-       $(LDLIBPTH) ./miniperl minimod.pl > tmp && mv tmp $@
+       $(LDLIBPTH) ./miniperl minimod.pl > tmp
+       sh mv-if-diff tmp $@
+
+lib/re.pm: ext/re/re.pm
+       rm -f $@
+       cat ext/re/re.pm > $@
 
-$(plextract):  miniperl lib/Config.pm
-       `echo $(LDLIBPTH) ./miniperl -Ilib $@.PL`
+$(plextract):  miniperl lib/Config.pm lib/re.pm
+       $(LDLIBPTH) ./miniperl -Ilib $@.PL
        
 install: all install.perl install.man
 
@@ -384,6 +401,7 @@ install.perl:       all installperl
                cd utils; $(MAKE) compile; \
                cd ../x2p; $(MAKE) compile; \
                cd ../pod; $(MAKE) compile; \
+       else :; \
        fi
        $(LDLIBPTH) ./perl installperl
 
@@ -443,6 +461,7 @@ SYMH = perlvars.h thrdvar.h
 #      byterun.h:      bytecode.pl
 #      byterun.c:      bytecode.pl
 #      lib/B/Asmdata.pm:       bytecode.pl
+#      regnodes.h:     regcomp.pl
 # The correct versions should be already supplied with the perl kit,
 # in case you don't have perl available.
 # To force them to run, type
@@ -452,11 +471,12 @@ regen_headers:    FORCE
        perl opcode.pl
        perl embed.pl
        perl bytecode.pl
+       perl regcomp.pl
 
 # Extensions:
-# Names added to $(dynamic_ext) or $(static_ext) will automatically
-# get built.  There should ordinarily be no need to change any of
-# this part of makefile.
+# Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will
+# automatically get built.  There should ordinarily be no need to change
+# any of this part of makefile.
 #
 # The dummy dependency is a place holder in case $(dynamic_ext) or
 # $(static_ext) is empty.
@@ -472,6 +492,9 @@ d_dummy $(dynamic_ext):     miniperl preplibrary $(DYNALOADER) FORCE
 s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE
        @$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
 
+n_dummy $(nonxs_ext):  miniperl preplibrary $(DYNALOADER) FORCE
+       @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+
 clean:         _tidy _mopup
 
 realclean:     _cleaner _mopup
@@ -494,7 +517,7 @@ _tidy:
        -cd pod; $(MAKE) clean
        -cd utils; $(MAKE) clean
        -cd x2p; $(MAKE) clean
-       -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
+       -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
        sh ext/util/make_ext clean $$x MAKE=$(MAKE) ; \
        done
        rm -f testcompile compilelog
@@ -505,7 +528,7 @@ _cleaner:
        -cd pod; $(MAKE) realclean
        -cd utils; $(MAKE) realclean
        -cd x2p; $(MAKE) realclean
-       -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
+       -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
        sh ext/util/make_ext realclean $$x MAKE=$(MAKE) ; \
        done
        rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl
@@ -552,7 +575,7 @@ depend: makedepend
 makedepend: makedepend.SH config.sh
        sh ./makedepend.SH
 
-test-prep: miniperl perl preplibrary utilities $(dynamic_ext)
+test-prep: miniperl perl preplibrary utilities $(dynamic_ext) $(nonxs_ext)
        cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT))
 
 test check: test-prep
@@ -564,7 +587,7 @@ test-notty: test-prep
 
 # Can't depend on lib/Config.pm because that might be where miniperl
 # is crashing.
-minitest: miniperl
+minitest: miniperl lib/re.pm
        @echo "You may see some irrelevant test failures if you have been unable"
        @echo "to build lib/Config.pm."
        - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
@@ -577,20 +600,23 @@ minitest: miniperl
 ok:    utilities
        $(LBLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
 
+okfile:        utilities
+       $(LBLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
+
 nok:   utilities
        $(LBLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
 
 clist: $(c)
-       echo $(c) | tr ' ' '\012' >.clist
+       echo $(c) | tr ' ' $(TRNL) >.clist
 
 hlist:  $(h)
-       echo $(h) | tr ' ' '\012' >.hlist
+       echo $(h) | tr ' ' $(TRNL) >.hlist
 
 shlist: $(sh)
-       echo $(sh) | tr ' ' '\012' >.shlist
+       echo $(sh) | tr ' ' $(TRNL) >.shlist
 
 pllist: $(pl)
-       echo $(pl) | tr ' ' '\012' >.pllist
+       echo $(pl) | tr ' ' $(TRNL) >.pllist
 
 Makefile: Makefile.SH ./config.sh
        $(SHELL) Makefile.SH
@@ -598,7 +624,12 @@ Makefile: Makefile.SH ./config.sh
 distcheck: FORCE
        perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()'
 
-etags:
+elc:   emacs/cperl-mode.elc
+
+emacs/cperl-mode.elc: emacs/cperl-mode.el
+       -cd emacs; emacs -batch -q -no-site-file -f batch-byte-compile cperl-mode.el
+
+etags: emacs/cperl-mode.elc
        sh emacs/ptags
 
 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE