Changed the way of generating the pre-compiled header to solve incremental build...
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 06:31:33 +0000 (06:31 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 06:31:33 +0000 (06:31 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1587 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Conf/BuildMacro.xml

index a0b2346..c08039d 100644 (file)
@@ -64,10 +64,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <if>\r
             <and>\r
               <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-              <available file="${DEST_DIR_DEBUG}/AutoGen.pch"/>\r
+              <available file="${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
             </and>\r
             <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>\r
+              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
             </then>\r
             <else>\r
               <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r
@@ -112,6 +112,44 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <var name="FILE_PATH" value="@{FILEPATH}" />\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
 \r
+      <if>\r
+        <available type="file" file="${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
+        <then>\r
+          <makedeps DepsFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep">\r
+            <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
+            <EXTRA.INC/>\r
+          </makedeps>\r
+        </then>\r
+      </if>\r
+\r
+      <OnDependency>\r
+        <sourcefiles>\r
+          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
+        </sourcefiles>\r
+        <targetfiles>\r
+          <file Name="${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
+        </targetfiles>\r
+\r
+        <sequential>\r
+          <!-- Generate pre-compiled header -->\r
+          <if>\r
+            <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
+            <then>\r
+              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /TC /Yc /Fp${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
+              <cc userdefine="on">\r
+                <command type="CC" cmd="${CC}" workdir="${DEST_DIR_OUTPUT}" family="${CC_FAMILY}"\r
+                    outputFile="${DEST_DIR_OUTPUT}/AutoGen.h.obj">\r
+                  <EXTRA.INC/>\r
+                  <argument value="${LOCAL_CC_FLAGS}"/>\r
+                  <EXTRA.ARG/>\r
+                  <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
+                </command>\r
+              </cc>\r
+            </then>\r
+          </if>\r
+        </sequential>\r
+      </OnDependency>\r
+\r
       <if>\r
         <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
         <then>\r
@@ -136,7 +174,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <if>\r
             <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
             <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yc${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>\r
+              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
             </then>\r
             <else>\r
               <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r
@@ -605,10 +643,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <if>\r
             <and>\r
               <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-              <available file="${DEST_DIR_DEBUG}/AutoGen.pch"/>\r
+              <available file="${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
             </and>\r
             <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yc${DEST_DIR_DEBUG}/AutoGen.h /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>\r
+              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yc${DEST_DIR_DEBUG}/AutoGen.h /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
             </then>\r
             <else>\r
               <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r
@@ -682,10 +720,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <if>\r
             <and>\r
               <equals arg1="${CC_FAMILY}" arg2="MSFT" casesensitive="false"/>\r
-              <available file="${DEST_DIR_DEBUG}/AutoGen.pch"/>\r
+              <available file="${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
             </and>\r
             <then>\r
-              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.pch"/>\r
+              <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS} /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_DEBUG}/AutoGen.h.gch"/>\r
             </then>\r
             <else>\r
               <var name="LOCAL_CC_FLAGS" value="${CC_FLAGS}"/>\r