pldlflags="$cccdlflags"
static_ldflags=''
case "${osname}${osvers}" in
- next4*)
- ld=libtool
- lddlflags="-dynamic -undefined warning -framework System \
- -compatibility_version 1 -current_version $patchlevel \
- -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
- ;;
darwin*)
shrpldflags="${ldflags} -dynamiclib \
-compatibility_version \
linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
;;
os390*)
- shrpldflags='-W l,XPLINK,dll'
- linklibperl='libperl.x'
- DPERL_EXTERNAL_GLOB=''
- ;;
+ case "$use64bitall" in
+ define|true|[yY]*) shrpldflags='-Wl,LP64,dll'
+ linklibperl='libperl.x'
+ ;;
+ *) shrpldflags='-Wl,XPLINK,dll'
+ linklibperl='libperl.x'
+ ;;
+ esac
+ ;;
esac
case "$ldlibpthname" in
'') ;;
;;
esac
+# ccdlflags, not to be confused with cccdlflags:
+case "${osname}" in
+aix)
+ # In AIX we need to change this for building Perl itself from
+ # the config.sh definition (which is for building external
+ # extensions *after* Perl has been built and installed)
+ ccdlflags=`echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
+ ;;
+esac
+
: is Cwd static or dynamic
static_cwd='define'
list_util_dep='$(PERL_EXE)'
PLDLFLAGS = $pldlflags
LIBPERL = $libperl
LLIBPERL= $linklibperl
-LLIBPERL_NONSHR= $linklibperl_nonshr
SHRPENV = $shrpenv
# Static targets are ordinarily built without CCCDLFLAGS. However,
EXE_EXT = $_exe
LIB_EXT = $_a
OBJ_EXT = $_o
-PATH_SEP = $p_
# Macros to invoke a copy of miniperl during the build. Targets which
# are built using these macros should depend on \$(MINIPERL_EXE)
# Any special object files needed by this architecture, e.g. os2/os2.obj
ARCHOBJS = $archobjs
-.SUFFIXES: .c \$(OBJ_EXT) .i .s
+.SUFFIXES: .c \$(OBJ_EXT) .i .s .c.depends
# grrr
SHELL = $sh
shextract = $shextract
!GROK!THIS!
+# Source files where we build a variant for miniperl:
+mini_special='op perl universal'
+for file in $mini_special; do
+ mini_special_c="$mini_special_c ${file}mini.c"
+ mini_only_objs="$mini_only_objs ${file}mini\$(OBJ_EXT)"
+ main_only_objs="$main_only_objs ${file}\$(OBJ_EXT)"
+ ctags_exclude="$ctags_exclude --exclude=${file}mini.c"
+done
+
## In the following dollars and backticks do not need the extra backslash.
$spitshell >>$Makefile <<'!NO!SUBS!'
c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro_core.c perl.c
c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c
-c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c keywords.c
-c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c caretx.c dquote.c time64.c
+c3 = taint.c toke.c util.c deb.c run.c builtin.c universal.c pad.c globals.c keywords.c
+c4 = perlio.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c caretx.c dquote.c time64.c
c5 = $(mallocsrc)
-c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c opmini.c perlmini.c
+!NO!SUBS!
+
+$spitshell >>$Makefile <<!GROK!THIS!
+mini_only_src =$mini_special_c
+mini_only_objs =$mini_only_objs
+main_only_objs =$main_only_objs
+!GROK!THIS!
-obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro_core$(OBJ_EXT) keywords$(OBJ_EXT)
+$spitshell >>$Makefile <<'!NO!SUBS!'
+
+c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c $(mini_only_src)
+
+obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro_core$(OBJ_EXT) keywords$(OBJ_EXT) builtin$(OBJ_EXT)
obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT)
-obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) caretx$(OBJ_EXT) dquote$(OBJ_EXT) time64$(OBJ_EXT)
+obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) caretx$(OBJ_EXT) dquote$(OBJ_EXT) time64$(OBJ_EXT)
# split the objects into 3 exclusive sets: those used by both miniperl and
# perl, and those used by just one or the other. Doesn't include the
# actual perl(mini)main.o, nor any dtrace objects.
common_objs = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
-mini_only_objs = opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
-main_only_objs = op$(OBJ_EXT) perl$(OBJ_EXT)
miniperl_objs_nodt = $(mini_only_objs) $(common_objs) miniperlmain$(OBJ_EXT)
perllib_objs_nodt = $(main_only_objs) $(common_objs)
$spitshell >>$Makefile <<'!NO!SUBS!'
-perltoc_pod_prereqs = extra.pods pod/perl53112delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
+perltoc_pod_prereqs = extra.pods pod/perl5360delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs)
generated_headers = uudmap.h bitcount.h mg_data.h
@sh -c true
!NO!SUBS!
-for file in op perl; do
+for file in $mini_special; do
if $issymlink $file.c; then
$spitshell >>$Makefile <<!GROK!THIS!
$spitshell >>$Makefile <<'!NO!SUBS!'
+cygwin.c: cygwin/cygwin.c
+ $(LNS) cygwin/cygwin.c
+
globals$(OBJ_EXT): $(generated_headers)
uudmap.h mg_data.h: bitcount.h
case "$osname" in
aix)
- $spitshell >>$Makefile <<!GROK!THIS!
-LIBS = $perllibs
-# In AIX we need to change this for building Perl itself from
-# its earlier definition (which is for building external
-# extensions *after* Perl has been built and installed)
-CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
-
-!GROK!THIS!
case "$useshrplib" in
define|true|[yY]*)
$spitshell >>$Makefile <<'!NO!SUBS!'
-LIBPERL_NONSHR = libperl_nonshr$(LIB_EXT)
-MINIPERL_NONSHR = miniperl_nonshr$(EXE_EXT)
-
-$(LIBPERL_NONSHR): $(perllib_objs)
- $(RMS) $(LIBPERL_NONSHR)
- $(AR) rc $(LIBPERL_NONSHR) $(perllib_objs)
-
-$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
- $(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \
- opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS)
-
-MINIPERLEXP = $(MINIPERL_NONSHR)
-
LIBPERLEXPORT = perl.exp
!NO!SUBS!
;;
*)
$spitshell >>$Makefile <<'!NO!SUBS!'
-MINIPERLEXP = $(MINIPERL_EXE)
PERLEXPORT = perl.exp
;;
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
-perl.exp: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH)
+perl.exp: $(MINIPERL_EXE) makedef.pl $(CONFIGPM) $(SYM) $(SYMH)
$(MINIPERL) makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp
!NO!SUBS!
!NO!SUBS!
;;
-cygwin)
- $spitshell >>$Makefile <<'!NO!SUBS!'
-cygwin.c: cygwin/cygwin.c
- $(LNS) cygwin/cygwin.c
-
-LIBPERL_NONSHR = libperl$(LIB_EXT)
-
-$(LIBPERL_NONSHR): $(perllib_objs)
- $(RMS) $(LIBPERL_NONSHR)
- $(AR) rc $(LIBPERL_NONSHR) $(perllib_objs)
-
-!NO!SUBS!
- ;;
esac
if test -s $Makefile_s ; then
# b) have the rest of the Makefile depend on the more obvious $(MINIPERL_EXE)
$(MINIPERL_EXE): lib/buildcustomize.pl
+ @touch $(MINIPERL_EXE)
!NO!SUBS!
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
- aix*)
- $spitshell >>$Makefile <<'!NO!SUBS!'
-lib/buildcustomize.pl: $& $(miniperl_objs)
- $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(miniperl_objs) $(libs)
- $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
-!NO!SUBS!
- ;;
- next4*)
- $spitshell >>$Makefile <<'!NO!SUBS!'
-lib/buildcustomize.pl: $& $(miniperl_objs) write ldcustomize.pl
- $(CC) -o $(MINIPERL_EXE) $(miniperl_objs libs)
- $(LDLIBPTH) ./miniperl$(HOST _EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
- $(MINIPERL) -f write_buildcustomize.pl
-!NO!SUBS!
- ;;
darwin*)
case "$osvers" in
[1-6].*) ;;
-@rm -f miniperl.xok
!NO!SUBS!
- case $osname in
+ case "$osname" in
# In AmigaOS the Perl executable needs to be linked with -ldl,
# but none of the other executables should be.
amigaos) $spitshell >>$Makefile <<'!NO!SUBS!'
pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
$(MINIPERL) pod/perlmodlib.PL -q
-pod/perl53112delta.pod: pod/perldelta.pod
- $(RMS) pod/perl53112delta.pod
- $(LNS) perldelta.pod pod/perl53112delta.pod
+pod/perl5360delta.pod: pod/perldelta.pod
+ $(RMS) pod/perl5360delta.pod
+ $(LNS) perldelta.pod pod/perl5360delta.pod
extra.pods: $(MINIPERL_EXE)
-@test ! -f extra.pods || rm -f `cat extra.pods`
CHMOD_W = chmod +w
# The following files are generated automatically
-# embed.pl: proto.h embed.h embedvar.h perlapi.h perlapi.c
+# embed.pl: proto.h embed.h embedvar.h
# opcode.pl: opcode.h opnames.h pp_proto.h
# regcomp.pl: regnodes.h
# warnings.pl: warnings.h lib/warnings.pm
# Do not 'make _mopup' directly.
_mopup:
- rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers)
+ rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c $(mini_only_src) generate_uudmap$(EXE_EXT) $(generated_headers)
-rmdir .depending
+ -rm *.depends makedepend_file
-@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 $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall
+ -rm -f perl.exp ext.libs $(generated_pods) uni.data $(mini_only_objs) pod/roffitall
-rm -f perl.export perl.dll perl.libexp perl.map perl.def
-rm -f *perl.xok
-rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
-rm -f `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'`
# Dear POSIX, thanks for making the default to xargs to be
-# run once if nothhing is passed in. It is such a great help.
+# run once if nothing is passed in. It is such a great help.
# Some systems do not support "?", so keep these files separate.
rm -rf pod/perlfunc pod/perlipc
-rmdir ext/B/lib
-rm -f dist/Time-HiRes/xdefine
- rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
+ rm -f so_locations $(LIBPERL_NONSHR)
-rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
-rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
-rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
-rmdir lib/Test2/IPC/Driver lib/Test2/IPC lib/Test2/Hub/Interceptor
-rmdir lib/Test2/Hub lib/Test2/Formatter lib/Test2/EventFacet/Info
-rmdir lib/Test2/EventFacet lib/Test2/Event/TAP lib/Test2/Event
- -rmdir lib/Test2/API lib/Test2 lib/Test/use lib/Test/Tester
- -rmdir lib/Test/Builder/Tester lib/Test/Builder/IO lib/Test/Builder
- -rmdir lib/Test lib/Term lib/TAP/Parser/YAMLish
- -rmdir lib/TAP/Parser/SourceHandler lib/TAP/Parser/Scheduler
- -rmdir lib/TAP/Parser/Result lib/TAP/Parser/Iterator lib/TAP/Parser
- -rmdir lib/TAP/Harness lib/TAP/Formatter/File
- -rmdir lib/TAP/Formatter/Console lib/TAP/Formatter lib/TAP
- -rmdir lib/Sys/Syslog lib/Sys lib/Sub lib/Search lib/Scalar
- -rmdir lib/Pod/Text lib/Pod/Simple lib/Pod/Perldoc lib/PerlIO/via
- -rmdir lib/PerlIO lib/Perl lib/Parse/CPAN lib/Parse lib/Params
- -rmdir lib/Net/FTP lib/Module/Load lib/Module/CoreList lib/Module
- -rmdir lib/Memoize lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME
+ -rmdir lib/Test2/API/InterceptResult lib/Test2/API lib/Test2
+ -rmdir lib/Test/use lib/Test/Tester lib/Test/Builder/Tester
+ -rmdir lib/Test/Builder/IO lib/Test/Builder lib/Test lib/Term
+ -rmdir lib/TAP/Parser/YAMLish lib/TAP/Parser/SourceHandler
+ -rmdir lib/TAP/Parser/Scheduler lib/TAP/Parser/Result
+ -rmdir lib/TAP/Parser/Iterator lib/TAP/Parser lib/TAP/Harness
+ -rmdir lib/TAP/Formatter/File lib/TAP/Formatter/Console
+ -rmdir lib/TAP/Formatter lib/TAP lib/Sys/Syslog lib/Sys lib/Sub
+ -rmdir lib/Search lib/Scalar lib/Pod/Text lib/Pod/Simple
+ -rmdir lib/Pod/Perldoc lib/Pod/Html lib/PerlIO/via lib/PerlIO lib/Perl
+ -rmdir lib/Parse/CPAN lib/Parse lib/Params lib/Net/FTP lib/Module/Load
+ -rmdir lib/Module/CoreList lib/Module lib/Memoize lib/Math/BigRat
+ -rmdir lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME
-rmdir lib/Locale/Maketext lib/Locale lib/List/Util lib/List
-rmdir lib/JSON/PP lib/JSON lib/IPC lib/IO/Uncompress/Adapter
-rmdir lib/IO/Uncompress lib/IO/Socket lib/IO/Compress/Zlib
# The README below ensures that the dependency list is never empty and
# that when MAKEDEPEND is empty $(FIRSTMAKEFILE) doesn't need rebuilding.
-MAKEDEPEND = Makefile makedepend
+MAKEDEPEND = Makefile makedepend_file makedepend
$(FIRSTMAKEFILE): README $(MAKEDEPEND)
$(MAKE) depend MAKEDEPEND=
depend: makedepend $(DTRACE_H) $(generated_headers)
sh ./makedepend MAKE="$(MAKE)" cflags
+.c.c.depends:
+ sh ./makedepend_file $< $@ cflags
+
.PHONY: test check test_prep test_prep_nodll test_prep_pre \
test_prep_reonly test_tty test-tty test_notty test-notty \
test_harness test_harness_notty minitest test-reonly _test
HARNESS_NOTTY=1 TESTFILE=harness $(RUN_TESTS) choose
test_reonly test-reonly: test_prep_reonly
- TEST_ARGS='-re \bre\/' TESTFILE=harness $(RUN_TESTS) choose
+ TEST_ARGS='re/*.t ext/re/t/*.t' TESTFILE=harness $(RUN_TESTS) choose
# Porting tests (well-formedness of pod, manifest, etc)
test_porting test-porting: test_prep
- cd t && $(RUN_PERL) harness porting/*.t ../lib/diagnostics.t
+ TEST_ARGS='porting/*.t lib/diagnostics.t' TESTFILE=harness $(RUN_TESTS) choose
!NO!SUBS!
TAGS: $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
etags $(c1) $(c2) $(c3) $(c4) $(c5) $(h)
+!NO!SUBS!
+
+$spitshell >>$Makefile <<!GROK!THIS!
ctags:
- ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h
+ ctags -f Tags -N --totals --languages=c --langmap=c:+.h $ctags_exclude *.c *.h
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
# If this runs make out of memory, delete /usr/include lines.
-!NO!SUBS!
+!GROK!THIS!
$eunicefix Makefile
$rm -f $firstmakefile