db/Makefile
author Edouard Tisserant <edouard@pep-project.org>
Mon, 08 May 2017 22:09:00 +0200
changeset 1763 8428975706d9
parent 1513 e7f7e42385b5
child 1952 4722b371f609
child 1988 ea7bceda4dc8
permissions -rw-r--r--
Merged
vb@1513
     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
Edouard@368
     8
dicos=$(wildcard *.csv)
Edouard@368
     9
Edouard@368
    10
system.db: create_system_db.sql $(dicos)
Edouard@368
    11
	-mv -f $@ $@~ 
vb@365
    12
	sqlite3 -batch $@ < $<
Edouard@368
    13
	for c in $(dicos); do echo $$c ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
vb@365
    14
vb@365
    15
.PHONY: clean install
vb@365
    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:
vb@365
    22
	rm -f system.db