diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 533c80a6d..1c8bdf54a 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -121,7 +121,7 @@ lib/lua-$(LUA_VERSION)/src/liblua.a: lib/lua-$(LUA_VERSION)/src/lua.h ( 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 */' > $@ @@ -286,8 +286,9 @@ fetch-Lua: 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