From f285eb1628e0e31470c127db83a890d57b9c6b86 Mon Sep 17 00:00:00 2001 From: jwang36 Date: Tue, 12 Aug 2008 07:54:36 +0000 Subject: 1. Enhanced the format of build_rule.txt to allow module type and arch information. 2. Enhanced Trim to convert ASL style of include to C style of include 3. Enhanced Trim to convert some EDK coding convention to EDK2 ECP convention 4. Added warning message when encountering unrecognized content in DSC/DEC/INF File 5. Enhanced the GenDepex to ignore everything outside DEPENDENCY_STANT and DEPENDENCY_END in dxs file git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5634 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Conf/build_rule.template | 97 +++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 43 deletions(-) (limited to 'BaseTools/Conf/build_rule.template') diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index c6cde8f2e5..385f020270 100644 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, Intel Corporation +# Copyright (c) 2007-2008, Intel Corporation # # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -17,17 +17,25 @@ # "*" is used to indicate that the source files will be processed at the same time. # "?" is used to indicate that the source files will be processed one by one. # -# "[" Build.[.][, Build.[.]] "]" +# "[" [.][.][, [.][.]] "]" # ]> -# [File-Type =] (?|*). [(\n|,|;) (?|*).] +# (?|*). [(\n|,) (?|*).] # # ]> # # +# +# +# # ]> # # [] # +# is the MODULE_TYPE in EDK2 or COMPONENT_TYPE in EDK. +# Missing will cause an exception and break build. +# Missing will cause that related build target won't be generated but +# won't break build. +# ## Placeholders for string substitution # @@ -89,7 +97,7 @@ # Unicode-Text-File # -[Build.C-Code-File] +[C-Code-File] ?.c ?.C @@ -98,6 +106,8 @@ ?.cpp ?.Cpp ?.CPP + + $(MAKE_FILE) @@ -109,24 +119,23 @@ "$(CC)" -o ${dst} $(CC_FLAGS) $(INC) ${src} -[Build.C-Header-File] +[C-Header-File] *.h, *.H - $(OUTPUT_DIR)(+)$(MODULE_NAME).gch - $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj -[Build.Assembly-Code-File] +[Assembly-Code-File.COMMON.COMMON] - Assembly-Code-File = ?.asm, ?.Asm, ?.ASM - $(MAKE_FILE) + ?.asm, ?.Asm, ?.ASM ?.S + + $(MAKE_FILE) @@ -142,9 +151,11 @@ Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i "$(ASM)" -o ${dst} $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii -[Build.Iasm-Code-File] +[Assembly-Code-File.COMMON.IPF] ?.s + + $(MAKE_FILE) @@ -155,11 +166,13 @@ Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i "$(ASM)" -o ${dst} $(ASM_FLAGS) ${d_path}(+)${s_base}.iii -[Build.Visual-Form-Representation-File] +[Visual-Form-Representation-File] ?.vfr ?.Vfr ?.VFR + + $(MAKE_FILE) @@ -171,7 +184,7 @@ -mkdir ${d_path} > NUL 2>&1 "$(VFR)" $(VFR_FLAGS) --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii -[Build.Object-File] +[Object-File] *.obj *.o @@ -185,30 +198,11 @@ "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src} -#[Build.Object-File, Build.Static-Library-File] -#BUILD_VERSION = 0x00010000 -# -# -# Object-File = *.obj -# Static-Library-File = *.lib, *.a -# -# -# $(OUTPUT_DIR)(+)$(MODULE_NAME).lib -# -# -# "$(SLINK)" /OUT:${dst} $(SLINK_FLAGS) ${src} -# -# -# "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src1} -( ${src2} -) -# -[Build.Static-Library-File] - +[Static-Library-File] + ?.lib - $(LIBS) - $(MAKE_FILE) - - ?.lib + $(LIBS) $(MAKE_FILE) @@ -221,7 +215,7 @@ "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(LIBS) ${src} -\) $(DLINK2_FLAGS) -[Build.Dynamic-Library-File] +[Dynamic-Library-File] ?.dll @@ -234,7 +228,7 @@ $(CP) ${dst} $(BIN_DIR) -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR) -[Build.Dependency-Expression-File] +[Dependency-Expression-File] ?.dxs, ?.Dxs, ?.DXS @@ -246,33 +240,42 @@ Trim --source-code -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i GenDepex -t $(MODULE_TYPE) -o ${dst} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii -[Build.Acpi-Source-Language-File] +[Acpi-Source-Language-File] ?.asl, ?.Asl, ?.ASL $(OUTPUT_DIR)(+)${s_base}.aml + + $(MAKE_FILE) + "$(PP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i "$(ASL)" -p ${dst} $(ASL_FLAGS) ${d_path}(+)${s_base}.i -[Build.Acpi-Table-Code-File] +[Acpi-Table-Code-File] ?.aslc $(OUTPUT_DIR)(+)${s_base}.acpi + + $(MAKE_FILE) + "$(CC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(INC) ${src} "$(DLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj GenFw -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll -[Build.Masm16-Code-File] +[Masm16-Code-File] ?.asm16, ?.Asm16, ?.ASM16 + + $(MAKE_FILE) + $(OUTPUT_DIR)(+)${s_base}.com @@ -281,7 +284,7 @@ "$(ASM)" /nologo /c /omf /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj ${src} "$(ASMLINK)" $(ASMLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj,${dst},,,, -[Build.Microcode-File] +[Microcode-File] ?.txt, ?.TXT, ?.Txt @@ -291,7 +294,7 @@ GenFw -o ${dst} -m ${src} -[Build.Microcode-Binary-File] +[Microcode-Binary-File] *.mcb @@ -302,7 +305,7 @@ GenFw -o ${dst} -j ${src} -$(CP) ${dst} $(BIN_DIR) -[Build.Unicode-Text-File] +[Unicode-Text-File] *.uni, *.Uni, *.UNI @@ -312,3 +315,11 @@ +[EFI-Image-File] + + ?.efi, ?.Efi, ?.EFI + + + + + -- cgit v1.2.3