Kbuild: avoid duplicate include path
authorArnd Bergmann <arnd@arndb.de>
Wed, 15 Jun 2016 15:45:44 +0000 (17:45 +0200)
committerMichal Marek <mmarek@suse.com>
Mon, 18 Jul 2016 19:31:35 +0000 (21:31 +0200)
arch/$(hdr-arch)/include/generated/uapi is included twice in the
header search path, which is unnecessary, so this changes the
top-level Makefile to drop the second instance by filtering out
everything from USERINCLUDE that was already part of LINUXINCLUDE.

This should have very little effect other than making the 'make V=1'
output slightly smaller and making the build time faster by a miniscule
amount, but it seems to be cleaner.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
Makefile

index c3d494b..337686d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -387,8 +387,9 @@ LINUXINCLUDE    := \
                -Iarch/$(hdr-arch)/include/generated/uapi \
                -Iarch/$(hdr-arch)/include/generated \
                $(if $(KBUILD_SRC), -I$(srctree)/include) \
-               -Iinclude \
-               $(USERINCLUDE)
+               -Iinclude
+
+LINUXINCLUDE   += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE))
 
 KBUILD_CPPFLAGS := -D__KERNEL__