( cd lib/lua-$(LUA_VERSION)/src \
&& make CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)' a && cd ../../.. )
lib/lua/liblua.a: lib/lua-$(LUA_VERSION)/src/liblua.a
- @( if [ ! -d lib/lua ] ; then mkdir -p lib/lua ; fi )
+ @( if test -d lib/lua ; then true ; else mkdir -p lib/lua ; fi )
cp lib/lua-$(LUA_VERSION)/src/liblua.a $@
include/nhlua.h: $(TOPLUALIB)
echo '/* nhlua.h - generated by top Makefile */' > $@
curl -R -O http://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz && \
tar zxf lua-$(LUA_VERSION).tar.gz && \
rm -f lua-$(LUA_VERSION).tar.gz )
-#if we just fetched lua, force include/nhlua.h to be built based on it
- -rm include/nhlua.h
+# remove include/nhlua.h in case it was created for some other Lua version
+ @( if test -f include/nhlua.h ; then \
+ rm -f include/nhlua.h && echo 'rm include/nhlua.h' ; fi )
# 'make update' can be used to install a revised version after making
# customizations or such. Unlike 'make install', it doesn't delete everything