1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#--*- Makefile -*--
# A makefile to generate test profiler statistics
NO_TAINT_CHECK_DIR = tests/no-taint-checks
NYTPROF_DIR = $$(pwd)/nytprof
PERL_SCRIPTS = $(wildcard ${BIN_DIR}/*.pl)
NO_TAINT_CHECK_SCRIPTS = ${PERL_SCRIPTS:${BIN_DIR}/%=${NO_TAINT_CHECK_DIR}/%}
.PHONY: pdisplay
pdisplay:
@echo ${} | tr " " "\n"
${NO_TAINT_CHECK_DIR}/%.pl: ${BIN_DIR}/%.pl
perl -pe 's,#!\s*/usr/bin/perl\s+-T.*,#! /usr/bin/perl,' $< > $@
chmod 755 $@
.PHONY: profiler
profiler: ${NO_TAINT_CHECK_SCRIPTS}
rm -rf ${NYTPROF_DIR}/*
PERL5OPT=-d:NYTProf \
NYTPROF=addpid=1:file=${NYTPROF_DIR}/nytprof.out:forkdepth=0:slowops=0 \
${MAKE} BIN_DIR=${NO_TAINT_CHECK_DIR} clean tests
nytprofmerge -out ${NYTPROF_DIR}/nytprof-merged.out \
${NYTPROF_DIR}/nytprof.out.*
nytprofhtml --file ${NYTPROF_DIR}/nytprof-merged.out
${MAKE} cleantemporary
cleantemporary:
rm -f ${NYTPROF_DIR}/nytprof.out.*
rm -f ${NYTPROF_DIR}/nytprof-merged.out
distclean: cleantainted
|