diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-24 07:29:31 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-24 07:29:31 +0000 |
commit | 95d675b5272d76105e2109a11d8b35f416be8b29 (patch) | |
tree | d8c0e4c20e5c30adce62c93d681706428ad75b1f /EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc | |
parent | c7f33ca42470dc87bc41a8583f427883123d67a1 (diff) | |
download | edk2-platforms-95d675b5272d76105e2109a11d8b35f416be8b29.tar.xz |
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6)
1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol.
1.3) Add Smbios 2.5, 2.6 supports.
Incompatible changes hilighted:
1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed.
2) EFI_IP4_IPCONFIG_DATA changed.
2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4624 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc')
-rw-r--r-- | EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/Makefile | 2 | ||||
-rw-r--r-- | EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/ProcessDsc.c | 57 |
2 files changed, 52 insertions, 7 deletions
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/Makefile b/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/Makefile index c835a80025..b11d3c44ad 100644 --- a/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/Makefile +++ b/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/Makefile @@ -89,11 +89,13 @@ $(TARGET_EXE): $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).exe !ELSE
$(TARGET_EXE) : $(OBJECTS) $(LIBS)
$(LINK) $(MSVS_LINK_LIBPATHS) $(L_FLAGS) $(LIBS) /out:$(TARGET_EXE) $(OBJECTS)
+!IF ("$(EFI_BINARY_BUILD)" == "YES")
if not exist $(EFI_PLATFORM_BIN)\Tools mkdir $(EFI_PLATFORM_BIN)\Tools
if exist $(TARGET_EXE) copy $(TARGET_EXE) $(EFI_PLATFORM_BIN)\tools\$(TARGET_NAME).exe /Y
if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb \
copy $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).pdb $(EFI_PLATFORM_BIN)\Tools\$(TARGET_NAME).pdb /Y
!ENDIF
+!ENDIF
clean:
@if exist $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).* del $(EDK_TOOLS_OUTPUT)\$(TARGET_NAME).* > NUL
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/ProcessDsc.c b/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/ProcessDsc.c index 4833b78e0d..5b67632721 100644 --- a/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/ProcessDsc.c +++ b/EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/ProcessDsc.c @@ -554,6 +554,12 @@ AddModuleName ( INT8 *InfName
);
+static
+void
+ReplaceSlash (
+ INT8 *Path
+ );
+
/*****************************************************************************/
int
main (
@@ -1032,10 +1038,11 @@ Returns: // added local symbols
//
ExpandSymbols (ArgLine, Line, sizeof (Line), EXPANDMODE_NO_UNDEFS);
-
+
//
// If we have "c:\path\filename"
//
+ ReplaceSlash (Line);
if (IsAbsolutePath (Line)) {
ComponentFilePathAbsolute = 1;
} else if (Line[0] == '.') {
@@ -1054,7 +1061,7 @@ Returns: //
strcpy (ComponentFilePath, Line);
Cptr = ComponentFilePath + strlen (ComponentFilePath) - 1;
- while ((*Cptr != '\\') && (*Cptr != '/') && (Cptr != ComponentFilePath)) {
+ while ((*Cptr != '\\') && (Cptr != ComponentFilePath)) {
Cptr--;
}
//
@@ -1239,7 +1246,8 @@ Returns: // They may have defined DEST_DIR on the component INF line, so it's already
// been defined, If that's the case, then don't set it to the path of this file.
//
- if (GetSymbolValue (DEST_DIR) == NULL) {
+ TempCptr = GetSymbolValue (DEST_DIR);
+ if (TempCptr == NULL) {
if (ComponentFilePathAbsolute == 0) {
//
// The destination path is $(BUILD_DIR)\$(PROCESSOR)\component_path
@@ -1264,6 +1272,8 @@ Returns: );
}
AddSymbol (DEST_DIR, FileName, SYM_OVERWRITE | SYM_LOCAL | SYM_FILEPATH);
+ } else {
+ ReplaceSlash (TempCptr);
}
//
@@ -1818,6 +1828,7 @@ Returns: //
OverridePath = GetSymbolValue (SOURCE_OVERRIDE_PATH);
if (OverridePath != NULL) {
+ ReplaceSlash (OverridePath);
fprintf (MakeFptr, "INC = $(INC) -I %s\n", OverridePath);
fprintf (MakeFptr, "INC = $(INC) -I %s\\%s \n", OverridePath, Processor);
}
@@ -1881,6 +1892,7 @@ ProcessIncludesSectionSingle ( // Don't process blank lines
//
if (*Cptr) {
+ ReplaceSlash (Cptr);
//
// Strip off trailing slash
//
@@ -2150,6 +2162,7 @@ ProcessSourceFilesSection ( //
ExpandSymbols (Cptr, FileName, sizeof (FileName), 0);
AddFileSymbols (FileName);
+ ReplaceSlash (FileName);
//
// Set the SOURCE_FILE_NAME symbol. What we have now is the name of
// the file, relative to the location of the INF file. So prepend
@@ -2197,6 +2210,7 @@ ProcessSourceFilesSection ( OverridePath = GetSymbolValue (SOURCE_OVERRIDE_PATH);
}
if (OverridePath != NULL) {
+ ReplaceSlash (OverridePath);
//
// See if the file exists. If it does, reset the SOURCE_FILE_NAME symbol.
//
@@ -2490,6 +2504,7 @@ ProcessObjectsSingle ( //
if (!IsIncludeFile (Cptr)) {
ExpandSymbols (Cptr, FileName, sizeof (FileName), 0);
+ ReplaceSlash (FileName);
Cptr2 = BuiltFileExtension (FileName);
if (Cptr2 != NULL) {
SetFileExtension (FileName, Cptr2);
@@ -2731,8 +2746,10 @@ ProcessIncludeFilesSingle ( //
ExpandSymbols (Cptr, FileName, sizeof (FileName), 0);
AddFileSymbols (FileName);
+ ReplaceSlash (FileName);
if (IsIncludeFile (FileName)) {
if ((OverridePath != NULL) && (!IsAbsolutePath (FileName))) {
+ ReplaceSlash (OverridePath);
strcpy (TempFileName, OverridePath);
strcat (TempFileName, "\\");
strcat (TempFileName, FileName);
@@ -2743,7 +2760,7 @@ ProcessIncludeFilesSingle ( // to the beginning of the list of include paths.
//
for (Cptr = TempFileName + strlen (TempFileName) - 1;
- (Cptr >= TempFileName) && (*Cptr != '\\') && (*Cptr != '/');
+ (Cptr >= TempFileName) && (*Cptr != '\\');
Cptr--
)
;
@@ -2848,9 +2865,9 @@ GetFileParts ( FP->Extension[0] = 0;
}
//
- // Now back up and get the base name (include the preceding '\' or '/')
+ // Now back up and get the base name (include the preceding '\')
//
- for (; (Cptr > FileNamePtr) && (*Cptr != '\\') && (*Cptr != '/'); Cptr--)
+ for (; (Cptr > FileNamePtr) && (*Cptr != '\\'); Cptr--)
;
FP->BaseName = (char *) malloc (strlen (Cptr) + 1);
strcpy (FP->BaseName, Cptr);
@@ -3329,7 +3346,7 @@ MakeFilePath ( }
for (;;) {
- for (; *Cptr && (*Cptr != '/') && (*Cptr != '\\'); Cptr++)
+ for (; *Cptr && (*Cptr != '\\'); Cptr++)
;
if (*Cptr) {
SavedChar = *Cptr;
@@ -4204,6 +4221,7 @@ Returns: FreeCwd = 1;
AddSymbol (BUILD_DIR, Cptr, SYM_OVERWRITE | SYM_GLOBAL | SYM_FILEPATH);
} else {
+ ReplaceSlash (Cptr);
FreeCwd = 0;
}
@@ -4359,6 +4377,7 @@ GetEfiSource ( //
EfiSource = GetSymbolValue (EFI_SOURCE);
if ( EfiSource != NULL) {
+ ReplaceSlash (EfiSource);
if (EfiSource[strlen (EfiSource) - 1] == '\\') {
EfiSource[strlen (EfiSource) - 1] = 0;
}
@@ -4370,6 +4389,7 @@ GetEfiSource ( //
EfiSource = getenv (EFI_SOURCE);
if (EfiSource != NULL) {
+ ReplaceSlash (EfiSource);
if (EfiSource[strlen (EfiSource) - 1] == '\\') {
EfiSource[strlen (EfiSource) - 1] = 0;
}
@@ -4724,3 +4744,26 @@ Returns: return 0;
}
+
+static
+void
+ReplaceSlash (
+ INT8 *Path
+ )
+/*++
+
+Routine Description:
+
+ Replace '/' with '\\'
+
+Returns:
+
+--*/
+{
+ while (*Path) {
+ if (*Path == '/') {
+ *Path = '\\';
+ }
+ Path++;
+ }
+}
\ No newline at end of file |