true)
# Prefix all runs of 'miniperl' and 'perl' with
# $ldlibpth so that ./perl finds *this* shared libperl.
- ldlibpth="LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH"
+ case "$LD_LIBRARY_PATH" in
+ '')
+ ldlibpth="LD_LIBRARY_PATH=`pwd`";;
+ *)
+ ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
+ esac
pldlflags="$cccdlflags"
case "${osname}${osvers}" in
-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"
;;
os2)
ldlibpth=''
;;
- rhapsody)
- eval "ldlibpth=\"$ldlibpthname=`pwd`/Perl:\$$ldlibpthname\""
- ;;
*)
eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
;;
esac
+ # Strip off any trailing :'s
+ ldlibpth=`echo $ldlibpth | sed 's/:*$//'`
;;
esac
;;
# 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 lib/lib.pm.PL
plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text \
- pod/pod2usage pod/podchecker pod/podselect
+ pod/pod2usage pod/podchecker pod/podselect lib/lib.pm
addedbyconf = UU $(shextract) $(plextract) pstruct
@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
# How to build libperl. This is still rather convoluted.
# Load up custom Makefile.SH fragment for shared loading and executables:
case "$osname" in
-cygwin*)
- Makefile_s="cygwin/Makefile.SHs"
- ;;
*)
Makefile_s="$osname/Makefile.SHs"
;;
$(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)
extra.pods: miniperl
-@test -f extra.pods && rm -f `cat extra.pods`
-@rm -f extra.pods
- -@for x in `grep -l '^=[a-z]' README.*` ; do \
+ -@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" ; \
echo "pod/perl"$$nx".pod" >> extra.pods ; \
done
+ -@test -f vms/perlvms.pod && $(LNS) ../vms/perlvms.pod pod/perlvms.pod && echo "pod/perlvms.pod" >> extra.pods
+
+install-strip:
+ $(MAKE) STRIPFLAGS=-s install
install: all install.perl install.man
cd ../pod; $(MAKE) compile; \
else :; \
fi
- $(LDLIBPTH) ./perl installperl
+ $(LDLIBPTH) ./perl installperl $(STRIPFLAGS)
install.man: all installman
$(LDLIBPTH) ./perl installman
# XXX Experimental. Hardwired values, but useful for testing.
# Eventually Configure could ask for some of these values.
install.html: all installhtml
+ -@test -f README.vms && $(LNS) ../README.vms vms/README_vms.pod
$(LDLIBPTH) ./perl installhtml \
--podroot=. --podpath=. --recurse \
--htmldir=$(privlib)/html \
run_byacc: FORCE
$(BYACC) -d perly.y
- chmod 664 perly.c
+ -chmod 664 perly.c
sh $(shellflags) ./perly.fixer y.tab.c perly.c
sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \
-e 's/y\.tab/perly/g' perly.c >perly.tmp && mv perly.tmp perly.c
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 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) proto.h warnings.h lib/warnings.pm
- 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
# Extensions:
# Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will
_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.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)
+ rm -f *.orig */*.orig *~ */*~ 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)
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