From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E54021DFA7B1 for ; Fri, 31 Mar 2017 07:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490970119; x=1522506119; h=from:to:cc:subject:date:message-id; bh=60DkFJfZNjnl6hX15cgiiYFeGmBgGQF4rKrC0saMMdE=; b=am+OtimyP4AqrTT1/XoBLtXPiMU4J2sfUr0MwAdWyZJMLrciJSKEF7oU +0ZNuipxlAvxjWa8T2QScWxq/hd0Cw==; Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Mar 2017 07:21:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,252,1486454400"; d="scan'208";a="82730118" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga005.fm.intel.com with ESMTP; 31 Mar 2017 07:21:58 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Fri, 31 Mar 2017 22:21:55 +0800 Message-Id: <1490970115-50652-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Enhance StrDefs.h to include ImageDefs.h X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 14:21:59 -0000 Enhance StrDefs.h to include ImageDefs.h for VfrCompiler to support IMAGE_TOKEN usage. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenC.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 96b1459..0fb6b9f 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1979,10 +1979,13 @@ def CreateCode(Info, AutoGenC, AutoGenH, StringH, UniGenCFlag, UniGenBinBuffer, if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in GlobalData.MixedPcd[PcdItem]: TokenCName = PcdItem[0] break GuidMacros.append('#define %s %s' % ('_PCD_VALUE_'+TokenCName, Value)) + if Info.IdfFileList: + GuidMacros.append('#include "%sImgDefs.h"' % Info.Name) + if GuidMacros: StringH.Append('\n#ifdef VFRCOMPILE\n%s\n#endif\n' % '\n'.join(GuidMacros)) StringH.Append("\n#endif\n") AutoGenH.Append('#include "%s"\n' % FileName) -- 2.6.1.windows.1