perl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT)
-@rm -f miniperl.xok
- $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILING) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+ $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
# Purify/Quantify Perls.
perl.gprof: /usr/bin/gprof perl.gprof.config
@-rm -f perl
- $(MAKE) PERL_SUFFIX=.gprof PERL_PROFILING=-pg perl
+ $(MAKE) PERL_SUFFIX=.gprof PERL_PROFILE_LDFLAGS=-pg perl
@echo "Now you may run perl.gprof and then run gprof perl.gprof."
+# Gcov Perl
+
+perl.config.gcov:
+ @echo "To build perl.gcov you must use gcc 3.0 or newer, checking..."
+ @echo "Checking gccversion in config.sh..."
+ @grep "^gccversion=" config.sh
+ @grep "^gccversion='[3-9]\." config.sh >/dev/null || exit 1
+ @echo "To build perl.gcov you must Configure -Dccflags=-fprofile-arcs -ftest-coverage, checking..."
+ @echo "Checking ccflags='-fprofile-arcs -ftest-coverage' in config.sh..."
+ @grep "^ccflags=" config.sh
+ @grep "^ccflags='.*-fprofile-arcs -ftest-coverage.*'" config.sh >/dev/null || exit 1
+
+perl.gcov: perl.config.gcov
+ @-rm -f perl
+ $(MAKE) PERL_SUFFIX=.gcov PERL_PROFILE_LDFLAGS='' perl
+ @echo "Now you may run perl.gcov and then run gcov some.c."
+
# Microperl. This is just a convenience thing if one happens to
# build also the full Perl and therefore the real big Makefile:
# usually one should manually explicitly issue the below command.
@$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
d_dummy $(dynamic_ext): miniperl preplibrary $(DYNALOADER) FORCE
+ @-rm -f lib/re.pm
+ @cat ext/re/re.pm > lib/re.pm
@$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE
+ @-rm -f lib/re.pm
+ @cat ext/re/re.pm > lib/re.pm
@$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
n_dummy $(nonxs_ext): miniperl preplibrary $(DYNALOADER) FORCE
@echo "You may see some irrelevant test failures if you have been unable"
@echo "to build lib/Config.pm."
- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
- && $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t pragma/*.t </dev/tty
+ && $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t </dev/tty
# Handy way to run perlbug -ok without having to install and run the
# installed perlbug. We don't re-run the tests here - we trust the user.