Revision 1379
Added by Aaron Marcuse-Kubitza almost 13 years ago
input.Makefile | ||
---|---|---|
263 | 263 |
|
264 | 264 |
# Each input type needs var $(mapEnv) and targets install, uninstall |
265 | 265 |
|
266 |
#### DB export |
|
267 |
|
|
266 | 268 |
ifneq ($(dbExport),) |
267 | 269 |
|
268 | 270 |
dbEngineExt := $(subst .,,$(suffix $(basename $(notdir $(dbExport))))) |
269 | 271 |
db := $(datasrc) |
270 | 272 |
|
271 |
#### Installation
|
|
273 |
### Installation |
|
272 | 274 |
|
273 | 275 |
install: _always db ; |
274 | 276 |
|
275 | 277 |
uninstall: _always rm_db ; |
276 | 278 |
|
277 |
#### DB-engine-specific
|
|
279 |
### DB-engine-specific |
|
278 | 280 |
|
279 | 281 |
# Each DB engine needs vars $(dbEngine), $(dbAsBien) and targets db, rm_db |
280 | 282 |
|
... | ... | |
304 | 306 |
echo "DROP DATABASE IF EXISTS $(db);"|$(mysqlAsRoot) |
305 | 307 |
# ignore errors if grant not defined |
306 | 308 |
|
307 |
### Unrecognized DB engine
|
|
309 |
## Unrecognized DB engine |
|
308 | 310 |
|
309 | 311 |
else |
310 | 312 |
$(error The DB filename $(dbExport) must be db.my.sql) |
311 | 313 |
endif |
312 | 314 |
|
313 |
# Must come after dbEngine is set |
|
314 |
mapEnv := in_engine=$(dbEngine) in_database=$(db) |
|
315 |
### Other input types |
|
315 | 316 |
|
316 |
#### Unrecognized input type
|
|
317 |
else
|
|
317 | 318 |
|
318 |
else |
|
319 | 319 |
install: _always ; |
320 | 320 |
uninstall: _always ; |
321 |
|
|
321 | 322 |
endif |
323 |
|
|
324 |
#### DB connection info |
|
325 |
|
|
326 |
ifneq ($(dbEngine),) |
|
327 |
# Must come after dbEngine is set |
|
328 |
mapEnv := in_engine=$(dbEngine) in_database=$(db) |
|
329 |
endif |
Also available in: Unified diff
input.Makefile: Set mapEnv if $(dbEngine) is set, to eventually support pre-existing DB connections