summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/ToolDefClassObject.py
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools:Fix GenFds issue for BuildOption replace GenFdsOptionFan, ZhijuX2020-01-131-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2455 BuildOption is used by TargetTxtClassObj.py GenFdsOption is used by GenFds.py When the GenFds tool is used alone (e.g. python3 -m GenFds.GenFds -h) With the OptionParser function, the first detected function prints the help message import TargetTxtClassObj to GenFds, The BuildOption will be executed and replace GenFdsOption We removed all objects associated with this problem that were created directly during the import process (e.g. BuildOption, BuildTarget = MyOptionParser(), TargetTxt = TargetTxtDict()) The Patch is going to fix this issue Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Singleton the object to handle build conf fileFeng, Bob C2019-08-091-2/+4
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875 The build config files are target.txt, build rule, tooldef During a build, the config is not changed, so the object to handle them need to be singleton. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix various typosAntoine Cœur2019-07-081-1/+1
| | | | | | | Fix various typos in BaseTools. Signed-off-by: Cœur <coeur@gmx.fr> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: fix importsCarsey, Jaben2019-01-101-2/+2
| | | | | | | | | | | | | | | 1 - Some of these imports are cascaded from another file. Import them locally. 2 - Some of these imports are not used. Remove them. 3 - Some of these were missing the namespace used to import them. These changes facilitate optimization of BaseTools: https://bugzilla.tianocore.org/show_bug.cgi?id=42 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: create and use a standard shared variable for '*'Jaben Carsey2018-12-061-11/+12
| | | | | | | | | | add a variable for the string '*' and then use it instead of lots of '*' Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by : Bob Feng <bob.c.feng@intel.com>
* Revert BaseTools: PYTHON3 migrationLiming Gao2018-10-151-0/+1
| | | | | | | | | | | | | | This reverts commit 6693f359b3c213513c5096a06c6f67244a44dc52.. 678f85131238622e576705117e299d81cff755c9. Python3 migration is the fundamental change. It requires every developer to install Python3. Before this migration, the well communication and wide verification must be done. But now, most people is not aware of this change, and not try it. So, Python3 migration is reverted and be moved to edk2-staging Python3 branch for the edk2 user evaluation. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Remove the "from __future__ import" itemsYunhua Feng2018-10-131-1/+0
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Use absolute import in CommonGary Lin2018-07-161-4/+5
| | | | | | | | | | Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools: Fix old python2 idiomsGary Lin2018-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on "futurize -f lib2to3.fixes.fix_idioms" * Change some type comparisons to isinstance() calls: type(x) == T -> isinstance(x, T) type(x) is T -> isinstance(x, T) type(x) != T -> not isinstance(x, T) type(x) is not T -> not isinstance(x, T) * Change "while 1:" into "while True:". * Change both v = list(EXPR) v.sort() foo(v) and the more general v = EXPR v.sort() foo(v) into v = sorted(EXPR) foo(v) Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Adjust the spaces around commas and colonsGary Lin2018-06-271-3/+3
| | | | | | | | | | Based on "futurize -f lib2to3.fixes.fix_ws_comma" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Rename String to StringUtils.Marvin.Haeuser@outlook.com2018-05-281-1/+1
| | | | | | | | | | | | For case-insensitive file systems, edk2 String.py collides with the Python string.py, which results in build errors. This,for example, applies to building via the Windows Subsystem for Linux from a DriveFS file system. This patch renames String to StringUtils to prevent conflicts for case-insensitive file systems. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: refactor to use list not dictCarsey, Jaben2018-05-041-2/+3
| | | | | | | | | | since we never access the values in the copied dict, just use a list instead. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: remove unused fileCarsey, Jaben2018-04-101-2/+5
| | | | | | | | | | ToolsDefClassObject didnt need Dictionary, it needed an import from there. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Remove equality operator with NoneCarsey, Jaben2018-03-301-1/+1
| | | | | | | | | | replace "== None" with "is None" and "!= None" with "is not None" Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Support Structure PCD value assignment in DEC/DSCLiming Gao2017-12-251-1/+0
| | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=542 This is pure BaseTools enhancement to support PCD with one structure. User can specify PCD value based on its structure field. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix a bug for ExpandMacros to support mixed case ENV varYonghong Zhu2016-11-021-4/+7
| | | | | | | | | | | | os.environ contains all environment variables uppercase on Windows which cause the key in the self.MacroDictionary is uppercase, but the real variable name maybe mixed case, eg:WINSDK81x86, then we can't find the variable in the self.MacroDictionary. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix bad macro expansion during tools_def.txt parsingMichael Zimmermann2016-05-271-25/+26
| | | | | | | | this is something I missed in 8ac46e4 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: add '!include' support to tools_def.txt parserMichael Zimmermann2016-05-261-7/+64
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix comments about return value of 'LoadToolDefFile'Michael Zimmermann2016-05-261-1/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Clean some coding style issuesYonghong Zhu2015-12-011-3/+3
| | | | | | | | | | This patch clean some coding style issues, majorly for space character. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19080 6f19259b-4bc3-4df7-8a09-765794883524
* License header updated to match correct format.Yingke Liu2014-08-281-7/+12
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15971 6f19259b-4bc3-4df7-8a09-765794883524
* There is a limitation on WINDOWS OS for the length of entire file path ↵Hess Chen2014-08-151-2/+3
| | | | | | | | | | can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Branch (version r2149) to EDKII main trunk. lgao42011-05-111-2/+4
| | | | | | | | | | | BaseTool Branch: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11640 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r2065.lgao42010-10-111-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10915 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r1971lgao42010-05-181-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
* Check In tool source code based on Build tool project revision r1655.lgao42009-07-171-0/+217
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8964 6f19259b-4bc3-4df7-8a09-765794883524