CC variable hardcoded in lua-5.3.4/src/Makefile

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CC variable hardcoded in lua-5.3.4/src/Makefile

Sofiane Akermoun
Hello,

When i tried to compile lua 5.3.4 as C++ on my macosx platform i found that the CC variable can't be modified from the command line and the Makefile. The CC variable is still set to the default one which is actualy "cc" on macosx.
Why? because actually the current CC variable is directly set in the compilation command for mac os x:

macosx:
  $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC="cc"

so i changed this line to:
macosx:
  $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC="g++"

Or even better just reuse the CC variable set as "g++" in the previous line.

What do you think ? the CC variable should be reused too for the compilation on macosx platform no ?

regards,

--
Sofiane Akermoun
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: CC variable hardcoded in lua-5.3.4/src/Makefile

Ką Mykolas
And why not ?=, not to require modification of actual Makefile?

On Wed, Feb 28, 2018 at 3:18 PM, Sofiane Akermoun <[hidden email]> wrote:
Hello,

When i tried to compile lua 5.3.4 as C++ on my macosx platform i found that the CC variable can't be modified from the command line and the Makefile. The CC variable is still set to the default one which is actualy "cc" on macosx.
Why? because actually the current CC variable is directly set in the compilation command for mac os x:

macosx:
  $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC="cc"

so i changed this line to:
macosx:
  $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC="g++"

Or even better just reuse the CC variable set as "g++" in the previous line.

What do you think ? the CC variable should be reused too for the compilation on macosx platform no ?

regards,

--
Sofiane Akermoun
[hidden email]