[Python-Dev] grumble, grumble - makesetup prepends leading $(srcdir) - why?
Skip Montanaro
skip@mojam.com (Skip Montanaro)
Wed, 5 Jul 2000 23:47:10 -0500 (CDT)
Here's one that's bugged me for awhile that I'm tired of working around.
Perhaps someone can explain why makesetup does what it does.
In my Modules/Setup.local file I have
TOP=$(HOME)/src/python
EDIR=$(TOP)/PyExtensions1.5
llop $(EDIR)/llopmodule.c # helper function(s) for latlong.py
This gets converted into
llopmodule.o: $(srcdir)/$(EDIR)/llopmodule.c; $(CC) $(CCSHARED) $(CFLAGS) -c $(srcdir)/$(EDIR)/llopmodule.c
llopmodule$(SO): llopmodule.o; $(LDSHARED) llopmodule.o -o llopmodule$(SO)
in Modules/Makefile. Is there a good reason why is $(srcdir)/ prepended to
the source file reference, thus breaking my local module references? It
seems the culprit is
case $src in
glmodule.c) ;;
/*) ;;
*) src='$(srcdir)/'$src;;
esac
around about line 193. I think this should be changed to
case $src in
glmodule.c) ;;
/*) ;;
\$*) ;;
*) src='$(srcdir)/'$src;;
esac
or something similar that protects paths that begin with a Make variable.
That fix works for me. Any objections to me checking it in?
Also, who died and made glmodule.c king?
Skip