This commit is contained in:
parent
df2d0aba52
commit
854c190d6d
2 changed files with 12 additions and 2 deletions
|
|
@ -11,6 +11,8 @@ sql_DATA := \
|
|||
procedures.sql \
|
||||
tops-0001.sql
|
||||
|
||||
INIT_FILE := init.sql
|
||||
|
||||
procedures.sql: procedures.sql.in exchange_do_*.sql exchange_statistics_*.sql exchange_trigger_*.sql
|
||||
chmod +w $@ 2> /dev/null || true
|
||||
gcc -E -P -undef - < procedures.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
||||
|
|
@ -31,11 +33,19 @@ exchange-0004.sql: exchange-0004.sql.in 0004-*.sql
|
|||
gcc -E -P -undef - < exchange-0004.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
||||
chmod ugo-w $@
|
||||
|
||||
.DEFAULT_GOAL := sql
|
||||
sql: procedures.sql exchange-0002.sql exchange-0003.sql exchange-0004.sql
|
||||
gen_sql: procedures.sql exchange-0002.sql exchange-0003.sql exchange-0004.sql
|
||||
|
||||
.DEFAULT_GOAL := gen_init
|
||||
gen_init: gen_sql $(sql_DATA)
|
||||
@printf "" > $(INIT_FILE)
|
||||
@cat $(FILES) >> $(INIT_FILE)
|
||||
|
||||
clean:
|
||||
rm -f procedures.sql
|
||||
rm -f exchange-0002.sql
|
||||
rm -f exchange-0003.sql
|
||||
rm -f exchange-0004.sql
|
||||
rm $(INIT_FILE)
|
||||
|
||||
exec: sql
|
||||
psql --host=localhost --port=5432 --username=mte --password --dbname=taler-exchange --file=versioning.sql
|
||||
|
|
|
|||
0
include/sql/init.sql
Normal file
0
include/sql/init.sql
Normal file
Loading…
Add table
Add a link
Reference in a new issue