db/Makefile
author Krista Bennett <krista@pep-project.org>
Tue, 22 Aug 2017 15:57:25 +0200
changeset 1989 d3e5bc4a9854
parent 1988 ea7bceda4dc8
child 1993 efaeadf3e6f0
permissions -rw-r--r--
Keep me away from the default branch. Reverted to 1954:2f1ed8cf6b6f, because though damiano's Makefile changes are sexy, they'll break ppl.
krista@1989
     1
# This file is under GNU General Public License 3.0
vb@1513
     2
# see LICENSE.txt
vb@1513
     3
vb@365
     4
include ../Makefile.conf
vb@365
     5
vb@365
     6
db: system.db
vb@365
     7
krista@1989
     8
dicos=$(wildcard *.csv)
Edouard@368
     9
krista@1989
    10
system.db: create_system_db.sql $(dicos)
Edouard@368
    11
	-mv -f $@ $@~ 
vb@365
    12
	sqlite3 -batch $@ < $<
krista@1989
    13
	for c in $(dicos); do echo $$c ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
vb@365
    14
krista@1989
    15
.PHONY: clean install
krista@1989
    16
vb@365
    17
install: system.db
vb@944
    18
	mkdir -p `dirname $(SYSTEM_DB)`
vb@365
    19
	cp system.db $(SYSTEM_DB)
vb@365
    20
vb@365
    21
clean:
krista@1989
    22
	rm -f system.db