On 24 Jan, 2009, at 22:03, s...@pobox.com wrote:
I'm working on issue 4111 which will add dtrace support to Python whenrequested by the builder and when supported by the platform (currently justSolaris and Mac OSX I believe).Sun and Apple have quite different ways to generate the code necessary to link into the executable. Sun's dtrace command supports a -G flag which generates a .o file from a .d file. Apple instead generates an include file using the -h flag to dtrace (-G and .o file generation are not supported). This puts a bit of a crimp in generating Makefile dependencies. In the Sun case you have a couple extra .o files to link into libpython. In the Applecase you have a couple extra .h files which define Dtrace macros.How do I work around this difference in Makefile.pre.in? I can detect Sunvs. Apple in the configure script, but I see no conditional logic in Makefile.pre.in to use as an example. It seems to only use variable expansion on the RHS of stuff. Can I do something like if @WITH_DTRACE_SUN@ = 1 then ... Sun-style dependencies here ... else ... Apple-style dependencies here ... fiwhere WITH_DTRACE_SUN is a macro defined in pyconfig.h by the configurescript?
I use configure to paste bits into Makefile.pre.in for the OSX framework support.
In Makefile.pre.in:install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
FRAMEWORKINSTALLFIRST and FRAMEWORKINSTALLLAST are calculated in configure.in. This should work for dtrace as well.
That is, in the configure script define DTRACE_HEADER_DEPS and DTRACE_OBJECT_DEPS and add @DTRACE_HEADER_DEPS@ and @DTRACE_OBJECT_DEPS@ to the proper targets in Makefile.pre.in.
Ronald
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com