diff options
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 14 | ||||
-rw-r--r-- | scripts/Kbuild.include | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 7a7753321a26..51104f9194a5 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -383,6 +383,20 @@ more details, with real examples. | |||
383 | to prerequisites are referenced with $(src) (because they are not | 383 | to prerequisites are referenced with $(src) (because they are not |
384 | generated files). | 384 | generated files). |
385 | 385 | ||
386 | $(kecho) | ||
387 | echoing information to user in a rule is often a good practice | ||
388 | but when execution "make -s" one does not expect to see any output | ||
389 | except for warnings/errors. | ||
390 | To support this kbuild define $(kecho) which will echo out the | ||
391 | text following $(kecho) to stdout except if "make -s" is used. | ||
392 | |||
393 | Example: | ||
394 | #arch/blackfin/boot/Makefile | ||
395 | $(obj)/vmImage: $(obj)/vmlinux.gz | ||
396 | $(call if_changed,uimage) | ||
397 | @$(kecho) 'Kernel: $@ is ready' | ||
398 | |||
399 | |||
386 | --- 3.11 $(CC) support functions | 400 | --- 3.11 $(CC) support functions |
387 | 401 | ||
388 | The kernel may be built with several different versions of | 402 | The kernel may be built with several different versions of |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 936940b541f9..8cf87e815e51 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -25,6 +25,13 @@ basetarget = $(basename $(notdir $@)) | |||
25 | escsq = $(subst $(squote),'\$(squote)',$1) | 25 | escsq = $(subst $(squote),'\$(squote)',$1) |
26 | 26 | ||
27 | ### | 27 | ### |
28 | # Easy method for doing a status message | ||
29 | kecho := : | ||
30 | quiet_kecho := echo | ||
31 | silent_kecho := : | ||
32 | kecho := $($(quiet)kecho) | ||
33 | |||
34 | ### | ||
28 | # filechk is used to check if the content of a generated file is updated. | 35 | # filechk is used to check if the content of a generated file is updated. |
29 | # Sample usage: | 36 | # Sample usage: |
30 | # define filechk_sample | 37 | # define filechk_sample |