|
On 12.02.2012 23:42, David Kolf wrote:
Luiz Henrique de Figueiredo wrote:Lua 5.1.5 (rc1) is now available at http://www.lua.org/work/lua-5.1.5-rc1.tar.gzWhen 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
Philipp
PS: For reference: <http://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html>
[1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html