summaryrefslogtreecommitdiff
path: root/Makefile.SH
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2011-09-28 16:11:13 -0600
committerTony Cook <tony@develop-help.com>2011-09-29 15:35:45 +1000
commit45ed6be318926c8b79c4ab96ac82eac9f727de66 (patch)
tree363fd4533746e7f9f7ae06fa40d87e90ce0e0f16 /Makefile.SH
parentcfe76a0a8e5b6f21601522c788686e820ba933dd (diff)
downloadperl-45ed6be318926c8b79c4ab96ac82eac9f727de66.tar.gz
Makefile.SH: emit make valgrind* targets only on linux
This inserts several case $osname in linux) spitshell ... esac statements to emit valgrind targets only where valgrind is available. Platform dependence is better than checking for valgrind executable because it serves as a subtle hint that it can be installed. Other platforms can be added by those who have them.
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-xMakefile.SH20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile.SH b/Makefile.SH
index c20f660b01..92300a4e26 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -889,6 +889,11 @@ purecov$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PE
quant$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
$(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+!NO!SUBS!
+
+case "${osname}${osvers}" in
+linux*)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
# Valgrind perl (currently Linux only)
perl.valgrind.config: config.sh
@@ -899,6 +904,11 @@ perl.valgrind.config: config.sh
@grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
@echo "And of course you have to have valgrind..."
$(VALGRIND) $(VG_TEST) || exit 1
+!NO!SUBS!
+ ;;
+esac
+
+$spitshell >>$Makefile <<'!NO!SUBS!'
# Third Degree Perl (Tru64 only)
@@ -1441,6 +1451,11 @@ test.utf16 check.utf16: test_prep
utest.utf16 ucheck.utf16: test_prep
TEST_ARGS="-utf8 -utf16" $(RUN_TESTS) choose
+!NO!SUBS!
+
+case "${osname}${osvers}" in
+linux*)
+ $spitshell >>$Makefile <<'!NO!SUBS!'
# Targets for valgrind testing:
test_prep.valgrind: test_prep perl.valgrind
@@ -1453,6 +1468,11 @@ utest.valgrind ucheck.valgrind: test_prep.valgrind perl.valgrind.config
test_notty.valgrind: test_prep.valgrind perl.valgrind.config
PERL_VALGRIND=1 $(RUN_TESTS) no-tty
+!NO!SUBS!
+ ;;
+esac
+
+$spitshell >>$Makefile <<'!NO!SUBS!'
# Targets for Third Degree testing.