added deployment script

This commit is contained in:
Pedro 2014-11-10 22:33:03 +01:00
parent 7d12fb3ec4
commit 49ceec4782
2 changed files with 27 additions and 7 deletions

View File

@ -1,7 +1,7 @@
# Makefile
LIB_FILES = parser/bison_parser.cpp parser/flex_lexer.cpp parser/SQLParser.cpp lib/Expr.cpp lib/sqlhelper.cpp lib/destructors.cpp
SOURCES = $(shell find lib/ -name '*.cpp') parser/bison_parser.cpp parser/flex_lexer.cpp parser/SQLParser.cpp
TESTS_MAIN = sql_tests.cpp
TESTS_BIN = bin/tests
@ -19,16 +19,16 @@ build: clean
cp parser/*.cpp build/
analysis: $(LIB_FILES) sql_analysis.cpp
$(CC) $(CFLAGS) $(LIB_FILES) sql_analysis.cpp -o bin/analysis
analysis: $(SOURCES) sql_analysis.cpp
$(CC) $(CFLAGS) $(SOURCES) sql_analysis.cpp -o bin/analysis
grammar_test: $(LIB_FILES) sql_grammar_test.cpp
$(CC) $(CFLAGS) $(LIB_FILES) sql_grammar_test.cpp -o bin/grammar_test
grammar_test: $(SOURCES) sql_grammar_test.cpp
$(CC) $(CFLAGS) $(SOURCES) sql_grammar_test.cpp -o bin/grammar_test
tests: $(LIB_FILES) $(TESTS_MAIN)
$(CC) $(CFLAGS) $(LIB_FILES) $(TESTS_MAIN) -o $(TESTS_BIN)
tests: $(SOURCES) $(TESTS_MAIN)
$(CC) $(CFLAGS) $(SOURCES) $(TESTS_MAIN) -o $(TESTS_BIN)
parser/bison_parser.cpp:

20
src/deploy_to_hyrise.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
# Usage: deploy_to_hyrise.sh path/to/hyrise.git
BUILD_PATH=$(readlink -f $(dirname $0))/build
HYRISE_PATH=$1
SQL_PATH=${HYRISE_PATH}/src/lib/access/sql
if [ ! -d $SQL_PATH ]; then
echo "Could not verify Hyrise path! ${HYRISE_PATH}"
exit
fi
make build
rm ${SQL_PATH}/parser/*
cp ${BUILD_PATH}/* ${SQL_PATH}/parser/