Skip to contentSkip to conversation

target: Fix tcm_mod_builder.py default EXTRA_CFLAGS

PATCH In review Nicholas A. Bellinger 2 participants 5 messages Jan 18, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target: Fix tcm_mod_builder.py default EXTRA_CFLAGS

From: Nicholas Bellinger <[email protected]>

This patch removes the unnecessary default EXTRA_CFLAGS include paths for newly generated fabric modules, which now only contains:

include/
drivers/target/$NEW_FABRIC_MOD

---
 Documentation/target/tcm_mod_builder.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/target/tcm_mod_builder.py +1 -1
index bb0038c..cf857c0 100755
@@ -980,7 +980,7 @@ def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name):
 	if not p:
 		tcm_mod_err("Unable to open file: " + f)
 
-	buf = "EXTRA_CFLAGS += -I$(srctree)/drivers/target/ -I$(srctree)/include/ -I$(srctree)/drivers/scsi/ -I$(srctree)/include/scsi/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"
+	buf = "EXTRA_CFLAGS += -I$(srctree)/include/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"
 	buf += fabric_mod_name + "-objs			:= " + fabric_mod_name + "_fabric.o \\\n"
 	buf += "					   " + fabric_mod_name + "_configfs.o\n"
 	buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ")		+= " + fabric_mod_name + ".o\n"
Signature · 1 line
1.7.3.5
#1 lore raw

Documentation/target/tcm_mod_builder.py def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name): · line 983

Quoted 1 line · Nicholas A. Bellinger
Documentation/target/tcm_mod_builder.py +1 -0
+	buf = "EXTRA_CFLAGS += -I$(srctree)/include/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"

-I$(srctree)/include/ is never needed, that's added automatically. Similarly adding the directory of the driver itself (assuming that's what the second one is supposed to be) is not needed either.

#2 lore raw
Quoted 7 lines · Christoph Hellwig

Documentation/target/tcm_mod_builder.py def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name): · line 983

Quoted 1 line · Nicholas A. Bellinger
Documentation/target/tcm_mod_builder.py +1 -0
+	buf = "EXTRA_CFLAGS += -I$(srctree)/include/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"

-I$(srctree)/include/ is never needed, that's added automatically. Similarly adding the directory of the driver itself (assuming that's what the second one is supposed to be) is not needed either.

This is correct on the -I$(srctree)/include/, and I will drop this as well.. However with the current fabric module include layout (all .h living in drivers/target/$FABRIC_MOD), the latter bit is still required AFAICS to build.

--nab

#3 lore raw
Quoted 4 lines · Nicholas A. Bellinger

This is correct on the -I$(srctree)/include/, and I will drop this as well.. However with the current fabric module include layout (all .h living in drivers/target/$FABRIC_MOD), the latter bit is still required AFAICS to build.

No, there's no need. Just use ""-style includes and they'll always get picked up in the local directory.

#4 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 4 lines · Nicholas A. Bellinger

This is correct on the -I$(srctree)/include/, and I will drop this as well.. However with the current fabric module include layout (all .h living in drivers/target/$FABRIC_MOD), the latter bit is still required AFAICS to build.

No, there's no need. Just use ""-style includes and they'll always get picked up in the local directory.

Whooops, fixed with ""-style includes in commit 7514aea. Please let me know if you have any other thoughts wrt tcm_mod_builder.py and I will get these coded up..

Thanks again, ;)

--nab