Diff of /Makefile [a3652e] .. [bed709]  Maximize  Restore

Switch to unified view

a/Makefile b/Makefile
1
C2IEC=c99
1
C2IEC=c2iec
2
TESTS=$(patsubst %.c, %.test, $(wildcard test/*.c))
2
TESTS=$(patsubst %.c, %.test, $(wildcard test/*.c))
3
TEST_LOGS=$(patsubst %.c, %.test.log, $(wildcard test/*.c))
3
TEST_LOGS=$(patsubst %.c, %.test.log, $(wildcard test/*.c))
4
4
5
all: c99
5
all: ${C2IEC}
6
6
7
c99: lex.yy.c y.tab.c
7
${C2IEC}: lex.yy.c y.tab.c
8
    gcc -o $@ $^
8
    gcc -o $@ $^
9
9
10
lex.yy.c: c99.l
10
lex.yy.c: ${C2IEC}.l
11
    flex $^
11
    flex -d $^
12
12
13
y.tab.c: c99.y
13
y.tab.c: ${C2IEC}.y
14
    yacc -d $^
14
    yacc -d $^
15
15
16
y.dot: c99.y
16
y.dot: ${C2IEC}.y
17
    yacc -g $^
17
    yacc -g $^
18
18
19
commit: ${TEST_LOGS}
19
commit: ${TEST_LOGS}
20
    for i in ${TEST_LOGS}; do \
20
    for i in ${TEST_LOGS}; do \
21
        cp $$i $$(dirname $$i)/$$(basename $$i .log).expected; \
21
        cp $$i $$(dirname $$i)/$$(basename $$i .log).expected; \
...
...
39
    @cat $< | tee $@
39
    @cat $< | tee $@
40
40
41
%.test.txt: %.c ${C2IEC}
41
%.test.txt: %.c ${C2IEC}
42
    ./${C2IEC} < $< > $@
42
    ./${C2IEC} < $< > $@
43
43
44
test2: c99
45
    ./c99 < test2.c
46
47
test3: c99
48
    ./c99 < test3.c
49
44