Revision 7364
Added by Aaron Marcuse-Kubitza almost 12 years ago
inputs/FIA/_src/Makefile | ||
---|---|---|
5 | 5 |
|
6 | 6 |
##### Vars/functions |
7 | 7 |
|
8 |
unzip = unzip -d $@ $< |
|
9 |
|
|
8 | 10 |
##### General targets |
9 | 11 |
|
10 |
all: _always download ;
|
|
12 |
all: _always extract ;
|
|
11 | 13 |
|
12 | 14 |
##### Downloads |
13 | 15 |
|
... | ... | |
17 | 19 |
MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA PR RI SC SD TN TX UT\ |
18 | 20 |
VT VI VA WA WV WI WY |
19 | 21 |
|
20 |
download: _always $(states:%=%.zip) ;
|
|
22 |
allZips := $(states:%=%.zip)
|
|
21 | 23 |
|
24 |
download: _always $(allZips) ; |
|
25 |
|
|
22 | 26 |
%.zip: |
23 | 27 |
-wget -O $@ $(urlPrefix)$@ |
24 | 28 |
# ignore errors if wget not installed |
29 |
|
|
30 |
##### Extraction |
|
31 |
|
|
32 |
zips := $(wildcard $(allZips)) |
|
33 |
zips := $(if $(zips),$(zips),$(allZips)) |
|
34 |
dirs := $(zips:%.zip=%/) |
|
35 |
|
|
36 |
extract: _always $(dirs) ; |
|
37 |
|
|
38 |
%: %.zip |
|
39 |
$(if $(wildcard $@),,$(unzip)) |
|
40 |
|
|
41 |
##### Table bundling |
Also available in: Unified diff
inputs/FIA/_src/Makefile: Added extraction targets to extract zip archives