avoid $@-clearing sideeffect of require in Carp
[p5sagit/p5-mst-13.2.git] / Makefile.SH
index 044317d..1646478 100644 (file)
@@ -294,7 +294,10 @@ FORCE:
        @sh -c true
 
 opmini$(OBJ_EXT): op.c
-       $(CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB -o opmini$(OBJ_EXT) op.c
+       $(RMS) opmini.c
+       $(LNS) op.c opmini.c
+       $(CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB opmini.c
+       $(RMS) opmini.c
 
 miniperlmain$(OBJ_EXT): miniperlmain.c
        $(CCCMD) $(PLDLFLAGS) $*.c
@@ -441,6 +444,15 @@ miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
        $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
 !NO!SUBS!
                ;;
+       aix*)
+               $spitshell >>Makefile <<'!NO!SUBS!'
+miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
+       $(CC) -o miniperl $(CLDFLAGS) \
+           `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
+           miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
+       $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+!NO!SUBS!
+               ;;
        *)
                $spitshell >>Makefile <<'!NO!SUBS!'
 miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
@@ -585,24 +597,29 @@ SYMH = perlvars.h intrpvar.h thrdvar.h
 CHMOD_W = chmod +w
 
 # The following files are generated automatically
-#      keywords.h:     keywords.pl
-#      opcode.h:       opcode.pl
-#      pp_proto.h:     opcode.pl
-#      pp.sym:         opcode.pl
-#      embed.h:        embed.pl  [* needs pp.sym generated by opcode.pl! *]
-#      embedvar.h:     embed.pl  [* needs pp.sym generated by opcode.pl! *]
-#      ext/ByteLoader/byterun.h:       bytecode.pl
-#      ext/ByteLoader/byterun.c:       bytecode.pl
-#      ext/B/Asmdata.pm:       bytecode.pl
-#      global.sym:     embed.pl
-#      regnodes.h:     regcomp.pl
-#      warnings.h lib/warnings.pm:     warnings.pl
+#      keywords.pl:    keywords.h
+#      opcode.pl:      opcode.h opnames.h pp_proto.h pp.sym
+# [* embed.pl needs pp.sym generated by opcode.pl! *]
+#      embed.pl:       proto.h embed.h embedvar.h global.sym objXSUB.h
+#                      perlapi.h perlapi.c pod/perlintern.pod
+#                      pod/perlapi.pod
+#      bytecode.pl:    ext/ByteLoader/byterun.h ext/ByteLoader/byterun.c
+#                      ext/B/B/Asmdata.pm
+#      regcomp.pl:     regnodes.h
+#      warnings.pl:    warnings.h lib/warnings.pm
 # 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
+# To force them to be regenerated, type
 #      make regen_headers
+
+AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym embed.h \
+               embedvar.h global.sym pod/perlintern.pod pod/perlapi.pod \
+               objXSUB.h perlapi.h perlapi.c ext/ByteLoader/byterun.h \
+               ext/ByteLoader/byterun.c ext/B/B/Asmdata.pm regnodes.h \
+               warnings.h lib/warnings.pm
+
 regen_headers: FORCE
-       $(CHMOD_W) proto.h warnings.h lib/warnings.pm 
+       $(CHMOD_W) $(AUTOGEN_FILES)
        perl keywords.pl
        perl opcode.pl
        perl embed.pl