Robert Pluim <rpluim(a)bigfoot.com> wrote:
If SRC_SRCS is assigned using '=', then the ${srcdir}
doesn't get
expanded when SRC_SRCS is used in the actual rule later on. With
':=' it is expanded at assignment and everything works fine.
Okay, I understand.
make is invoked recursively by the top-level makefile something like
'cd modules/foo CC=gcc', which overrides the subdir makefile's setting
of CC. Hmm, I've just noticed that the top-level GNUmakefile
_doesn't_ do that, it just recurses into the sub-directory. I have no
idea why. [1]
I'm on a Linux system, and therefore using GNU make, which is why I
haven't noticed this behavior before. I'll have to remember to test
stuff out on a Solaris machine with the native make in the future.
It would feel cleaner to me in some ways to not have the top-level
Makefile override the value of CC, but I don't actually know how to do
that without jeopardizing the build in src and lwlib, so I'm happy to go
with your approach. Would you mind sending your patch one more time,
but to xemacs-patches(a)xemacs.org this time? (Incidentally, do you have
commit privileges?)
Thanks,
--
Jerry James
http://www.ittc.ku.edu/~james/