Skip to content

Commit

Permalink
media: prefix header search paths with $(srctree)/
Browse files Browse the repository at this point in the history
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 48f6e3c
("kbuild: do not drop -I without parameter").

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

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
  • Loading branch information
Masahiro Yamada committed May 18, 2019
1 parent cc966c9 commit 14340de
Show file tree
Hide file tree
Showing 30 changed files with 47 additions and 49 deletions.
4 changes: 2 additions & 2 deletions drivers/media/common/b2c2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ b2c2-flexcop-objs += flexcop-sram.o flexcop-eeprom.o flexcop-misc.o
b2c2-flexcop-objs += flexcop-hw-filter.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o

ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -I $(srctree)/drivers/media/tuners/
2 changes: 1 addition & 1 deletion drivers/media/i2c/smiapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ smiapp-objs += smiapp-core.o smiapp-regs.o \
smiapp-quirk.o smiapp-limits.o
obj-$(CONFIG_VIDEO_SMIAPP) += smiapp.o

ccflags-y += -Idrivers/media/i2c
ccflags-y += -I $(srctree)/drivers/media/i2c
3 changes: 1 addition & 2 deletions drivers/media/mmc/siano/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o

ccflags-y += -Idrivers/media/common/siano

ccflags-y += -I $(srctree)/drivers/media/common/siano
2 changes: 1 addition & 1 deletion drivers/media/pci/b2c2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ endif
b2c2-flexcop-pci-objs += flexcop-pci.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o

ccflags-y += -Idrivers/media/common/b2c2/
ccflags-y += -I $(srctree)/drivers/media/common/b2c2/
4 changes: 2 additions & 2 deletions drivers/media/pci/bt8xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \
obj-$(CONFIG_VIDEO_BT848) += bttv.o
obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
4 changes: 2 additions & 2 deletions drivers/media/pci/cx18/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ cx18-alsa-objs := cx18-alsa-main.o cx18-alsa-pcm.o
obj-$(CONFIG_VIDEO_CX18) += cx18.o
obj-$(CONFIG_VIDEO_CX18_ALSA) += cx18-alsa.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
4 changes: 2 additions & 2 deletions drivers/media/pci/cx23885/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cx23885-objs := cx23885-cards.o cx23885-video.o cx23885-vbi.o \
obj-$(CONFIG_VIDEO_CX23885) += cx23885.o
obj-$(CONFIG_MEDIA_ALTERA_CI) += altera-ci.o

ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends

ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
4 changes: 2 additions & 2 deletions drivers/media/pci/cx88/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o
obj-$(CONFIG_VIDEO_CX88_BLACKBIRD) += cx88-blackbird.o
obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o
obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o
ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
4 changes: 2 additions & 2 deletions drivers/media/pci/ddbridge/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ ddbridge-objs := ddbridge-main.o ddbridge-core.o ddbridge-ci.o \

obj-$(CONFIG_DVB_DDBRIDGE) += ddbridge.o

ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -I $(srctree)/drivers/media/tuners/
2 changes: 1 addition & 1 deletion drivers/media/pci/dm1105/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
obj-$(CONFIG_DVB_DM1105) += dm1105.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
2 changes: 1 addition & 1 deletion drivers/media/pci/mantis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ obj-$(CONFIG_MANTIS_CORE) += mantis_core.o
obj-$(CONFIG_DVB_MANTIS) += mantis.o
obj-$(CONFIG_DVB_HOPPER) += hopper.o

ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
2 changes: 1 addition & 1 deletion drivers/media/pci/netup_unidvb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ netup-unidvb-objs += netup_unidvb_spi.o

obj-$(CONFIG_DVB_NETUP_UNIDVB) += netup-unidvb.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
4 changes: 2 additions & 2 deletions drivers/media/pci/ngene/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o

obj-$(CONFIG_DVB_NGENE) += ngene.o

ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -I $(srctree)/drivers/media/tuners/
2 changes: 1 addition & 1 deletion drivers/media/pci/pluto2/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
obj-$(CONFIG_DVB_PLUTO2) += pluto2.o

ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
4 changes: 2 additions & 2 deletions drivers/media/pci/pt1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ earth-pt1-objs := pt1.o

obj-$(CONFIG_DVB_PT1) += earth-pt1.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
4 changes: 2 additions & 2 deletions drivers/media/pci/pt3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ earth-pt3-objs += pt3.o pt3_i2c.o pt3_dma.o

obj-$(CONFIG_DVB_PT3) += earth-pt3.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
5 changes: 2 additions & 3 deletions drivers/media/pci/smipcie/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ smipcie-objs := smipcie-main.o smipcie-ir.o

obj-$(CONFIG_DVB_SMIPCIE) += smipcie.o

ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends

ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
4 changes: 2 additions & 2 deletions drivers/media/pci/ttpci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ obj-$(CONFIG_DVB_BUDGET_CI) += budget-ci.o
obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-patch.o
obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o

ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -I $(srctree)/drivers/media/tuners
4 changes: 2 additions & 2 deletions drivers/media/platform/sti/c8sectpfe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ c8sectpfe-y += c8sectpfe-core.o c8sectpfe-common.o c8sectpfe-dvb.o \

obj-$(CONFIG_DVB_C8SECTPFE) += c8sectpfe.o

ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -I $(srctree)/drivers/media/tuners/
2 changes: 1 addition & 1 deletion drivers/media/spi/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obj-$(CONFIG_VIDEO_GS1662) += gs1662.o
obj-$(CONFIG_CXD2880_SPI_DRV) += cxd2880-spi.o

ccflags-y += -Idrivers/media/dvb-frontends/cxd2880
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/cxd2880
2 changes: 1 addition & 1 deletion drivers/media/usb/as102/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ dvb-as102-objs := as102_drv.o as102_fw.o as10x_cmd.o as10x_cmd_stream.o \

obj-$(CONFIG_DVB_AS102) += dvb-as102.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
4 changes: 2 additions & 2 deletions drivers/media/usb/au0828/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif

obj-$(CONFIG_VIDEO_AU0828) += au0828.o

ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends

ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
2 changes: 1 addition & 1 deletion drivers/media/usb/b2c2/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
b2c2-flexcop-usb-objs := flexcop-usb.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o

ccflags-y += -Idrivers/media/common/b2c2/
ccflags-y += -I $(srctree)/drivers/media/common/b2c2/
4 changes: 2 additions & 2 deletions drivers/media/usb/cx231xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx.o
obj-$(CONFIG_VIDEO_CX231XX_ALSA) += cx231xx-alsa.o
obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o

ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
4 changes: 2 additions & 2 deletions drivers/media/usb/em28xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ obj-$(CONFIG_VIDEO_EM28XX_ALSA) += em28xx-alsa.o
obj-$(CONFIG_VIDEO_EM28XX_DVB) += em28xx-dvb.o
obj-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-rc.o

ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
2 changes: 1 addition & 1 deletion drivers/media/usb/go7007/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ go7007-y := go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \

s2250-y := s2250-board.o

ccflags-$(CONFIG_VIDEO_GO7007_LOADER:m=y) += -Idrivers/media/common
ccflags-$(CONFIG_VIDEO_GO7007_LOADER:m=y) += -I $(srctree)/drivers/media/common
4 changes: 2 additions & 2 deletions drivers/media/usb/pvrusb2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ pvrusb2-objs := pvrusb2-i2c-core.o \

obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o

ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
2 changes: 1 addition & 1 deletion drivers/media/usb/siano/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-$(CONFIG_SMS_USB_DRV) += smsusb.o

ccflags-y += -Idrivers/media/common/siano
ccflags-y += -I $(srctree)/drivers/media/common/siano
ccflags-y += $(extra-cflags-y) $(extra-cflags-m)

4 changes: 2 additions & 2 deletions drivers/media/usb/tm6000/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ obj-$(CONFIG_VIDEO_TM6000) += tm6000.o
obj-$(CONFIG_VIDEO_TM6000_ALSA) += tm6000-alsa.o
obj-$(CONFIG_VIDEO_TM6000_DVB) += tm6000-dvb.o

ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
2 changes: 1 addition & 1 deletion drivers/media/usb/ttusb-budget/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
obj-$(CONFIG_DVB_TTUSB_BUDGET) += dvb-ttusb-budget.o

ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -I $(srctree)/drivers/media/dvb-frontends

0 comments on commit 14340de

Please sign in to comment.