Enhanced the <Build_Library> macro to check OBJECTS property in case it's empty
[mirror_edk2.git] / Tools / Conf / BuildMacro.xml
index 5c467b5..71c8f9b 100644 (file)
@@ -540,6 +540,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <var name="FILE_PATH" value="." />\r
       <mkdir dir="${BIN_DIR}"/>\r
 \r
+      <if>\r
+        <equals arg1="${OBJECTS}" arg2="" trim="true"/>\r
+        <then>\r
+          <fail message="No object files"/>\r
+        </then>\r
+      </if>\r
+\r
       <OnDependency>\r
         <sourcefiles>\r
           <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />\r