Skip to content

Commit

Permalink
refact: update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkinben committed Feb 2, 2022
1 parent 4064403 commit de32db1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "common.h"
#include "sqlparser.h"
#include "dummyparser.h"
#include "transaction.h"
int main(int argc, char *argv[])
{
Expand Down
5 changes: 2 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SQLVM=$(PROJECT)/sql-v,
INCLUDE=-I$(PROJECT) -I$(SQLPARSER) -I$(SQLVM)

build: sqlparser
$(CC) $(INCLUDE) sqlparser.tab.c lex.yy.c main.c -o tinydb
$(CC) $(INCLUDE) sqlparser.tab.c lex.yy.c main2.c -o tinydb

clean:
rm *.db tinydb lex.yy.c *.tab.c *.tab.h
Expand All @@ -21,5 +21,4 @@ sqlparser:
bison -d $(SQLPARSER)/sqlparser.y

test:
$(CC) test.c -o a.out
./a.out
$(CC) $(INCLUDE) main.c -o tinydb
2 changes: 1 addition & 1 deletion spec/main_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe 'database' do
before do
`make build`
`make test`
end
def run_script(commands)
system("if [ -f mydb.db ]; then rm mydb.db; fi")
Expand Down

0 comments on commit de32db1

Please sign in to comment.