Custom CFLAGS with distutils

Custom CFLAGS with distutils

Post by Rocco Rutt » Sat, 04 Jul 2009 23:54:26


I've been trying to make distutils build mercurial with custom cflags.
The only way this works is to change Makefile because I don't want to
put my changed CFLAGS into the environment and I tend to forget to run
"make" with a CFLAGS=... option.

Google brings up a special "Setup" file which should solve my problem,
but it somehow doesn't. I've tried:

mercurial mercurial/base85.c -Xcompiler -arch x86_64
mercurial.base85 mercurial/base85.c -Xcompiler -arch x86_64

for base85.c in the mercurial/ subdirectory. Hacking Makefile does the
trick, but having a Setup file working would never produce merge

What am I doing wrong?