;;
esac
+case $CROSS_NAME in
+'')
+ Makefile=Makefile
+ ;;
+*)
+ # if cross-compilation, the Makefile named accordingly
+ Makefile=Makefile-cross-$CROSS_NAME
+ . Cross/config-${CROSS_NAME}.sh
+ ;;
+esac
+
# H.Merijn Brand [17 Feb 2004]
# This comment is just to ensure that Configure will find variables that
# are removed/replaced in patches on blead, but are still needed in the
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
-case "$d_dosuid" in
-*define*) suidperl='suidperl' ;;
-*) suidperl='';;
-esac
-
linklibperl='$(LIBPERL)'
+linklibperl_nonshr=''
shrpldflags='$(LDDLFLAGS)'
ldlibpth=''
DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
+DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL'
case "$useshrplib" in
true)
# Prefix all runs of 'miniperl' and 'perl' with
-install_name \$(shrpdir)/\$@"
;;
cygwin*)
- linklibperl="-lperl"
+ shrpldflags="$shrpldflags -Wl,--out-implib=libperl.dll.a -Wl,--image-base,0x52000000"
+ linklibperl="-L. -lperl"
;;
sunos*)
linklibperl="-lperl"
shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
;;
aix*)
- shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
- case "$osvers" in
- 3*) shrpldflags="$shrpldflags -e _nostart"
+ case "$cc" in
+ gcc*)
+ shrpldflags="-shared -Wl,-H512 -Wl,-T512 -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bE:perl.exp"
+ case "$osvers" in
+ 3*) shrpldflags="$shrpldflags -e _nostart"
+ ;;
+ *) shrpldflags="$shrpldflags -Wl,-bnoentry"
+ ;;
+ esac
+ shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
+ linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
+ linklibperl_nonshr='-lperl_nonshr'
;;
- *) shrpldflags="$shrpldflags -bnoentry"
+ *)
+ shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
+ case "$osvers" in
+ 3*) shrpldflags="$shrpldflags -e _nostart"
+ ;;
+ *) shrpldflags="$shrpldflags -b noentry"
+ ;;
+ esac
+ shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
+ linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
+ linklibperl_nonshr='-lperl_nonshr'
;;
esac
- shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
- linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
;;
hpux*)
linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
: Parallel makes reveal that we have some interdependencies
case $f in
- Math/BigInt/FastCalc) extra_dep="$extra_dep
+ Math/BigInt/FastCalc|Devel/NYTProf) extra_dep="$extra_dep
$this_target: lib/auto/List/Util/Util.$dlext" ;;
Unicode/Normalize) extra_dep="$extra_dep
$this_target: uni.data" ;;
;;
esac
-echo "Extracting Makefile (with variable substitutions)"
-$spitshell >Makefile <<!GROK!THIS!
-# Makefile.SH
+echo "Extracting $Makefile (with variable substitutions)"
+$spitshell >$Makefile <<!GROK!THIS!
+# $Makefile
# This file is derived from Makefile.SH. Any changes made here will
# be lost the next time you run Configure.
# Makefile is used to generate $firstmakefile. The only difference
PLDLFLAGS = $pldlflags
LIBPERL = $libperl
LLIBPERL= $linklibperl
+LLIBPERL_NONSHR= $linklibperl_nonshr
SHRPENV = $shrpenv
# Static targets are ordinarily built without CCCDLFLAGS. However,
# if building a shared libperl.so that might later be linked into
# another application, then it might be appropriate to also build static
# extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC
-# for GNU cc). This is handled by ext/util/make_ext.
+# for GNU cc). This is handled by ext/util/make_ext.pl.
STATIC = $static_target
# The following is used to include the current directory in
# Sometimes running an executable is an adventure.
RUN = $run
+# These variables may need to be manually set for non-Unix systems.
+AR = $full_ar
+HOST_EXE_EXT =
+EXE_EXT = $_exe
+LIB_EXT = $_a
+OBJ_EXT = $_o
+PATH_SEP = $p_
+
+#
dynamic_ext = $dynamic_list
static_ext = $static_list
nonxs_ext = $nonxs_list
libs = $perllibs $cryptlib
-public = perl\$(EXE_EXT) $suidperl utilities translators
+public = perl\$(EXE_EXT) utilities translators
shellflags = $shellflags
# Mention $gmake here so it gets probed for by Configure.
-# These variables may need to be manually set for non-Unix systems.
-AR = $full_ar
-EXE_EXT = $_exe
-LIB_EXT = $_a
-OBJ_EXT = $_o
-PATH_SEP = $p_
-
# If you're going to use valgrind and it can't be invoked as plain valgrind
# then you'll need to change this, or override it on the make command line.
VALGRIND=valgrind
case "${osname}:${osvers}" in
darwin:*)
-$spitshell >>Makefile <<EOF
+$spitshell >>$Makefile <<EOF
# Your locales are broken (osname $osname, osvers $osvers)
# and to avoid the numerous
;;
esac
+case $CROSS_NAME in
+'')
## In the following dollars and backticks do not need the extra backslash.
-$spitshell >>Makefile <<'!NO!SUBS!'
+$spitshell >>$Makefile <<'!NO!SUBS!'
CCCMD = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $@`
CCCMDSRC = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $<`
+# we dont include lib/Config_git.pl here, as it causes circular dependencies
CONFIGPM = lib/Config.pm lib/Config_heavy.pl
-private = preplibrary $(CONFIGPM) lib/Config.pod lib/ExtUtils/Miniperl.pm
+# so we add it here:
+CONFIGPM_EXTRA = $(CONFIGPM) lib/Config_git.pl
+
+CONFIGPOD = lib/Config.pod
+
+CONFIGH = config.h
+!NO!SUBS!
+ ;;
+*)
+ # if cross-compilation
+$spitshell >>$Makefile <<!GROK!THIS!
+CROSS_NAME = $CROSS_NAME
+CROSS_LIB = xlib/$CROSS_NAME
+
+CCCMD = \`sh \$(shellflags) cflags-cross-$CROSS_NAME "optimize='\$(OPTIMIZE)'" \$@\` -I\$(CROSS_LIB)
+CCCMDSRC = \`sh \$(shellflags) cflags-cross-$CROSS_NAME "optimize='\$(OPTIMIZE)'" \$<\` -I\$(CROSS_LIB)
+CONFIGPM = xlib/\$(CROSS_NAME)/Config.pm
+CONFIGPOD = xlib/\$(CROSS_NAME)/Config.pod
+CONFIGH = xconfig.h
+
+xconfig.h: config_h.SH Cross/config-\$(CROSS_NAME).sh
+ CONFIG_SH=Cross/config-\$(CROSS_NAME).sh CONFIG_H=xconfig.h \$(SHELL) config_h.SH
+ #TODO \$(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib -MCross=\$(CROSS_NAME) config_h.PL "INST_VER=\$(INST_VER)" "CORE_DIR=\$(CROSS_LIB)" "CONFIG_H=xconfig.h"
+ cp xconfig.h \$(CROSS_LIB)/
+ cp xconfig.h \$(CROSS_LIB)/config.h
+
+!GROK!THIS!
+ ;;
+esac
+
+## In the following dollars and backticks do not need the extra backslash.
+$spitshell >>$Makefile <<'!NO!SUBS!'
+
+private = preplibrary $(CONFIGPM) $(CONFIGPOD) lib/ExtUtils/Miniperl.pm
# Files to be built with variable substitution before miniperl
# is available.
# Directories of Unicode data files generated by mktables
unidatadirs = lib/unicore/To lib/unicore/lib
-h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h
+h1 = EXTERN.h INTERN.h XSUB.h av.h $(CONFIGH) cop.h cv.h dosish.h
h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h opcode.h
h3 = pad.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h
h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h
c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c
c5 = $(madlysrc) $(mallocsrc)
-c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c perlmain.c opmini.c
+c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c perlmain.c opmini.c perlmini.c
-obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro$(OBJ_EXT)
-obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) perl$(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)
+obj0 = op$(OBJ_EXT) perl$(OBJ_EXT)
+obj1 = $(madlyobj) $(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$(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) xsutils$(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)
-ndt_obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
+mini_obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
+ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
obj = $(ndt_obj) $(DTRACE_O)
lintflags = \
splintfiles = $(c1)
-.c$(OBJ_EXT):
+.c$(OBJ_EXT):
$(CCCMD) $(PLDLFLAGS) $*.c
-.c.i:
+.c.i:
$(CCCMDSRC) -E $*.c > $*.i
.c.s:
$(CCCMDSRC) -S $*.c
-all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
+all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) miniperl extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
@echo " ";
@echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
-sperl$(OBJ_EXT): perl.c $(h)
- $(RMS) sperl.c
- $(LNS) perl.c sperl.c
- $(CCCMD) -DIAMSUID sperl.c
- $(RMS) sperl.c
+.PHONY: all translators utilities
-sperl.i: perl.c $(h)
- $(CCCMDSRC) -DIAMSUID -E perl.c > sperl.i
+git_version.h: miniperl$(EXE_EXT) make_patchnum.pl
+ -$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_patchnum.pl
-.PHONY: all translators utilities
+# make sure that we recompile perl.c if the git version changes
+perl$(OBJ_EXT): git_version.h
translators: miniperl$(EXE_EXT) $(CONFIGPM) FORCE
@echo " "; echo " Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
FORCE:
@sh -c true
!NO!SUBS!
-$spitshell >>Makefile <<!GROK!THIS!
+$spitshell >>$Makefile <<!GROK!THIS!
# We do a copy of the op.c instead of a symlink because gcc gets huffy
# if we have a symlink forest to another disk (it complains about too many
opmini\$(OBJ_EXT): opmini.c
\$(CCCMD) \$(PLDLFLAGS) $DPERL_EXTERNAL_GLOB opmini.c
+perlmini.c: perl.c
+ \$(RMS) perlmini.c
+ \$(CPS) perl.c perlmini.c
+
+perlmini\$(OBJ_EXT): perlmini.c
+ \$(CCCMD) \$(PLDLFLAGS) $DPERL_IS_MINIPERL perlmini.c
+
globals\$(OBJ_EXT): uudmap.h
-uudmap.h: generate_uudmap\$(EXE_EXT)
- \$(RUN) ./generate_uudmap\$(EXE_EXT) >uudmap.h
+uudmap.h: generate_uudmap\$(HOST_EXE_EXT)
+ \$(RUN) ./generate_uudmap\$(HOST_EXE_EXT) >uudmap.h
-generate_uudmap\$(EXE_EXT): generate_uudmap\$(OBJ_EXT)
- \$(CC) -o generate_uudmap \$(LDFLAGS) generate_uudmap\$(OBJ_EXT) \$(libs)
+generate_uudmap\$(HOST_EXE_EXT): generate_uudmap\$(OBJ_EXT)
+ \$(CC) -o generate_uudmap\$(EXE_EXT) \$(LDFLAGS) generate_uudmap\$(OBJ_EXT) \$(libs)
!GROK!THIS!
-$spitshell >>Makefile <<'!NO!SUBS!'
+$spitshell >>$Makefile <<'!NO!SUBS!'
miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
$(CCCMD) $(PLDLFLAGS) $*.c
perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
sh writemain $(DYNALOADER) $(static_ext) > perlmain.c
-!NO!SUBS!
-case "$osname" in
-cygwin)
- ;; # Let cygwin/Makefile.SHs do its work.
-*)
- $spitshell >>Makefile <<'!NO!SUBS!'
perlmain$(OBJ_EXT): perlmain.c
$(CCCMD) $(PLDLFLAGS) $*.c
-!NO!SUBS!
- ;;
-esac
-$spitshell >>Makefile <<'!NO!SUBS!'
# The file ext.libs is a list of libraries that must be linked in
# for static extensions, e.g. -lm -lgdbm, etc. The individual
# static extension Makefile's add to it.
case "$osname" in
aix)
- $spitshell >>Makefile <<!GROK!THIS!
+ $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
!GROK!THIS!
case "$useshrplib" in
define|true|[yY]*)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
LIBPERL_NONSHR = libperl_nonshr$(LIB_EXT)
MINIPERL_NONSHR = miniperl_nonshr$(EXE_EXT)
$(RMS) $(LIBPERL_NONSHR)
$(AR) rcu $(LIBPERL_NONSHR) $(obj)
-$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT)
+$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
$(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \
- opmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS)
+ opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS)
MINIPERLEXP = $(MINIPERL_NONSHR)
;;
*)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
MINIPERLEXP = miniperl$(EXE_EXT)
PERLEXPORT = perl.exp
!NO!SUBS!
;;
esac
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
perl.exp: $(MINIPERLEXP) makedef.pl config.sh $(SYM) $(SYMH)
./$(MINIPERLEXP) makedef.pl PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" | sort -u | sort -f > perl.exp
!NO!SUBS!
;;
os2)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
MINIPERLEXP = miniperl
perl5.def: $(MINIPERLEXP) makedef.pl config.sh $(SYM) $(SYMH) miniperl.map
!NO!SUBS!
;;
+cygwin)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+cygwin.c: cygwin/cygwin.c
+ $(LNS) cygwin/cygwin.c
+
+LIBPERL_NONSHR = libperl$(LIB_EXT)
+
+$(LIBPERL_NONSHR): $(obj)
+ $(RMS) $(LIBPERL_NONSHR)
+ $(AR) rcu $(LIBPERL_NONSHR) $(obj)
+
+!NO!SUBS!
+ ;;
esac
-if test -r $Makefile_s ; then
+if test -s $Makefile_s ; then
. $Makefile_s
- $spitshell >>Makefile <<!GROK!THIS!
+ $spitshell >>$Makefile <<!GROK!THIS!
Makefile: $Makefile_s
!GROK!THIS!
else
case "$dtrace_h" in
?*)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
$(DTRACE_H): perldtrace.d
$(DTRACE) -h -s perldtrace.d -o $(DTRACE_H)
esac
case "$dtrace_o" in
?*)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
$(DTRACE_O): perldtrace.d
$(DTRACE) -G -s perldtrace.d -o $(DTRACE_O) $(ndt_obj)
!NO!SUBS!
;;
esac
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
$(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT)
!NO!SUBS!
case "$useshrplib" in
true)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
rm -f $@
$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
!NO!SUBS!
case "$osname" in
aix)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
rm -f libperl$(OBJ_EXT)
mv $@ libperl$(OBJ_EXT)
$(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
esac
;;
*)
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
rm -f $(LIBPERL)
$(AR) rcu $(LIBPERL) $(obj) $(DYNALOADER)
@$(ranlib) $(LIBPERL)
!NO!SUBS!
;;
esac
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
# How to build executables.
case "${osname}${osvers}" in
aix*|beos*)
- $spitshell >>Makefile <<'!NO!SUBS!'
-miniperl: $& miniperlmain$(OBJ_EXT) $(obj) opmini$(OBJ_EXT)
- $(CC) -o miniperl $(CLDFLAGS) \
- `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
- $(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(mini_obj) opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
+ $(CC) -o miniperl$(EXE_EXT) $(CLDFLAGS) \
+ $(mini_obj) \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs)
+ $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
!NO!SUBS!
;;
next4*)
- $spitshell >>Makefile <<'!NO!SUBS!'
-miniperl: $& miniperlmain$(OBJ_EXT) $(obj) opmini$(OBJ_EXT)
- $(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
- $(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(mini_obj) perlmini$(OBJ_EXT) opmini$(OBJ_EXT)
+ $(CC) -o miniperl$(EXE_EXT) $(mini_obj) \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs)
+ $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
!NO!SUBS!
;;
darwin*)
*) case "$ldflags" in
*"-flat_namespace"*) ;;
*) # to allow opmini.o to override stuff in libperl.dylib
- $spitshell >>Makefile <<!NO!SUBS!
+ $spitshell >>$Makefile <<!NO!SUBS!
NAMESPACEFLAGS = -force_flat_namespace
!NO!SUBS!
;;
esac
;;
esac
- $spitshell >>Makefile <<'!NO!SUBS!'
-miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(obj) opmini$(OBJ_EXT)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(mini_obj) opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
-@rm -f miniperl.xok
- $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o miniperl \
- `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
- $(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o miniperl$(EXE_EXT) \
+ $(mini_obj) \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs)
+ $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
!NO!SUBS!
;;
*)
- $spitshell >>Makefile <<'!NO!SUBS!'
-miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(obj) opmini$(OBJ_EXT)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
+miniperl$(EXE_EXT): $& miniperlmain$(OBJ_EXT) $(mini_obj) opmini$(OBJ_EXT) perlmini$(OBJ_EXT)
-@rm -f miniperl.xok
- $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \
- `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
- miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(libs)
- $(LDLIBPTH) $(RUN) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl$(EXE_EXT) \
+ $(mini_obj) \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(libs)
+ $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
!NO!SUBS!
;;
esac
- $spitshell >>Makefile <<'!NO!SUBS!'
+ $spitshell >>$Makefile <<'!NO!SUBS!'
perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
-@rm -f miniperl.xok
microperl:
$(MAKE) -f Makefile.micro
-# This version, if specified in Configure, does ONLY those scripts which need
-# set-id emulation. Suidperl must be setuid root. It contains the "taint"
-# checks as well as the special code to validate that the script in question
-# has been invoked correctly.
-
-suidperl$(EXE_EXT): $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
- $(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
!NO!SUBS!
fi
# Let's try running the commands with shell.
case "${osname}" in
catamount)
-$spitshell >>Makefile <<!GROK!THIS!
+$spitshell >>$Makefile <<!GROK!THIS!
.PHONY: makeppport
makeppport: miniperl\$(EXE_EXT) \$(CONFIGPM)
-@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
- (cd ext/Devel/PPPort && `pwd`/run.sh ../../../miniperl -I../../../lib \$\$f); \
+ (cd ext/Devel/PPPort && `pwd`/run.sh ../../../miniperl$(EXE_EXT) -I../../../lib \$\$f); \
done
!GROK!THIS!
;;
*)
-$spitshell >>Makefile <<'!NO!SUBS!'
+$spitshell >>$Makefile <<'!NO!SUBS!'
.PHONY: makeppport
makeppport: miniperl$(EXE_EXT) $(CONFIGPM)
$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport
;;
esac
-$spitshell >>Makefile <<'!NO!SUBS!'
+$spitshell >>$Makefile <<'!NO!SUBS!'
# We have to call our ./makedir because Ultrix 4.3 make can't handle the line
# test -d lib/auto || mkdir lib/auto
preplibrary: miniperl$(EXE_EXT) $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
@sh ./makedir lib/auto
@echo " AutoSplitting perl library"
- $(LDLIBPTH) $(RUN) ./miniperl -Ilib -MAutoSplit -MFile::Find -e ' \
- find ({no_chdir=>1, wanted => \
- sub {autosplit_lib_modules($$_) if /\.pm$$/}}, \
- "lib")'
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib -MAutoSplit -MFile::Find -e 'find ({no_chdir=>1, wanted => sub {autosplit_lib_modules($$_) if /\.pm$$/}}, "lib")'
$(MAKE) lib/re.pm
-lib/Config.pod: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
- $(LDLIBPTH) $(RUN) ./miniperl -Ilib configpm
+$(CONFIGPOD): config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib configpm
-$(CONFIGPM): lib/Config.pod
+$(CONFIGPM): $(CONFIGPOD)
lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl $(CONFIGPM)
- $(LDLIBPTH) $(RUN) ./miniperl minimod.pl > lib/ExtUtils/Miniperl.pm
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) minimod.pl > lib/ExtUtils/Miniperl.pm
lib/re.pm: ext/re/re.pm
@-rm -f $@
$(plextract): miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p
@-rm -f $@
- $(LDLIBPTH) $(RUN) ./miniperl -I`pwd`/lib $@.PL
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -I`pwd`/lib $@.PL
x2p/s2p: miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p.PL
cd x2p; $(LDLIBPTH) $(MAKE) s2p
lib/lib.pm: miniperl$(EXE_EXT) $(CONFIGPM)
@-rm -f $@
- $(LDLIBPTH) $(RUN) ./miniperl -Ilib lib/lib_pm.PL
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib lib/lib_pm.PL
unidatafiles $(unidatafiles): uni.data
uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
- cd lib/unicore && $(LDLIBPTH) $(RUN) ../../miniperl -I../../lib mktables -w
+ cd lib/unicore && $(LDLIBPTH) $(RUN) ../../miniperl$(EXE_EXT) -I../../lib mktables -w
touch uni.data
extra.pods: miniperl$(EXE_EXT)
no-install install.perl install.man install.html
META.yml: Porting/makemeta Porting/Maintainers.pl Porting/Maintainers.pm
- $(LDLIBPTH) $(RUN) ./miniperl -Ilib Porting/makemeta
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib Porting/makemeta
install-strip:
$(MAKE) STRIPFLAGS=-s install DESTDIR="$(DESTDIR)"
# DynaLoader may be needed for extensions that use Makefile.PL.
$(DYNALOADER): miniperl$(EXE_EXT) preplibrary FORCE
- @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib ext/util/make_ext.pl $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
d_dummy $(dynamic_ext): miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
- @$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib ext/util/make_ext.pl dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
s_dummy $(static_ext): miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
- @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib ext/util/make_ext.pl $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
n_dummy $(nonxs_ext): miniperl$(EXE_EXT) preplibrary FORCE
- @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib ext/util/make_ext.pl nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
!NO!SUBS!
-$spitshell >>Makefile <<EOF
+$spitshell >>$Makefile <<EOF
$extra_dep
EOF
-$spitshell >>Makefile <<'!NO!SUBS!'
+$spitshell >>$Makefile <<'!NO!SUBS!'
.PHONY: printconfig
printconfig:
# Do not 'make _mopup' directly.
_mopup:
- rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c uudmap.h generate_uudmap$(EXE_EXT)
+ rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c uudmap.h generate_uudmap$(EXE_EXT)
-rmdir .depending
-@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 uni.data opmini.o
+ -rm -f perl.exp ext.libs extra.pods uni.data opmini.o perlmini.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.third lib*.so.perl.third perl.3log t/perl.third t/perl.3log
-rm -f perl.pixie lib*.so.perl.pixie lib*.so.Addrs
-rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
-rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
- -rm -f perl$(EXE_EXT) suidperl$(EXE_EXT) miniperl$(EXE_EXT) $(LIBPERL) libperl.* microperl
+ -rm -f perl$(EXE_EXT) miniperl$(EXE_EXT) $(LIBPERL) libperl.* microperl
-rm -f opcode.h-old opnames.h-old pp.sym-old pp_proto.h-old
-rm -f config.arch config.over $(DTRACE_H)
-cd pod; $(LDLIBPTH) $(MAKE) clean
-cd utils; $(LDLIBPTH) $(MAKE) clean
-cd x2p; $(LDLIBPTH) $(MAKE) clean
+ -rm -f lib/Config_git.pl git_version.h
-@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
- $(LDLIBPTH) sh ext/util/make_ext clean $$x MAKE=$(MAKE) ; \
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib ext/util/make_ext.pl clean $$x MAKE=$(MAKE) ; \
done
_cleaner1:
-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 $(CLEAN) $$x MAKE=$(MAKE) ; \
- done
- -@test ! -f $(RUN) ./miniperl$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport --clean
+ -@if test -f miniperl$(EXE_EXT) ; then \
+ for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
+ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib ext/util/make_ext.pl $(CLEAN) $$x MAKE=$(MAKE) ; \
+ done ; \
+ else \
+ sh $(CLEAN).sh ; \
+ fi
+ rm -f realclean.sh veryclean.sh
+ -@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport --clean
# Some systems do not support "?", so keep these files separate.
_cleaner2:
rm -rf .config
rm -f preload lib/re.pm
rm -rf lib/Encode lib/Compress lib/Hash lib/re
+ rm -rf lib/TAP lib/Module/Pluggable lib/App
+ rm -rf lib/mro
rm -rf lib/IO/Compress lib/IO/Uncompress
rm -f lib/ExtUtils/ParseXS/t/XSTest.c
rm -f lib/ExtUtils/ParseXS/t/XSTest$(OBJ_EXT)
-rmdir lib/threads lib/XS
-rmdir lib/CPANPLUS/Dist/Build/t/dummy-*
-rmdir lib/CPANPLUS/t/dummy-cpanplus lib/CPANPLUS/t/dummy-localmirror
- -rm -f cygcrypt-0.dll cygwin1.dll
-rm -f lib/ExtUtils/CBuilder/t/libcompilet.dll.a
-rm -f lib/ExtUtils/ParseXS/t/libXSTest.dll.a
$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -u -m
cleanup_unpacked_files:
- -@test ! -f $(RUN) ./miniperl$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
+ -@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
# The second branch is for testing without a tty or controlling terminal,
# see t/op/stat.t
perl emacs/e2ctags.pl TAGS > tags
ctags:
- ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c *.c *.h
+ ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
# If this runs make out of memory, delete /usr/include lines.