Skip to content

Commit

Permalink
Always rebuild minilua to work around issue #999
Browse files Browse the repository at this point in the history
This ensures that minilua will always be rebuild. This fixes bug #999,
though we may find a better solution.

We declare ALWAYS_REBUILD as a target, and use the .PHONY property to
designate that it's not an actual file (though it's unlikely that file
would exist on the users computer). While we're there, also add all the
other phony rules like 'install' 'clean' 'lib' etc. as .PHONY so the
rules won't break if those files happen to exist in that folder.
  • Loading branch information
samcv committed Nov 25, 2018
1 parent 8c67e16 commit 9ef725d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build/Makefile.in
Expand Up @@ -494,9 +494,13 @@ DYNASM_SCRIPTS = 3rdparty/dynasm/dynasm.lua 3rdparty/dynasm/dasm_x86.lua
DYNASM_HEADERS = 3rdparty/dynasm/dasm_proto.h 3rdparty/dynasm/dasm_x86.h

.SUFFIXES: .c @obj@ .i @asm@ .dasc .expr .tile .h
.PHONY: clean realclean install ALWAYS_REBUILD lib all help test reconfig clangcheck gcccheck libuv tracing cgoto switch no-tracing no-cgoto distclean release sandwich

all: moar@exe@ pkgconfig/moar.pc

# Empty target, just in case our make doesn't support the .PHONY property
ALWAYS_REBUILD:

install: all
$(MKPATH) "$(DESTDIR)$(BINDIR)"
$(CP) moar@exe@ "$(DESTDIR)$(BINDIR)"
Expand Down Expand Up @@ -618,7 +622,8 @@ src/strings/unicode.c: src/strings/unicode_db.c src/strings/unicode_uca.c src/st
$(MSG) generating $@
$(CMD) $(CAT) src/strings/unicode_db.c src/strings/unicode_uca.c src/strings/unicode_ops.c > $@ $(NOERR)

$(MINILUA): 3rdparty/dynasm/minilua.c
# Always rebuild minilua to workaround issue #999
$(MINILUA): ALWAYS_REBUILD 3rdparty/dynasm/minilua.c
$(CC) $(CFLAGS) $(LDFLAGS) 3rdparty/dynasm/minilua.c -o $@ $(LDLIBS)

.dasc.c:
Expand Down

0 comments on commit 9ef725d

Please sign in to comment.