[hatari-devel] CC/HOSTCC
Eero Tamminen
eerot at users.berlios.de
Wed Mar 10 20:33:07 CET 2010
Hi,
On Wednesday 10 March 2010, Thomas Huth wrote:
> Make always pre-defines CC.
> "?=" only sets the variable if it is not initialized yet.
> So when you use "?=" in the Makefile, you can not change the compiler in
> the Makefile anymore.
...
> So we've got to use "=" instead of "?=" there.
>
> To override this setting on the command line, you've got to specify the
> compiler like this:
>
> make CC=gcc-4.4
Thanks, I updated the Makefile.cnf comments accordingly.
One always learns something new. :-)
- Eero
PS. I read the GNU make info pages and there seems to be quite a few
of these default variables (do this on dir without Makefile):
$ make -p|grep -A1 "# default"|grep -v -e '^-' -e '^#'|wc
66
There also seems to be make options to control this:
--environment-overrides
--no-builtin-variables
But I haven't seen any packaging scripts using them, if the project itself
isn't using them I guess they would just break its build...
"origin" can be used to find out where GNU make got the variable value.
More information about the hatari-devel
mailing list