db/Makefile
author Edouard Tisserant
Mon, 05 Oct 2015 19:41:46 +0200
changeset 368 c8302f5536c3
parent 366 cfc6e24badaa
child 944 e97cf5e73b64
permissions -rw-r--r--
db/Makefile : rename old db before creating new db, add csv files as dependencies
     1 include ../Makefile.conf
     2 
     3 db: system.db
     4 
     5 dicos=$(wildcard *.csv)
     6 
     7 system.db: create_system_db.sql $(dicos)
     8 	-mv -f $@ $@~ 
     9 	sqlite3 -batch $@ < $<
    10 	for c in $(dicos); do echo $$c ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
    11 
    12 .PHONY: clean install
    13 
    14 install: system.db
    15 	cp system.db $(SYSTEM_DB)
    16 
    17 clean:
    18 	rm -f system.db