[Python-Dev] Change Makefile.pre.in based on configure? (original) (raw)
skip at pobox.com skip at pobox.com
Sat Jan 24 22:03:36 CET 2009
- Previous message: [Python-Dev] ac_sys_system == Monterey*?
- Next message: [Python-Dev] Change Makefile.pre.in based on configure?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm working on issue 4111 which will add dtrace support to Python when requested by the builder and when supported by the platform (currently just Solaris 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 Apple case 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 Sun vs. 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 ... fi
where WITH_DTRACE_SUN is a macro defined in pyconfig.h by the configure script?
Thanks,
Skip
- Previous message: [Python-Dev] ac_sys_system == Monterey*?
- Next message: [Python-Dev] Change Makefile.pre.in based on configure?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]