summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <benjamin@barenblat.name>2016-08-16 17:10:06 -0400
committerGravatar Benjamin Barenblat <benjamin@barenblat.name>2016-08-16 17:10:06 -0400
commiteb4c69f4606bcae608abe661375b5e90fb8b1be3 (patch)
tree4e324995ac53c2739fcdc20d9205bb81d514e72c /Makefile
parent5bdb7576c4bfd0ec032f30650308626daf9ad4b1 (diff)
Use a database
Enable future development with queries by switch to a SQLite database for next actions.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 36bd738..7b78731 100644
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,16 @@
MDL = mdl/lib.urp mdl/mdl.ur
-ugtd: ugtd.urp $(MDL) main.urs main.ur
- urweb -ccompiler build_scripts/clang -output $@ ugtd
+.PHONY: all
+all: ugtd ugtd.db
+
+ugtd initialize.sql: ugtd.urp $(MDL) main.urs main.ur
+ urweb -ccompiler build_scripts/clang -output ugtd ugtd
+
+ugtd.db: initialize.sql prepopulate.sql
+ printf "" >$@
+ sqlite3 $@ <initialize.sql
+ sqlite3 $@ <prepopulate.sql
.PHONY: mdl
mdl: $(MDL)
@@ -25,4 +33,5 @@ $(MDL): mdl/classes
.PHONY: clean
clean:
$(RM) $(MDL)
- $(RM) ugtd
+ $(RM) ugtd.db
+ $(RM) ugtd initialize.sql