lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

In the Lua 5.1 makefiles, I wonder if we could abolish MYCFLAGS, etc. in
favor of appending to variables with the "+=" construct.  The issue with
the current makefiles is that if one overrides CFLAGS on the command
line, then MYCFLAGS isn't honored.  For example:

    $ make linux CFLAGS=-Os
    cd src; make MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline
-lhistory -lncurses"
    make[1]: Entering directory `src'
    gcc -Os   -c -o lapi.o lapi.c

This can fixed in the makefile by using "CFLAGS +=", etc., for example:

            cd src; $(MAKE) CFLAGS+=-DLUA_USE_LINUX LIBS+="-Wl,-E -ldl
-lreadline -lhistory -lncurses"