diff options
Diffstat (limited to 'scripts/Kbuild.include')
| -rw-r--r-- | scripts/Kbuild.include | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 8cf87e815e51..c29be8f90248 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -46,22 +46,15 @@ kecho := $($(quiet)kecho) | |||
| 46 | # - If they are equal no change, and no timestamp update | 46 | # - If they are equal no change, and no timestamp update |
| 47 | # - stdin is piped in from the first prerequisite ($<) so one has | 47 | # - stdin is piped in from the first prerequisite ($<) so one has |
| 48 | # to specify a valid file as first prerequisite (often the kbuild file) | 48 | # to specify a valid file as first prerequisite (often the kbuild file) |
| 49 | chk_filechk = : | ||
| 50 | quiet_chk_filechk = echo ' CHK $@' | ||
| 51 | silent_chk_filechk = : | ||
| 52 | upd_filechk = : | ||
| 53 | quiet_upd_filechk = echo ' UPD $@' | ||
| 54 | silent_upd_filechk = : | ||
| 55 | |||
| 56 | define filechk | 49 | define filechk |
| 57 | $(Q)set -e; \ | 50 | $(Q)set -e; \ |
| 58 | $($(quiet)chk_filechk); \ | 51 | $(kecho) ' CHK $@'; \ |
| 59 | mkdir -p $(dir $@); \ | 52 | mkdir -p $(dir $@); \ |
| 60 | $(filechk_$(1)) < $< > $@.tmp; \ | 53 | $(filechk_$(1)) < $< > $@.tmp; \ |
| 61 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ | 54 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
| 62 | rm -f $@.tmp; \ | 55 | rm -f $@.tmp; \ |
| 63 | else \ | 56 | else \ |
| 64 | $($(quiet)upd_filechk); \ | 57 | $(kecho) ' UPD $@'; \ |
| 65 | mv -f $@.tmp $@; \ | 58 | mv -f $@.tmp $@; \ |
| 66 | fi | 59 | fi |
| 67 | endef | 60 | endef |
