diff options
author | Peter Foley <pefoley2@verizon.net> | 2011-07-31 14:45:40 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2011-08-31 10:35:56 -0400 |
commit | 58238c81443a83922e07b409e54ec93ce909b6ac (patch) | |
tree | c4c48f020d1beb57ccd8b3443c870c35ad7e48e0 /scripts/Makefile.lib | |
parent | f4b129f519f1bbd191dca2bf17d1137edf941fd1 (diff) |
kbuild: prevent make from deleting _shipped files
commit 7373f4f (kbuild: add implicit rules for parser generation)
created a implicit rule chain (%.c: %.c_shipped: %.y).
Make considers the _shipped files to be intermediate files which
causes them to be deleted if they didn't exist before make was run.
Mark the _shipped files PRECIOUS to prevent make from deleting them.
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Acked-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index aeea84a24836..5d986d9adf1b 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -167,6 +167,7 @@ ifdef REGENERATE_PARSERS | |||
167 | quiet_cmd_gperf = GPERF $@ | 167 | quiet_cmd_gperf = GPERF $@ |
168 | cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< | 168 | cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< |
169 | 169 | ||
170 | .PRECIOUS: $(src)/%.hash.c_shipped | ||
170 | $(src)/%.hash.c_shipped: $(src)/%.gperf | 171 | $(src)/%.hash.c_shipped: $(src)/%.gperf |
171 | $(call cmd,gperf) | 172 | $(call cmd,gperf) |
172 | 173 | ||
@@ -177,6 +178,7 @@ LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy) | |||
177 | quiet_cmd_flex = LEX $@ | 178 | quiet_cmd_flex = LEX $@ |
178 | cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $< | 179 | cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $< |
179 | 180 | ||
181 | .PRECIOUS: $(src)/%.lex.c_shipped | ||
180 | $(src)/%.lex.c_shipped: $(src)/%.l | 182 | $(src)/%.lex.c_shipped: $(src)/%.l |
181 | $(call cmd,flex) | 183 | $(call cmd,flex) |
182 | 184 | ||
@@ -187,12 +189,14 @@ YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy) | |||
187 | quiet_cmd_bison = YACC $@ | 189 | quiet_cmd_bison = YACC $@ |
188 | cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $< | 190 | cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $< |
189 | 191 | ||
192 | .PRECIOUS: $(src)/%.tab.c_shipped | ||
190 | $(src)/%.tab.c_shipped: $(src)/%.y | 193 | $(src)/%.tab.c_shipped: $(src)/%.y |
191 | $(call cmd,bison) | 194 | $(call cmd,bison) |
192 | 195 | ||
193 | quiet_cmd_bison_h = YACC $@ | 196 | quiet_cmd_bison_h = YACC $@ |
194 | cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $< | 197 | cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $< |
195 | 198 | ||
199 | .PRECIOUS: $(src)/%.tab.h_shipped | ||
196 | $(src)/%.tab.h_shipped: $(src)/%.y | 200 | $(src)/%.tab.h_shipped: $(src)/%.y |
197 | $(call cmd,bison_h) | 201 | $(call cmd,bison_h) |
198 | 202 | ||