Revision 1924
Added by Aaron Marcuse-Kubitza over 12 years ago
inputs/input.Makefile | ||
---|---|---|
151 | 151 |
import/install-%: _always |
152 | 152 |
env schema=$(datasrc) table=$* $(withCatSrcs) $(bin)/csv2ddl$(if\ |
153 | 153 |
$(debug),|tee /dev/fd/2)|$(psqlAsBien) |
154 |
#-echo "COPY $(datasrc).;"|$(psqlAsBien) |
|
155 | 154 |
|
156 | 155 |
##### Sources |
157 | 156 |
|
... | ... | |
236 | 235 |
|
237 | 236 |
##### Mapping |
238 | 237 |
|
238 |
inputFiles := $(wildcard $(exts:%=src/*.%)) |
|
239 |
ifeq ($(inputFiles),) |
|
239 | 240 |
dbExport := $(firstword $(wildcard src/db.*.sql)) |
240 |
inputFiles := $(wildcard $(exts:%=src/*.%))
|
|
241 |
endif
|
|
241 | 242 |
|
242 | 243 |
+maps = $(filter maps/% $(mappings)/%,$(+_)) |
243 | 244 |
<in = $(firstword $(filter-out $(+maps),$(+_))) |
Also available in: Unified diff
input.Makefile: Fixed bug where input type was considered to be different things if both $(inputFiles) and $(dbExport) are non-empty. Now, $(inputFiles) takes precedence so that the presence of any input files will cause a DB dump to be ignored. This ensures that a (slower) input DB is not used over a (faster) flat file.