db/Makefile
author Krista 'DarthMama' Bennett <krista@pep.foundation>
Mon, 10 Aug 2020 17:40:00 +0200
branchtest-huss-hypothesis-42
changeset 4946 9bd11789dbe9
parent 4095 892625cac577
permissions -rw-r--r--
non-sync dev (moi) says events in KeySync_fsm.h are actually *two* off from the message types, presuming enums work the way they are supposed to. have at it, huss et al
     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 $(PER_MACHINE_DIRECTORY)
    22 	cp system.db $(PER_MACHINE_DIRECTORY)
    23 
    24 .PHONY: clean
    25 clean:
    26 	rm -f system.db system.db~