Skip to content
This repository has been archived by the owner on Jul 26, 2018. It is now read-only.

different error approach, should be backwards compatible #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CFLAGS = -g -Wall $(OFLAGS) $(XFLAGS)
OFLAGS = -O3 -DNDEBUG
#OFLAGS = -pg
#TOOL=valgrind -q
TOOL=valgrind -q

OBJS = tree.o compile.o

Expand Down Expand Up @@ -35,7 +35,7 @@ clean : .FORCE
spotless : clean .FORCE
rm -f greg

samples/calc.c: samples/calc.leg greg
samples/calc.c: samples/calc.g greg
./greg -o $@ $<

samples/calc: samples/calc.c
Expand All @@ -50,8 +50,14 @@ run: greg.g greg
$(CC) $(CFLAGS) -o selftest/testing1 testing1.c $(OBJS)
$(TOOL) ./selftest/testing1 -o testing2.c greg.g
$(CC) $(CFLAGS) -o selftest/testing2 testing2.c $(OBJS)
$(TOOL) ./selftest/testing2 -o selftest/calc.c ./samples/calc.leg

$(TOOL) ./selftest/testing2 -o selftest/test.c test.g
$(CC) $(CFLAGS) -o selftest/test selftest/test.c
$(TOOL) echo 'foobar' | ./selftest/test

$(TOOL) ./selftest/testing2 -o selftest/calc.c ./samples/calc.g
$(CC) $(CFLAGS) -o selftest/calc selftest/calc.c
$(TOOL) echo '21 * 2 + 0' | ./selftest/calc | grep 42


.FORCE :
Loading