db/Makefile
branchENGINE-228
changeset 1952 4722b371f609
parent 1513 e7f7e42385b5
child 1958 433df9ee336d
     1.1 --- a/db/Makefile	Fri Aug 11 15:12:28 2017 +0200
     1.2 +++ b/db/Makefile	Fri Aug 11 15:25:16 2017 +0200
     1.3 @@ -3,20 +3,22 @@
     1.4  
     1.5  include ../Makefile.conf
     1.6  
     1.7 +.PHONY: db
     1.8  db: system.db
     1.9  
    1.10 -dicos=$(wildcard *.csv)
    1.11 +DICOS = $(wildcard *.csv)
    1.12  
    1.13 -system.db: create_system_db.sql $(dicos)
    1.14 +system.db: create_system_db.sql $(DICOS)
    1.15 +	# Keep a backup db around
    1.16  	-mv -f $@ $@~ 
    1.17  	sqlite3 -batch $@ < $<
    1.18 -	for c in $(dicos); do echo $$c ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
    1.19 +	for c in $(DICOS) ; do echo "$$c" ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
    1.20  
    1.21 -.PHONY: clean install
    1.22 -
    1.23 +.PHONY: install
    1.24  install: system.db
    1.25  	mkdir -p `dirname $(SYSTEM_DB)`
    1.26  	cp system.db $(SYSTEM_DB)
    1.27  
    1.28 +.PHONY: clean
    1.29  clean:
    1.30 -	rm -f system.db
    1.31 +	-rm -f system.db system.db~