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.
     1 # This file is under GNU General Public License 3.0
     2 # see LICENSE.txt
     3 
     4 include ../Makefile.conf
     5 
     6 db: system.db
     7 
     8 dicos=$(wildcard *.csv)
     9 
    10 system.db: create_system_db.sql $(dicos)
    11 	-mv -f $@ $@~ 
    12 	sqlite3 -batch $@ < $<
    13 	for c in $(dicos); do echo $$c ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
    14 
    15 .PHONY: clean install
    16 
    17 install: system.db
    18 	mkdir -p `dirname $(SYSTEM_DB)`
    19 	cp system.db $(SYSTEM_DB)
    20 
    21 clean:
    22 	rm -f system.db