Skip to content

Commit

Permalink
Makefile: Added meaningful error when luajit submodule is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Apr 30, 2014
1 parent 1e98af1 commit 66c16e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ LUAJIT_CFLAGS := -DLUAJIT_USE_PERFTOOLS -DLUAJIT_USE_GDBJIT
all: $(LUAJIT_O)
cd src && $(MAKE)

$(LUAJIT_O): deps/luajit/Makefile
$(LUAJIT_O): check_luajit deps/luajit/Makefile
echo 'Building LuaJIT\n'
(cd deps/luajit && \
$(MAKE) PREFIX=`pwd`/usr/local \
CFLAGS="$(LUAJIT_CFLAGS)" && \
$(MAKE) DESTDIR=`pwd` install)
(cd deps/luajit/usr/local/bin; ln -fs luajit-2.1.0-alpha luajit)

check_luajit:
@if [ ! -f deps/luajit/Makefile ]; then \
echo "Can't find deps/luajit/. You might need to: git submodule update --init"; exit 1; \
fi

clean:
(cd deps/luajit && $(MAKE) clean)
(cd src; $(MAKE) clean)
Expand Down

0 comments on commit 66c16e9

Please sign in to comment.