Project

General

Profile

« Previous | Next » 

Revision 11253

bugfix: *Makefile: recursive invocation of $(MAKE): enclose targets in "" in case they contain *

View differences:

input.Makefile
33 33
# Make
34 34
SHELL := /bin/bash
35 35
selfMake = $(MAKE) --makefile=../input.Makefile
36
subMake = $(MAKE) $(@:$(root)/%=%) --directory=$(root)
36
subMake = $(MAKE) "$(@:$(root)/%=%)" --directory=$(root)
37 37
+_ = $(+:_%=)
38 38
# used to filter the output of embedded $(shell make ...) invocations
39 39
filter_make := grep -vF -e lib -e ".Makefile'."
......
278 278
	echo 'COPY (SELECT * FROM "$(datasrc)"."$*" LIMIT 0) TO STDOUT CSV HEADER;'|\
279 279
env no_search_path=1 $(bin)/psql_script_vegbien >$*/header.csv
280 280

  
281
exportHeader = $(selfMake) $*/header.csv
281
exportHeader = $(selfMake) "$*/header.csv"
282 282

  
283 283
# Don't try to edit a view. Must come before %/install to override it.
284 284
%_view/install: _always ;
......
292 292
	$(if $(wildcard $*/run),$(bin)/in_place $@ env text=1 $(bin)/repl $<)
293 293

  
294 294
%/postprocess: _always
295
	$(if $(wildcard $*/run),,$(selfMake) $*/postprocess.sql/run)
295
	$(if $(wildcard $*/run),,$(selfMake) "$*/postprocess.sql/run")
296 296

  
297 297
%/map_table: _always
298 298
	$(if $(wildcard $*/run),$*/run map_table)
......
302 302
	($(inDatasrc); echo 'CREATE TABLE "$*" AS'; cat $<; echo ';')|"time" \
303 303
$(psqlNoSearchPath) --echo-all --set=schema='"$(datasrc)"' --set=table='"$*"' \
304 304
$(logInstall*)
305
	$(selfMake) $*/postprocess
305
	$(selfMake) "$*/postprocess"
306 306
	$(exportHeader)
307 307
	$(cleanup)
308
	$(selfMake) $*/map_table
308
	$(selfMake) "$*/map_table"
309 309

  
310 310
%/install: _always
311 311
	$(if $(isCsv),$(import_install_))
312
	$(selfMake) $*/postprocess
312
	$(selfMake) "$*/postprocess"
313 313
	-$(exportHeader)
314 314
	-$(if $(isCsv),,$(cleanup))
315
	$(selfMake) $*/map_table
315
	$(selfMake) "$*/map_table"
316 316
# ignore errors if table does not exist (non-data dir)
317 317
define import_install_
318 318
(. $(bin)/vegbien_dest; unset schemas; "time" nice -n +5\
......
367 367
	$(if $(wildcard $@),,$(mk_map_csv))
368 368
	+$(selfMake) $(@:%/map.csv=%/.map.csv.last_cleanup)
369 369
define mk_map_csv
370
+$(selfMake) $*/header.csv
370
+$(selfMake) "$*/header.csv"
371 371
$(if $(nonXml),$(mkSrcMap))
372 372
endef
373 373
endif

Also available in: Unified diff