X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.SH;h=40b1db186221c79e9bf78eba2209137a6f9162d4;hb=aacdac464b116367cebe4e1e19fd4b760789bbdf;hp=bfb5610195393d50c188fc92fca976145dd67aad;hpb=e2bade80ab299fb4a9c08fa52e9a2dca32adff84;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Makefile.SH b/Makefile.SH index bfb5610..40b1db1 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -45,6 +45,14 @@ true) -compatibility_version 1 -current_version $patchlevel \ -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@" ;; + rhapsody*|darwin*) + shrpldflags="${ldflags} -dynamiclib \ + -compatibility_version 1 \ + -current_version \ + ${api_version}.${api_subversion} \ + -image_base 0x4be00000 \ + -install_name \$(shrpdir)/\$@" + ;; cygwin*) linklibperl="-lperl" ;; @@ -76,9 +84,6 @@ true) os2) ldlibpth='' ;; - rhapsody) - eval "ldlibpth=\"$ldlibpthname=`pwd`/Perl:\$$ldlibpthname\"" - ;; *) eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\"" ;; @@ -217,21 +222,24 @@ private = preplibrary lib/ExtUtils/Miniperl.pm lib/Config.pm # 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 @@ -281,7 +289,7 @@ compile: all 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 @@ -299,7 +307,7 @@ opmini$(OBJ_EXT): op.c $(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) @@ -317,6 +325,14 @@ ext.libs: $(static_ext) !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 @@ -521,18 +537,33 @@ lib/re.pm: ext/re/re.pm $(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 -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \ nx=`echo $$x | sed -e "s/README\.//"`; \ - $(LNS) ../$$x "pod/perl"$$nx".pod" ; \ + cd pod ; $(LNS) ../$$x "perl"$$nx".pod" ; cd .. ; \ echo "pod/perl"$$nx".pod" >> extra.pods ; \ done - -@test -f README.vms && $(LNS) ../README.vms pod/README_vms.pod && echo "pod/README_vms.pod" >> extra.pods - -@test -f vms/perlvms.pod && $(LNS) ../vms/perlvms.pod pod/perlvms.pod && echo "pod/perlvms.pod" >> extra.pods + -@test -f vms/perlvms.pod && cd pod && $(LNS) ../vms/perlvms.pod perlvms.pod && cd .. && echo "pod/perlvms.pod" >> extra.pods + +install-strip: + $(MAKE) STRIPFLAGS=-s install + +install: + $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) + +install-verbose: + $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-V + +install-silent: + $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-S -install: all install.perl install.man +no-install: + $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-n install.perl: all installperl if [ -n "$(COMPILE)" ]; \ @@ -542,17 +573,15 @@ install.perl: all installperl cd ../pod; $(MAKE) compile; \ else :; \ fi - $(LDLIBPTH) ./perl installperl + $(LDLIBPTH) ./perl installperl $(INSTALLFLAGS) $(STRIPFLAGS) install.man: all installman - $(LDLIBPTH) ./perl installman + $(LDLIBPTH) ./perl installman $(INSTALLFLAGS) # XXX Experimental. Hardwired values, but useful for testing. # Eventually Configure could ask for some of these values. install.html: all installhtml - -@test -f pod/README_vms.pod && rm -f pod/README_vms.pod - -@test -f README.vms && $(LNS) ../README.vms vms/README_vms.pod - -@test -f pod/perlvms.pod && rm -f pod/perlvms.pod + -@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd .. $(LDLIBPTH) ./perl installhtml \ --podroot=. --podpath=. --recurse \ --htmldir=$(privlib)/html \ @@ -614,20 +643,24 @@ CHMOD_W = chmod +w # 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 \ +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 + -$(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 @@ -653,23 +686,29 @@ n_dummy $(nonxs_ext): miniperl preplibrary $(DYNALOADER) FORCE clean: _tidy _mopup -realclean: _cleaner _mopup +realclean: _realcleaner _mopup @echo "Note that make realclean does not delete config.sh or Policy.sh" -clobber: _cleaner _mopup +_clobber: rm -f config.sh cppstdin Policy.sh +clobber: _realcleaner _mopup _clobber + distclean: clobber +# Like distclean but also removes emacs backups and *.orig. +veryclean: _verycleaner _mopup _clobber + -@rm -f Obsolete Wanted + # Do not 'make _mopup' directly. _mopup: rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c -@test -f extra.pods && rm -f `cat extra.pods` -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod - -rm -f perl.exp ext.libs extra.pods + -rm -f perl.exp ext.libs extra.pods opmini.o -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: @@ -681,16 +720,17 @@ _tidy: done rm -f testcompile compilelog -# Do not 'make _cleaner' directly. -_cleaner: +_cleaner1: -cd os2; rm -f Makefile - -cd pod; $(LDLIBPTH) $(MAKE) realclean - -cd utils; $(LDLIBPTH) $(MAKE) realclean - -cd x2p; $(LDLIBPTH) $(MAKE) realclean + -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN) + -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN) + -cd x2p; $(LDLIBPTH) $(MAKE) $(CLEAN) -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \ - $(LDLIBPTH) sh ext/util/make_ext realclean $$x MAKE=$(MAKE) ; \ + $(LDLIBPTH) sh ext/util/make_ext $(CLEAN) $$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 + +_cleaner2: + 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 t/ran_tests .?*.c so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR) rm -rf $(addedbyconf) rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old rm -f $(private) @@ -699,7 +739,16 @@ _cleaner: 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 lib/Thread + +_realcleaner: + @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=realclean + @$(LDLIBPTH) $(MAKE) _cleaner2 + +_verycleaner: + @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean + @$(LDLIBPTH) $(MAKE) _cleaner2 + -rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig # The following lint has practically everything turned on. Unfortunately, # you have to wade through a lot of mumbo jumbo that can't be suppressed. @@ -744,6 +793,7 @@ test check: test-prep else \ cd t && PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) ./perl TEST; \ fi + @echo "Ran tests" > t/ran_tests utest ucheck: test-prep if (true /dev/null 2>&1; then \ @@ -777,6 +827,9 @@ okfile: utilities 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