db/Makefile
author Volker Birk <vb@pep-project.org>
Mon, 06 May 2019 15:42:50 +0200
branchsync
changeset 3633 6f3310e6a219
parent 3201 105b50dfaf15
child 4089 b3a067ff79f5
permissions -rw-r--r--
Added tag 2.0.0-RC for changeset 4998d60e0fe8
     1 # Copyright 2017, pEp Foundation
     2 # This file is part of pEpEngine
     3 # This file may be used under the terms of the GNU General Public License version 3
     4 # see LICENSE.txt
     5 
     6 include ../Makefile.conf
     7 
     8 .PHONY: db
     9 db: system.db
    10 
    11 DICOS = $(wildcard *.csv)
    12 
    13 # The 'mv' keeps a backup db around
    14 system.db: create_system_db.sql $(DICOS)
    15 	-mv -f $@ $@~ 
    16 	sqlite3 -batch $@ < $<
    17 	for c in $(DICOS) ; do echo "$$c" ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
    18 
    19 .PHONY: install
    20 install: system.db
    21 	mkdir -p `dirname $(SYSTEM_DB)`
    22 	cp system.db $(SYSTEM_DB)
    23 
    24 .PHONY: clean
    25 clean:
    26 	rm -f system.db system.db~