Project

General

Profile

« Previous | Next » 

Revision 5876

input.Makefile: `%: .make`: Factored $(if $(wildcard $@)... test out into $(make_script) so all `: %.make`-like rules could use it directly

View differences:

inputs/input.Makefile
87 87
	+$(selfMake)
88 88
# re-run make so that cache of existing files is reset
89 89

  
90
make_script = ./$< >$@
90
# Only remake if doesn't exist. This prevents unintentional remaking when the
91
# make script is newly checked out from svn (which sets the mod time to now) but
92
# the output is synced externally.
93
# Can't remove prereq to do this, because it determines when the rule applies.
94
make_script = $(if $(wildcard $@),,"time" ./$< >$@)
91 95

  
92 96
%/: % _always ;
93 97

  
94 98
%: %.make
95
	$(if $(wildcard $@),,"time" $(make_script))
96
# Only remake if doesn't exist. This prevents unintentional remaking when the
97
# make script is newly checked out from svn (which sets the mod time to now) but
98
# the output is synced externally.
99
# Can't remove prereq to do this, because it determines when the rule applies.
99
	$(make_script)
100 100
.PRECIOUS: % # save partial outputs of aborted src make scripts
101 101

  
102 102
##### SVN

Also available in: Unified diff