This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use $^O
[perl5.git] / Makefile.SH
index 4cdfc67..41e30e3 100644 (file)
@@ -120,7 +120,7 @@ DYNALOADER = lib/auto/DynaLoader/DynaLoader.a
 
 libs = $libs $cryptlib
 
-public = perl $suidperl
+public = perl $suidperl utilities translators
 
 shellflags = $shellflags
 
@@ -160,11 +160,9 @@ shextract = Makefile cflags config.h makeaperl makedepend \
 # Files to be built with variable substitution after miniperl is
 # available.  Dependencies handled manually below (for now).
 
-pl = c2ph.PL h2ph.PL h2xs.PL perldoc.PL \
-       pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL
+pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL
 
-plextract = c2ph h2ph h2xs perldoc \
-       pod/pod2html pod/pod2latex pod/pod2man
+plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text
 
 addedbyconf = UU $(shextract) $(plextract) pstruct
 
@@ -207,8 +205,15 @@ SHELL = /bin/sh
        $(CCCMD) $(PLDLFLAGS) $*.c
 
 all: makefile miniperl $(private) $(plextract) $(public) $(dynamic_ext)
+       @echo " "; echo "       Everything is up to date."
+
+translators:   miniperl lib/Config.pm FORCE
        @echo " "; echo "       Making x2p stuff"; cd x2p; $(MAKE) all
 
+utilities:     miniperl lib/Config.pm FORCE
+       @echo " "; echo "       Making utilities"; cd utils; $(MAKE) all
+
+
 # This is now done by installman only if you actually want the man pages.
 #      @echo " "; echo "       Making docs"; cd pod; $(MAKE) all;
 
@@ -219,9 +224,15 @@ FORCE:
 
 # The $& notation tells Sequent machines that it can do a parallel make,
 # and is harmless otherwise.
+# The miniperl -w -MExporter line is a basic cheap test to catch errors
+# before make goes on to run preplibrary and then MakeMaker on extensions.
+# This is very handy because later errors are often caused by miniperl
+# build problems but that's not obvious to the novice.
+# The Module used here must not depend on Config or any extensions.
 
 miniperl: $& miniperlmain.o $(perllib)
        $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o $(perllib) $(libs)
+       @./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest
 
 miniperlmain.o: miniperlmain.c
        $(CCCMD) $(PLDLFLAGS) $*.c
@@ -322,7 +333,7 @@ install.man:        all
 # normally shouldn't remake perly.[ch].
 
 run_byacc:     FORCE
-       @ echo 'Expect' 129 shift/reduce and 1 reduce/reduce conflict
+       @ echo 'Expect' 130 shift/reduce and 1 reduce/reduce conflict
        $(BYACC) -d perly.y
        sh $(shellflags) ./perly.fixer y.tab.c perly.c
        mv y.tab.h perly.h
@@ -373,17 +384,19 @@ s_dummy $(static_ext):    miniperl preplibrary $(DYNALOADER) FORCE
 clean:
        rm -f *.o *.a all perlmain.c
        rm -f perl.exp ext.libs
-       -cd x2p; $(MAKE) clean
        -cd pod; $(MAKE) clean
+       -cd utils; $(MAKE) clean
+       -cd x2p; $(MAKE) clean
        -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
        sh ext/util/make_ext clean $$x ; \
        done
        rm -f perl suidperl miniperl $(perllib)
 
 realclean: clean
-       -cd x2p; $(MAKE) realclean
-       -cd pod; $(MAKE) realclean
        -cd os2; rm -f Makefile
+       -cd pod; $(MAKE) realclean
+       -cd utils; $(MAKE) realclean
+       -cd x2p; $(MAKE) realclean
        -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
        sh ext/util/make_ext realclean $$x ; \
        done