add Pod-Parser-1.08 (verbatim module =include tests elided owing
[p5sagit/p5-mst-13.2.git] / Makefile.SH
index 3660bf5..2530d4f 100644 (file)
@@ -46,9 +46,12 @@ true)
        os2*)   # OS/2 doesn't need anything special for LD_LIBRARY_PATH.
                ldlibpth=''
                ;;
-       sunos*|freebsd[23]*|netbsd*)
+       sunos*)
                linklibperl="-lperl"
                ;;
+       netbsd*|freebsd[234]*)
+               linklibperl="-L. -lperl"
+               ;;
        aix*)
                shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
                case "$osvers" in
@@ -62,9 +65,11 @@ true)
                aixinstdir=`pwd | sed 's/\/UU$//'`
                linklibperl="-L $archlibexp/CORE -L $aixinstdir -lperl"
                ;;
-       hpux10*)
+       hpux10*|hpux11*)
                linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+b$archlibexp/CORE -lperl"
                ;;
+       beos*)  ldlibpth="LIBRARY_PATH=`pwd`:$LIBRARY_PATH"
+               ;;
        esac
        ;;
 *)     pldlflags=''
@@ -161,7 +166,7 @@ shellflags = $shellflags
 $make_set_make
 
 # These variables may need to be manually set for non-Unix systems.
-AR = $ar
+AR = $full_ar
 EXE_EXT = $_exe
 LIB_EXT = $_a
 OBJ_EXT = $_o
@@ -538,12 +543,12 @@ _cleaner:
        -@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 core.perl.*.? core.miniperl.*.? perl.core miniperl.core t/core t/core.perl.*.? t/perl.core t/tmp???? t/c t/perl
+       rm -f *.orig */*.orig *~ */*~ core core.perl.*.? core.miniperl.*.? perl.core miniperl.core t/core t/core.perl.*.? t/perl.core t/tmp???? t/c t/perl so_locations t/nonexistent1
        rm -rf $(addedbyconf)
        rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old
        rm -f $(private)
        rm -rf lib/auto
-       rm -f lib/.exists
+       rm -f lib/.exists lib/*/.exists
        rm -f h2ph.man pstruct
        rm -rf .config
        rm -f testcompile compilelog
@@ -608,13 +613,13 @@ minitest: miniperl lib/re.pm
 # Please *don't* use this unless all tests pass.
 # If you want to report test failures, use "make nok" instead.
 ok:    utilities
-       $(LBLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
+       $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
 
 okfile:        utilities
-       $(LBLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
+       $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
 
 nok:   utilities
-       $(LBLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
+       $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
 
 clist: $(c)
        echo $(c) | tr ' ' $(TRNL) >.clist
@@ -641,6 +646,9 @@ emacs/cperl-mode.elc: emacs/cperl-mode.el
 
 etags: emacs/cperl-mode.elc
        sh emacs/ptags
+       perl emacs/e2ctags.pl TAGS > tags
+
+ctags: etags
 
 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
 # If this runs make out of memory, delete /usr/include lines.
@@ -664,6 +672,7 @@ $define)
 case "$osname" in
 os390|posix-bc)
     rm -f y.tab.c y.tab.h
+    # yacc must be a reentrant ("pure") Bison in BS2000 Posix!
     yacc -d perly.y >/dev/null 2>&1
     if cmp -s y.tab.c perly.c; then
         rm -f y.tab.c
@@ -695,42 +704,49 @@ os390|posix-bc)
         mv -f y.tab.h perly.h
         xxx="$xxx perly.h"
     fi
-    cd x2p
-    rm -f y.tab.c
-    case "$osname" in
-    os390)
-       yacc -d a2p.y >/dev/null 2>&1
-        ;;
-    *) # e.g. posix-bc
-       yacc a2p.y >/dev/null 2>&1
-        ;;
-    esac
-    if cmp -s y.tab.c a2p.c
-    then
-        rm -f y.tab.c
-    else
-        echo "a2p.y -> a2p.c" >&2
-        mv -f y.tab.c a2p.c
-        chmod u+w a2p.c
-        sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \
-            -e 's/y\.tab/a2p/g' a2p.c >a2p.tmp && mv a2p.tmp a2p.c
-        xxx="$xxx a2p.c"
-    fi
-    if cmp -s y.tab.h a2p.h
+    if cd x2p
     then
-        rm -f y.tab.h
-    else
-        echo "a2p.h -> a2p.h" >&2
-        mv -f y.tab.h a2p.h
-        xxx="$xxx a2p.h"
+        rm -f y.tab.c y.tab.h
+        case "$osname" in
+        posix-bc)
+           # we are using two different yaccs in BS2000 Posix!
+           byacc a2p.y >/dev/null 2>&1
+           ;;
+        *) # e.g. os390
+           yacc  a2p.y >/dev/null 2>&1
+           ;;
+        esac
+        if cmp -s y.tab.c a2p.c
+        then
+            rm -f y.tab.c
+        else
+            echo "a2p.y -> a2p.c" >&2
+            mv -f y.tab.c a2p.c
+            chmod u+w a2p.c
+            sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \
+                -e 's/y\.tab/a2p/g' a2p.c >a2p.tmp && mv a2p.tmp a2p.c
+            xxx="$xxx a2p.c"
+        fi
+        # In case somebody yacc -d:ed the a2p.y.
+        if test -f y.tab.h
+        then
+            if cmp -s y.tab.h a2p.h
+            then
+                rm -f y.tab.h
+            else
+                echo "a2p.h -> a2p.h" >&2
+                mv -f y.tab.h a2p.h
+                xxx="$xxx a2p.h"
+            fi
+        fi
+        cd ..
     fi
-    cd ..
     ;;
 vmesa)
     # Do nothing in VM/ESA.
     ;;
 *)
-    echo "'$osname' is an EBCDIC system I don't know well." >&4
+    echo "'$osname' is an EBCDIC system I don't know that well." >&4
     ;;
 esac
     case "$xxx" in