# Files to be built with variable substitution before miniperl
# is available.
sh = Makefile.SH cflags.SH config_h.SH makeaperl.SH makedepend.SH \
- makedir.SH myconfig.SH writemain.SH
+ makedir.SH myconfig.SH writemain.SH pod/Makefile.SH
shextract = Makefile cflags config.h makeaperl makedepend \
- makedir myconfig writemain
+ makedir myconfig writemain pod/Makefile
# Files to be built with variable substitution after miniperl is
# available. Dependencies handled manually below (for now).
pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL \
- pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL
+ pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL \
+ pod/buildtoc.PL
+# lib/lib.pm is not listed here because it has a rule of its own.
plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text \
- pod/pod2usage pod/podchecker pod/podselect
+ pod/pod2usage pod/podchecker pod/podselect \
+ pod/buildtoc
-addedbyconf = UU $(shextract) $(plextract) pstruct
+addedbyconf = UU $(shextract) $(plextract) lib/lib.pm 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
translators: miniperl lib/Config.pm FORCE
@echo " "; echo " Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
-utilities: miniperl lib/Config.pm $(plextract) FORCE
+utilities: miniperl lib/Config.pm $(plextract) lib/lib.pm FORCE
@echo " "; echo " Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all
$(CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB opmini.c
$(RMS) opmini.c
-miniperlmain$(OBJ_EXT): miniperlmain.c
+miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
$(CCCMD) $(PLDLFLAGS) $*.c
perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
!NO!SUBS!
+# if test -f .patch ; then $spitshell >>Makefile <<'!NO!SUBS!'
+# patchlevel.h: .patch
+# perl fix_pl || (make -f Makefile.micro && ./microperl fix_pl)
+# $(SHELL) Makefile.SH
+# fi
+#
+# !NO!SUBS!
+
# How to build libperl. This is still rather convoluted.
# Load up custom Makefile.SH fragment for shared loading and executables:
case "$osname" in
$(plextract): miniperl lib/Config.pm
$(LDLIBPTH) ./miniperl -Ilib $@.PL
+lib/lib.pm: miniperl lib/Config.pm
+ $(LDLIBPTH) ./miniperl -Ilib lib/lib_pm.PL
+
extra.pods: miniperl
-@test -f extra.pods && rm -f `cat extra.pods`
-@rm -f extra.pods
CHMOD_W = chmod +w
# The following files are generated automatically
+# 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 be regenerated, type
# make regen_headers
-KEYWORDS_PL_GEN = keywords.h
-
-OPCODE_PL_GEN = opcode.h opnames.h pp_proto.h pp.sym
-
-# embed.pl needs pp.sym generated by opcode.pl
-
-EMBED_PL_GEN = proto.h embed.h embedvar.h global.sym objXSUB.h \
- perlapi.h perlapi.c pod/perlintern.pod pod/perlapi.pod
-
-BYTECODE_PL_GEN = ext/ByteLoader/byterun.h ext/ByteLoader/byterun.c \
- ext/B/B/Asmdata.pm
-
-REGCOMP_PL_GEN = regnodes.h
-
-WARNINGS_PL_GEN = warnings.h lib/warnings.pm
-
-# End of automatically generated files.
-# Beginning of rules to generate them on request.
-
-AUTOGEN_FILES = $(KEYWORDS_PL_GEN) $(OPCODE_PL_GEN) $(EMBED_PL_GEN) \
- $(BYTECODE_PL_GEN) $(REGCOMP_PL_GEN) $(WARNINGS_PL_GEN)
+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 \
+ 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) $(AUTOGEN_FILES)
- perl keywords.pl
- perl opcode.pl
- perl embed.pl
- perl bytecode.pl
- perl regcomp.pl
- perl warnings.pl
-
-$(KEYWORDS_PL_GEN): keywords.pl FORCE
- $(CHMOD_W) $(KEYWORDS_PL_GEN)
- perl keywords.pl
-
-$(OPCODE_PL_GEN): opcode.pl FORCE
- $(CHMOD_W) $(OPCODE_PL_GEN)
- perl opcode.pl
-
-$(EMBED_PL_GEN): embed.pl FORCE
- $(CHMOD_W) $(EMBED_PL_GEN)
- perl embed.pl
-
-$(BYTECODE_PL_GEN): bytecode.pl FORCE
- $(CHMOD_W) $(BYTECODE_PL_GEN)
- perl bytecode.pl
-
-$(REGCOMP_PL_GEN): regcomp.pl FORCE
- $(CHMOD_W) $(REGCOMP_PL_GEN)
- perl regcomp.pl
-
-$(WARNINGS_PL_GEN): warnings.pl FORCE
- $(CHMOD_W) $(WARNINGS_PL_GEN)
- perl warnings.pl
+ -$(CHMOD_W) $(AUTOGEN_FILES)
+ -perl keywords.pl
+ -perl opcode.pl
+ -perl embed.pl
+ -perl bytecode.pl
+ -perl regcomp.pl
+ -perl warnings.pl
+
+regen_pods: FORCE
+ -cd pod; $(LDLIBPTH) make regen_pods
# Extensions:
# Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will
-rm -f perl.exp ext.libs extra.pods
-rm -f perl.export perl.dll perl.libexp perl.map perl.def
-rm -f perl.loadmap miniperl.loadmap perl.prelmap miniperl.prelmap
- rm -f perl suidperl miniperl $(LIBPERL)
+ rm -f perl suidperl miniperl $(LIBPERL) libperl.* microperl
# Do not 'make _tidy' directly.
_tidy:
-@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
$(LDLIBPTH) sh ext/util/make_ext realclean $$x MAKE=$(MAKE) ; \
done
- rm -f *.orig */*.orig *~ */*~ core core.*perl.*.? *perl.core t/core t/core.perl.*.? t/*perl.core t/misctmp* t/tmp* t/c t/perl so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR) .nfs* .*.c
+ rm -f core core.*perl.*.? *perl.core t/core t/core.perl.*.? t/*perl.core t/misctmp* t/forktmp* t/tmp* t/c t/perl .?*.c so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
rm -rf $(addedbyconf)
rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old
rm -f $(private)
rm -f h2ph.man pstruct
rm -rf .config
rm -f testcompile compilelog
- -rmdir lib/B lib/Data lib/IO/Socket lib/IO
+ -rmdir lib/B lib/Data lib/IO/Socket lib/IO lib/Sys
# The following lint has practically everything turned on. Unfortunately,
# you have to wade through a lot of mumbo jumbo that can't be suppressed.
nok: utilities
$(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
+nokfile: utilities
+ $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
+
clist: $(c)
echo $(c) | tr ' ' $(TRNL) >.clist