Revision 250
Added by Aaron Marcuse-Kubitza over 12 years ago
Makefile | ||
---|---|---|
1 | 1 |
# Make |
2 | 2 |
SHELL := /bin/bash |
3 |
subMake = $(if $(wildcard $(@D)/Makefile*),$(MAKE) $(@F:!%=%) --directory=$(@D),) |
|
3 | 4 |
|
4 | 5 |
# OS |
5 | 6 |
os := $(shell uname) |
... | ... | |
35 | 36 |
_not_file: |
36 | 37 |
.PHONY: _not_file |
37 | 38 |
|
38 |
%/: _not_file |
|
39 |
-$(if $(wildcard $@/Makefile*),$(MAKE) --directory=$@ ,) |
|
40 |
# ignore errors in sub-makes |
|
41 |
|
|
42 | 39 |
##### |
43 | 40 |
|
44 | 41 |
install: _not_file core mysql inputs test |
45 | 42 |
@$(done) |
46 | 43 |
|
47 |
uninstall: _not_file rm_mysql rm_core |
|
44 |
uninstall: _not_file rm_inputs rm_mysql rm_core
|
|
48 | 45 |
|
49 | 46 |
reinstall: _not_file uninstall install |
50 | 47 |
|
... | ... | |
135 | 132 |
|
136 | 133 |
##### |
137 | 134 |
|
138 |
inputs: _not_file $(wildcard ../../inputs/*/) |
|
135 |
inputsDir := ../../inputs |
|
136 |
inputs := $(wildcard $(inputsDir)/*/) |
|
139 | 137 |
|
138 |
inputs: _not_file $(inputs:%=%!install) |
|
139 |
|
|
140 |
$(inputsDir)/%/!install: _not_file |
|
141 |
-$(subMake) |
|
142 |
# ignore errors in sub-makes |
|
143 |
|
|
144 |
rm_inputs: _not_file $(inputs:%=%!uninstall) |
|
145 |
|
|
146 |
$(inputsDir)/%/!uninstall: _not_file |
|
147 |
-$(subMake) |
|
148 |
# ignore errors in sub-makes |
|
149 |
|
|
140 | 150 |
##### |
141 | 151 |
|
142 | 152 |
test: _not_file test-map |
Also available in: Unified diff
Added uninstallation of inputs to Makefiles