staging: prefix header search paths with $(srctree)/
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 31 Jan 2019 04:08:33 +0000 (13:08 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2019 11:30:27 +0000 (12:30 +0100)
Currently, the Kbuild core manipulates header search paths in a crazy
way [1].

To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
the search paths in the srctree. Some Makefiles are already written in
that way, but not all. The goal of this work is to make the notation
consistent, and finally get rid of the gross hacks.

Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
("kbuild: do not drop -I without parameter").

[1]: https://patchwork.kernel.org/patch/9632347/

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15 files changed:
drivers/staging/erofs/Makefile
drivers/staging/media/davinci_vpfe/Makefile
drivers/staging/most/Makefile
drivers/staging/most/cdev/Makefile
drivers/staging/most/dim2/Makefile
drivers/staging/most/i2c/Makefile
drivers/staging/most/net/Makefile
drivers/staging/most/sound/Makefile
drivers/staging/most/usb/Makefile
drivers/staging/most/video/Makefile
drivers/staging/rtl8192u/Makefile
drivers/staging/unisys/visorhba/Makefile
drivers/staging/unisys/visornic/Makefile
drivers/staging/vc04_services/bcm2835-audio/Makefile
drivers/staging/vc04_services/bcm2835-camera/Makefile

index c91b65223f99c92dc6bee94bf00a75c232a43408..38ab344a285efbf7136074df42258c66df9ade70 100644 (file)
@@ -6,7 +6,7 @@ ccflags-y += -Wall -DEROFS_VERSION=\"$(EROFS_VERSION)\"
 
 obj-$(CONFIG_EROFS_FS) += erofs.o
 # staging requirement: to be self-contained in its own directory
-ccflags-y += -I$(src)/include
+ccflags-y += -I $(srctree)/$(src)/include
 erofs-objs := super.o inode.o data.o namei.o dir.o utils.o
 erofs-$(CONFIG_EROFS_FS_XATTR) += xattr.o
 erofs-$(CONFIG_EROFS_FS_ZIP) += unzip_vle.o unzip_vle_lz4.o
index 9c57042c877d1873143e930bdce93eaa4830a586..9268e507f7916c4557620f256537fde5fb999c31 100644 (file)
@@ -6,5 +6,5 @@ davinci-vfpe-objs := \
 
 # Allow building it with COMPILE_TEST on other archs
 ifndef CONFIG_ARCH_DAVINCI
-ccflags-y += -Iarch/arm/mach-davinci/include/
+ccflags-y += -I $(srctree)/arch/arm/mach-davinci/include/
 endif
index f8bcf488ecf2e44b57a3db4164e40fce5df57662..c7662f65f6db4ca400b3b497fc299ffe5aceb594 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MOST) += most_core.o
 most_core-y := core.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
 
 obj-$(CONFIG_MOST_CDEV)        += cdev/
 obj-$(CONFIG_MOST_NET) += net/
index afb9870eb50f3316031726baad4054f728e363bf..21b0bd72c01d9380eeea4ce58ecf965cecb597a7 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_MOST_CDEV) += most_cdev.o
 
 most_cdev-objs := cdev.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
index 66676f5907ee11354c731d34a961c26a8dca3e49..6d15f045a767d09942d5738abfe2ce8756468976 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_MOST_DIM2) += most_dim2.o
 
 most_dim2-objs := dim2.o hal.o sysfs.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
index a7d094c1e1c2a8ef8335f3bc1c777a50930509f6..c032fea979b36b041cc984ba5107b42e342af72e 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_MOST_I2C) += most_i2c.o
 
 most_i2c-objs := i2c.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
index 54500aa77be80dddfb9ba6c4b55d071a16d14a6f..820faec6b2967fb43b8a4b8b4797d9e129e3e22c 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_MOST_NET) += most_net.o
 
 most_net-objs := net.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
index eee8774e38cb1f4894e1310556c9fc4d9f648950..5bb55bb108fb5da511e17c43bbb6060cc5558de1 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_MOST_SOUND) += most_sound.o
 
 most_sound-objs := sound.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
index 18d28cba4fbf5797534d31a7d103dcbd9d892139..910cd08bad7cbd049f6565691e6d8163f93561cc 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_MOST_USB) += most_usb.o
 
 most_usb-objs := usb.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
index 1c8e520e02a2d46328cfbc5b779dbec9440efd12..c6e01b6ecfe6d7843b483e18a5b46b996414e22d 100644 (file)
@@ -1,4 +1,4 @@
 obj-$(CONFIG_MOST_VIDEO) += most_video.o
 
 most_video-objs := video.o
-ccflags-y += -Idrivers/staging/
+ccflags-y += -I $(srctree)/drivers/staging/
index 3022728a364c5806979a8aebc2bb4de945252998..dcd51bf4aed34a848eb99147d2851c327814f41c 100644 (file)
@@ -7,7 +7,7 @@ ccflags-y += -O2
 ccflags-y += -DCONFIG_FORCE_HARD_FLOAT=y
 ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX
 ccflags-y += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO
-ccflags-y += -Idrivers/staging/rtl8192u/ieee80211
+ccflags-y += -I $(srctree)/$(src)/ieee80211
 
 r8192u_usb-y := r8192U_core.o r8180_93cx6.o r8192U_wx.o                \
                  r8190_rtl8256.o r819xU_phy.o r819xU_firmware.o        \
index a8a8e0e0fb09c0de05f1d83983aca40d89e6348a..97e48757944af7d333b7387fa6f577cd835f1e71 100644 (file)
@@ -6,5 +6,4 @@ obj-$(CONFIG_UNISYS_VISORHBA)   += visorhba.o
 
 visorhba-y := visorhba_main.o
 
-ccflags-y += -Idrivers/staging/unisys/include
-
+ccflags-y += -I $(srctree)/$(src)/../include
index 439e95e0330012b6b8040691be535c03db395899..336a746f793b772f225263c3bb98ca3df2159ccf 100644 (file)
@@ -6,5 +6,4 @@ obj-$(CONFIG_UNISYS_VISORNIC)   += visornic.o
 
 visornic-y := visornic_main.o
 
-ccflags-y += -Idrivers/staging/unisys/include
-
+ccflags-y += -I $(srctree)/$(src)/../include
index d7b88d164d1543abac1fb6dad4274b2c87bcdfed..536bd0c11ddb8c7af333ff378e1f51b303895f96 100644 (file)
@@ -1,5 +1,4 @@
 obj-$(CONFIG_SND_BCM2835)      += snd-bcm2835.o
 snd-bcm2835-objs               := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o
 
-ccflags-y += -Idrivers/staging/vc04_services -D__VCCOREVER__=0x04000000
-
+ccflags-y += -I $(srctree)/$(src)/.. -D__VCCOREVER__=0x04000000
index 2a4565e682d8c1a83e8daa61732ee18ced9433a5..472f21e1f2a1893eb934326430e00425e51eac05 100644 (file)
@@ -7,5 +7,5 @@ bcm2835-v4l2-$(CONFIG_VIDEO_BCM2835) := \
 obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-v4l2.o
 
 ccflags-y += \
-       -Idrivers/staging/vc04_services \
+       -I $(srctree)/$(src)/.. \
        -D__VCCOREVER__=0x04000000