Project

General

Profile

« Previous | Next » 

Revision 784

Makefile: Added documentation labels to each section

View differences:

Makefile
1
##### Vars/functions
2

  
1 3
# Make
2 4
SHELL := /bin/bash
3 5
pathParts = $(shell path="$(1)"; echo "$${path%%/*}" "$${path\#*/}")
......
30 32
# File editing
31 33
sudoAppend = echo $$'$(2)'|sudo tee -a $(1) >/dev/null
32 34

  
33
# Env
35
##### Environment
36

  
34 37
export PGOPTIONS = --client-min-messages=WARNING
35 38

  
36
#####
39
##### General targets
37 40

  
38 41
all:
39 42

  
......
55 58

  
56 59
%: $(addsuffix %,$(dir $(shell echo */Makefile))) _always ;
57 60

  
58
#####
61
##### Installation
59 62

  
60 63
install: _always core mysql inputs/install test
61 64
	@$(done)
......
64 67

  
65 68
reinstall: _always uninstall install ;
66 69

  
67
#####
70
##### Core: VegBIEN DB and dependencies
68 71

  
69 72
core: _always $(call forOs,python postgres) postgres_user db
70 73
	@$(done)
......
73 76

  
74 77
reinstall_core: _always rm_core core ;
75 78

  
79
##### Python
80

  
76 81
python-Linux: _always
77 82
	-sudo apt-get install python python-dev python-dateutil python-pip
78 83

  
......
86 91
	@echo "Run python -c 'import dateutil'"
87 92
	@$(wait)
88 93

  
94
##### PostgreSQL
95

  
89 96
editPhppgadminApacheConf = echo $$'1\n,s/\# \(allow from all\)/\1/\nwq'|\
90 97
sudo ed --loose-exit-status --verbose /etc/phppgadmin/apache.conf
91 98

  
......
129 136
rm_postgres_user: _always
130 137
	echo "DROP USER IF EXISTS bien;"|$(psqlAsAdmin)
131 138

  
132
#####
139
##### VegBIEN DB
133 140

  
134 141
db: _always schemas/vegbien.sql
135 142
	-$($@_create_cmd)
......
146 153
empty_db: _always schemas/vegbien_empty.sql
147 154
	$(psqlAsBien) <schemas/vegbien_empty.sql
148 155

  
149
#####
156
##### MySQL
150 157

  
151 158
mysql: _always $(call forOs,mysql) mysql_user
152 159
	@$(done)
......
189 196
	-echo "DROP USER 'bien'@'localhost';"|$(mysqlAsRoot)
190 197
# ignore errors if user exists
191 198

  
192
#####
199
##### Datasources
193 200

  
194 201
inputs: _always inputs/all ;
195 202

  
......
200 207
test2: _always inputs/test ;
201 208
	@$(done)
202 209

  
203
#####
210
##### Testing
204 211

  
205 212
test: _always test-map
206 213
	@$(done)

Also available in: Unified diff