Project

General

Profile

« Previous | Next » 

Revision 1260

Makefiles: Use .SECONDARY with no prerequisites instead of setting a .PRECIOUS for each intermediate, to simplify turning off automatic deletion of intermediate files

View differences:

input.Makefile
45 45

  
46 46
all: _always maps ;
47 47

  
48
.SUFFIXES:
48
.SUFFIXES: # turn off built-in suffix rules
49
.SECONDARY: # don't automatically delete intermediate files
49 50

  
50 51
_always:
51 52
.PHONY: _always
......
57 58

  
58 59
%.out: %.make _always
59 60
	./$* >$@
60
.PRECIOUS: %.out
61 61

  
62 62
$(root)/%: _always
63 63
	+$(subMake)
......
92 92
$(wildcard maps/VegBIEN.*.csv))
93 93
tables := $(directMaps:maps/VegBIEN.%.csv=%)
94 94

  
95
.PRECIOUS: $(allViaMaps) $(directMaps)
96

  
97 95
maps :=
98 96

  
99 97
maps/VegBIEN.%.csv: maps/$(via).%.csv $(coreMap)
100 98
	$(root)/bin/join_union_sort <$+ >$@
101
.PRECIOUS: maps/VegBIEN.%.csv $(coreMap)
102 99

  
103 100
maps += $(autogenMaps)
104 101

  
......
106 103
	env ignore=1 $(root)/bin/union <$+|$(root)/bin/sort_map >$@
107 104
maps/$(via).%.full.csv: maps/$(via).%.csv # fallback if no self map
108 105
	$(CP) $< $@
109
.PRECIOUS: maps/$(via).%.full.csv maps/$(via).%.csv $(selfMap)
110 106

  
111 107
maps += $(patsubst maps/%.csv,maps/%.full.csv,$(viaMaps))
112 108

  
......
175 171

  
176 172
verify/%.out: $(mappings)/verify.%.sql _always
177 173
	$(verify)
178
.PRECIOUS: verify/%.out
179 174
# default:
180 175
verify/%.out: _always ;
181 176

  
......
184 179
ifneq ($(dbFile),)
185 180
%.ref: %.ref.sql
186 181
	$(dbAsBien) $(db) <$< >$@
187
.PRECIOUS: %.ref
188 182
endif
189 183

  
190 184
##### Testing
......
231 225
	$(call runTest,$(map2db))
232 226
tests += test/import.%.out
233 227

  
234
.PRECIOUS: $(tests)
235

  
236 228
testOutputs := $(foreach test,$(tests),$(tables:%=$(test)))
237 229

  
238 230
test: _always $(testOutputs) ;

Also available in: Unified diff