diff options
author | Andy Armstrong <andy@hexten.net> | 2008-01-10 22:20:52 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-11 13:36:54 +0000 |
commit | 5ac1e9b286b068746476878a8a6206b06828a175 (patch) | |
tree | 9c3ea7b8fb39c431bd78a689aea2ff13f18de880 /Makefile.SH | |
parent | 737ddd9966a0343f74f23dcc8d4025bbf64d3e59 (diff) | |
download | perl-5ac1e9b286b068746476878a8a6206b06828a175.tar.gz |
Add dtrace support
Message-Id: <F4AC553F-7C7F-49C3-98C2-E04681E1004F@hexten.net>
with fixups as discussed on list, plus adding usedtrace to Glossary,
plus propagating all the new config variables everywhere.
(Was there an automatic way to do that? I did it with emacs macros)
p4raw-id: //depot/perl@32953
Diffstat (limited to 'Makefile.SH')
-rw-r--r-- | Makefile.SH | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/Makefile.SH b/Makefile.SH index ac8681a7e0..28f8436622 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -183,6 +183,16 @@ for f in $nonxs_ext; do nonxs_list="$nonxs_list ext/$f/pm_to_blib" done +dtrace_h='' +dtrace_o='' +case "$usedtrace" in +define|true) + dtrace_h='perldtrace.h' + $dtrace -G -s perldtrace.d -o perldtrace.tmp >/dev/null 2>&1 \ + && rm -f perldtrace.tmp && dtrace_o='perldtrace$(OBJ_EXT)' + ;; +esac + echo "Extracting Makefile (with variable substitutions)" $spitshell >Makefile <<!GROK!THIS! # Makefile.SH @@ -274,6 +284,10 @@ PATH_SEP = $p_ # then you'll need to change this, or override it on the make command line. VALGRIND=valgrind +DTRACE = $dtrace +DTRACE_H = $dtrace_h +DTRACE_O = $dtrace_o + FIRSTMAKEFILE = $firstmakefile # Any special object files needed by this architecture, e.g. os2/os2.obj @@ -357,7 +371,7 @@ h1 = EXTERN.h INTERN.h XSUB.h av.h config.h 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 -h5 = utf8.h warnings.h +h5 = utf8.h warnings.h mydtrace.h h = $(h1) $(h2) $(h3) $(h4) $(h5) c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro.c perl.c @@ -372,7 +386,8 @@ obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$( 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) 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) -obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) +ndt_obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) +obj = $(ndt_obj) $(DTRACE_O) lintflags = \ -b \ @@ -586,6 +601,26 @@ if test -r $Makefile_s ; then Makefile: $Makefile_s !GROK!THIS! else + case "$dtrace_h" in + ?*) + $spitshell >>Makefile <<'!NO!SUBS!' +$(DTRACE_H): perldtrace.d + $(DTRACE) -h -s perldtrace.d -o $(DTRACE_H) + +mydtrace.h: $(DTRACE_H) + +!NO!SUBS! + ;; + esac + case "$dtrace_o" in + ?*) + $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!' $(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT) !NO!SUBS! @@ -1082,7 +1117,7 @@ _mopup: -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 opcode.h-old opnames.h-old pp.sym-old pp_proto.h-old - -rm -f config.over + -rm -f config.over $(DTRACE_H) # Do not 'make _tidy' directly. _tidy: |