[Python-Dev] Makefile woos..

Dan Wolfe dkwolfe@pacbell.net
Sun, 18 Mar 2001 21:57:53 -0800


While compiling the the 2.0b1 release on my shine new Mac OS X box=20
today, I noticed that the fcntl module was breaking, so I went hunting=20=

for the cause...  (it was better than working on my taxes!)....

To make a long story short... I should have worked on my taxes =96 at=20
least =96 80% probability =96 I understand those...

Ok, the reason that the fcntl module was breaking was that uname now=20
reports Darwin 1.3 and it wasn't in the list... in the process of fixing=20=

that and testing to make sure that it was going to work correctly, I=20
discovered that sys.platform was reporting that I was on a darwin1=20
platform.... humm where did that come from...

It turns out that the MACHDEP is set correctly to Darwin1.3 when=20
configuration queries the system... however, during the process of=20
converting makefile.pre.in to makefile it passes thru the following SED=20=

script that starts around line 6284 of the configuration file:

sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF

which when applied to the Makefile.pre.in results in

MACHDEP =3D darwin1 instead of MACHDEP =3D darwin1.3

Question 1: I'm not geeky enough to understand why the '.3' get's=20
removed.... is there a problem with the SED script? or did I overlook=20
something?
Question 2: I noticed that all the other versions are=20
<OS><MajorRevision> also - is this intentional? or is this just a result=20=

of the bug in the SED script

If someone can help me understand what's going on here, I'll be glad to=20=

submit the patch to fix the fcntl module and a few others on Mac OS X.

- Dan - who probably would have finished off his taxes if he hadn't=20
opened this box....