Project

General

Profile

« Previous | Next » 

Revision 250

Added uninstallation of inputs to Makefiles

View differences:

inputs_Makefile
1
ifndef db
2
$(error db variable must be set)
3
endif
4

  
1 5
self_3d1bc249 := $(dir $(lastword $(MAKEFILE_LIST)))
2 6

  
3
mysql := mysql --user=bien --password='$(shell cat \
7
mysql := mysql --user=root --password='$(shell cat \
4 8
$(self_3d1bc249)/bien_password)'
5 9

  
10
#####
11

  
6 12
all: _not_file install
7 13

  
8 14
.SUFFIXES:
9 15

  
10 16
_not_file:
11 17
.PHONY: _not_file
18

  
19
#####
20

  
21
install: _not_file
22
	$(mysql) <$(db).sql
23
	echo "GRANT ALL ON $(db).* TO 'bien'@'localhost';"|$(mysql)
24

  
25
uninstall: _not_file
26
	echo "DROP DATABASE IF EXISTS $(db);"|$(mysql)
27

  
28
reinstall: _not_file uninstall install

Also available in: Unified diff