lua-users home
lua-l archive

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

On 12.02.2012 23:42, David Kolf wrote:
Luiz Henrique de Figueiredo wrote:
Lua 5.1.5 (rc1) is now available at

When changing a few files on Windows (MinGW) and re-running make, the
following rule causes an error:

$(LUA_A): $(CORE_O) $(LIB_O)
$(AR) $@ $?
$(RANLIB) $@

"$?" gives only the recently changed files but MinGW needs all files
("$^") to build the DLL. This will cause a lot of "undefined reference
to..." errors.

I currently don't have my GNU/Linux machine at hand so I cannot test
whether "$^" would cause any problems there. (Though I doubt it).

"$^" is a (GNU?) extension (so it probably will work on any OS where GNU make is available). POSIX make[1] only knows @%?<* as internal macros, and "$<" fits best. I think
$(AR) $@ $(CORE_O) $(LIB_O)
should work in the default case and for MinGW as well.

(I think this problem was already described by others, but I didn't find
the threads now.)

-- David Kolf


PS: For reference: