Simplified condtions on Makefile.
This commit is contained in:
@@ -29,14 +29,15 @@ else
|
||||
CF += -g
|
||||
endif
|
||||
|
||||
projects := bin/text bin/kjv
|
||||
projects := bin/test-text bin/test-kjv
|
||||
#docs := $(patsubst test/test_%.c, doc/%.md, $(wildcard test/test_*.c))
|
||||
|
||||
default: $(projects)
|
||||
# success
|
||||
|
||||
bin/text: build/text.o build/test_text.o
|
||||
bin/kjv: build/text.o build/kjv.o build/test_kjv.o
|
||||
bin/test-text: build/test_text.o build/text.o
|
||||
bin/test-kjv: build/test_kjv.o build/text.o build/kjv.o
|
||||
bin/test-journal: build/test_journal.o
|
||||
|
||||
bin/%:
|
||||
# linking test $@
|
||||
@@ -57,7 +58,7 @@ build/%.o: build/%.c
|
||||
# compile generated $@
|
||||
$(CC) $(CF) -c -o $@ $<
|
||||
|
||||
build/%.c: src/%.re_c.c
|
||||
build/%.c: src/%.re.c
|
||||
# https://re2c.org/ generate $@
|
||||
@mkdir -p build
|
||||
re2c -W --tags --conditions -o $@ $<
|
||||
@@ -66,6 +67,7 @@ build/%.c: src/%.re_c.c
|
||||
# # https://github.com/neil-edelman/cdoc documentation
|
||||
# -cdoc -o $@ $<
|
||||
|
||||
.SECONDARY: build/kjv.c
|
||||
.PHONY: clean release test
|
||||
|
||||
test: $(projects)
|
||||
|
||||
Reference in New Issue
Block a user