Compile test db
This commit is contained in:
parent
e6656ecee8
commit
69212838e4
1 changed files with 6 additions and 9 deletions
15
Makefile
15
Makefile
|
@ -13,20 +13,17 @@ RM = rm -Rf
|
||||||
# Unit test custom magic file
|
# Unit test custom magic file
|
||||||
|
|
||||||
MAGIC = file
|
MAGIC = file
|
||||||
TEST_DIRECTORY = test
|
|
||||||
TARGET_MAGIC = $(TEST_DIRECTORY)/elixir.mgc
|
all: priv/apprentice test/elixir.mgc
|
||||||
SOURCE_MAGIC = $(TEST_DIRECTORY)/elixir
|
|
||||||
|
test/%.mgc: test/%
|
||||||
|
cd test; file -C -m ../$^
|
||||||
|
|
||||||
priv/apprentice: src/apprentice.c
|
priv/apprentice: src/apprentice.c
|
||||||
mkdir -p priv
|
mkdir -p priv
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||||
|
|
||||||
# Test case
|
|
||||||
|
|
||||||
$(TARGET_MAGIC): $(SOURCE_MAGIC)
|
|
||||||
cd $(TEST_DIRECTORY); $(MAGIC) -C -m elixir
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(PRIV) $(BEAM_FILES)
|
$(RM) $(PRIV) $(BEAM_FILES) test/*.mgc
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
Loading…
Reference in a new issue