fix: adjust makefile
This commit is contained in:
parent
c941c6c229
commit
d35dafdf5c
8
makefile
8
makefile
|
@ -1,9 +1,17 @@
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
|
TABLES = stops
|
||||||
|
|
||||||
SCHEMA = zhv
|
SCHEMA = zhv
|
||||||
|
|
||||||
psql = $(strip psql -v schema=$(SCHEMA))
|
psql = $(strip psql -v schema=$(SCHEMA))
|
||||||
|
|
||||||
|
# $(addprefix prefix,names…): The argument names is regarded as a series of names, separated by whitespace; prefix is used as a unit. The value of prefix is prepended to the front of each individual name and the resulting larger names are concatenated with single spaces between them.
|
||||||
|
#
|
||||||
|
# FORMAT(format_string [, format_arg [, ...] ])
|
||||||
|
load: $(addprefix load-,$(TABLES))
|
||||||
|
@$(psql) -t -A -c "SELECT FORMAT('* loaded %s', feed_file) WHERE feed_file = '$(GTFS)';"
|
||||||
|
|
||||||
# -v: variable assignment, like the /set meta-command
|
# -v: variable assignment, like the /set meta-command
|
||||||
# $<: name of the firest prerequisite
|
# $<: name of the firest prerequisite
|
||||||
init: sql/schema.sql
|
init: sql/schema.sql
|
||||||
|
|
Loading…
Reference in New Issue