From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753419Ab1CNLGm (ORCPT ); Mon, 14 Mar 2011 07:06:42 -0400 Received: from nm2-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.248]:30564 "HELO nm2-vm0.bullet.mail.sp2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752840Ab1CNLGi (ORCPT ); Mon, 14 Mar 2011 07:06:38 -0400 X-Yahoo-Newman-Id: 867291.36099.bm@omp1042.mail.sp2.yahoo.com X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: GVUeHIYVM1mSXpJm9M.vQbsRsD74Cyr0YsoMQYIIsxov6pi RRaqtWPLrGnzcu3s2YdTBRyGDirk.QR3o2g0qi35kqoo2yDOiC447TTfrpOl bESrUinHRjNmRdgnZW84Ki9Eiz16u4MYEABTXonSpf33zRQ2mTG6mQuqtGJZ BBTKz.sFGAat2SvzRqMkuSLC08skrJMPYw1gTwbKYlXqxhVD6b3jguKRHeDi 0dZiyXX0pSiksBCZ3.tsrLFbe4FlgRAZe5Lnvndcnkggg3xsZuI3adPsu.bh afrdott.gLVGE1jnHQ8trlBGXVhywVEf9nw_gdeQ3bFjBsbxgMx4g0kkISJT YMFY1XWlnypTXfVyBvB4su3haXjJnc9UgOv.LZ9di84DieqOPaVmRmSw7sxX dPaUFbE6iksmwTQBZ57YU3sW1A9FzNPd7yO.a83SkT2BgBNIdHckTkcRDSyl UWq2OunwDFu126vwxjcu7UNjdFxCrK1sDV9H. X-Yahoo-Newman-Property: ymail-3 From: "Nicholas A. Bellinger" To: linux-scsi , linux-kernel , James Bottomley Cc: Christoph Hellwig , Mike Christie , Hannes Reinecke , FUJITA Tomonori , Boaz Harrosh , Joel Becker , Stephen Rothwell , Douglas Gilbert , Nicholas Bellinger Subject: [PATCH 03/21] target: tcm_mod_builder.py generated Makefile cleanups Date: Mon, 14 Mar 2011 04:05:57 -0700 Message-Id: <1300100775-10012-4-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1300100775-10012-1-git-send-email-nab@linux-iscsi.org> References: <1300100775-10012-1-git-send-email-nab@linux-iscsi.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Bellinger This patch converts the tcm_mod_builder.py generation script to create a new drivers/target/$TCM_FABRIC_MOD/Makefile and update drivers/target/Makefile, instead of creating+updating a 'Kbuild' filename. It also removes the remaining EXTRA_CFLAGS includes from tcm_mod_build_kbuild(), and converts fabric module generated .c code to us ""-style includes for $FABRIC_MOD_[base,fabric].h Reported-by: Christoph Hellwig Signed-off-by: Nicholas A. Bellinger --- Documentation/target/tcm_mod_builder.py | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py index dbeb8a0..89af6c7 100755 --- a/Documentation/target/tcm_mod_builder.py +++ b/Documentation/target/tcm_mod_builder.py @@ -239,8 +239,8 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): buf += "#include \n" buf += "#include \n" buf += "#include \n\n" - buf += "#include <" + fabric_mod_name + "_base.h>\n" - buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" + buf += "#include \"" + fabric_mod_name + "_base.h\"\n" + buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" buf += "/* Local pointer to allocated TCM configfs fabric module */\n" buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n" @@ -583,9 +583,9 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): buf += "#include \n" buf += "#include \n" buf += "#include \n" - buf += "#include \n" - buf += "#include <" + fabric_mod_name + "_base.h>\n" - buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" + buf += "#include \n\n" + buf += "#include \"" + fabric_mod_name + "_base.h\"\n" + buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" buf += "{\n" @@ -973,14 +973,13 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name): buf = "" - f = fabric_mod_dir_var + "/Kbuild" + f = fabric_mod_dir_var + "/Makefile" print "Writing file: " + f p = open(f, 'w') 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 += 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" @@ -1018,7 +1017,7 @@ def tcm_mod_build_kconfig(fabric_mod_dir_var, fabric_mod_name): def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name): buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n" - kbuild = tcm_dir + "/drivers/target/Kbuild" + kbuild = tcm_dir + "/drivers/target/Makefile" f = open(kbuild, 'a') f.write(buf) @@ -1064,7 +1063,7 @@ def main(modname, proto_ident): tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name) tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name) - input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kbuild..? [yes,no]: ") + input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Makefile..? [yes,no]: ") if input == "yes" or input == "y": tcm_mod_add_kbuild(tcm_dir, fabric_mod_name) -- 1.7.4.1