diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-04-19 05:04:26 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-04-19 05:12:12 -0400 |
commit | 720097d895956c0bf15b8440f7845159a04b74da (patch) | |
tree | 25e5546b16c86a23bd69b5b65b8b33f1d70540b6 /Documentation | |
parent | f14875a3e0cc35d7dbe15ee39763a6ae922e7034 (diff) |
kbuild: introduce subdir-ccflags-y
Following patch introduce support for setting options
to gcc that has effect for current directory and all
subdirectories.
The typical use case are an architecture or a subsystem that
decide to cover all files with -Werror.
Today alpha, mips and sparc uses -Werror in almost all their
Makefile- with subdir-ccflag-y it is now simpler to do so
as only the top-level directories needs to be covered.
Likewise if we decide to cover a full subsystem such
as net/ with -Werror this is done by adding a single
line to net/Makefile.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index d4b05672f9f7..d76cfd8712e1 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -316,6 +316,16 @@ more details, with real examples. | |||
316 | #arch/m68k/fpsp040/Makefile | 316 | #arch/m68k/fpsp040/Makefile |
317 | ldflags-y := -x | 317 | ldflags-y := -x |
318 | 318 | ||
319 | subdir-ccflags-y, subdir-asflags-y | ||
320 | The two flags listed above are similar to ccflags-y and as-falgs-y. | ||
321 | The difference is that the subdir- variants has effect for the kbuild | ||
322 | file where tey are present and all subdirectories. | ||
323 | Options specified using subdir-* are added to the commandline before | ||
324 | the options specified using the non-subdir variants. | ||
325 | |||
326 | Example: | ||
327 | subdir-ccflags-y := -Werror | ||
328 | |||
319 | CFLAGS_$@, AFLAGS_$@ | 329 | CFLAGS_$@, AFLAGS_$@ |
320 | 330 | ||
321 | CFLAGS_$@ and AFLAGS_$@ only apply to commands in current | 331 | CFLAGS_$@ and AFLAGS_$@ only apply to commands in current |