## @file\r
# Create makefile for MS nmake and GNU make\r
#\r
-# Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>\r
# Copyright (c) 2020, ARM Limited. All rights reserved.<BR>\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
# tools definitions\r
ToolsDef = []\r
IncPrefix = self._INC_FLAG_[MyAgo.ToolChainFamily]\r
- for Tool in MyAgo.BuildOption:\r
- for Attr in MyAgo.BuildOption[Tool]:\r
+ for Tool in sorted(list(MyAgo.BuildOption)):\r
+ Appended = False\r
+ for Attr in sorted(list(MyAgo.BuildOption[Tool])):\r
Value = MyAgo.BuildOption[Tool][Attr]\r
if Attr == "FAMILY":\r
continue\r
elif Attr == "PATH":\r
ToolsDef.append("%s = %s" % (Tool, Value))\r
+ Appended = True\r
else:\r
# Don't generate MAKE_FLAGS in makefile. It's put in environment variable.\r
if Tool == "MAKE":\r
Value = ' '.join(ValueList)\r
\r
ToolsDef.append("%s_%s = %s" % (Tool, Attr, Value))\r
- ToolsDef.append("")\r
+ Appended = True\r
+ if Appended:\r
+ ToolsDef.append("")\r
\r
# generate the Response file and Response flag\r
RespDict = self.CommandExceedLimit()\r