- # Update to search files with suffix in all sub-dirs.\r
- Tuple = os.walk(FfsInf.EfiOutputPath)\r
- for Dirpath, Dirnames, Filenames in Tuple:\r
- for F in Filenames:\r
- if os.path.splitext(F)[1] in (Suffix):\r
- FullName = os.path.join(Dirpath, F)\r
- FileList.append(FullName)\r
-\r
+ #\r
+ # Get Makefile path and time stamp\r
+ #\r
+ MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')]\r
+ Makefile = os.path.join(MakefileDir, 'Makefile')\r
+ if not os.path.exists(Makefile):\r
+ Makefile = os.path.join(MakefileDir, 'GNUmakefile')\r
+ if os.path.exists(Makefile):\r
+ # Update to search files with suffix in all sub-dirs.\r
+ Tuple = os.walk(FfsInf.EfiOutputPath)\r
+ for Dirpath, Dirnames, Filenames in Tuple:\r
+ for F in Filenames:\r
+ if os.path.splitext(F)[1] in (Suffix):\r
+ FullName = os.path.join(Dirpath, F)\r
+ if os.path.getmtime(FullName) > os.path.getmtime(Makefile):\r
+ FileList.append(FullName)\r
+ if not FileList:\r
+ SuffixMap = FfsInf.GetFinalTargetSuffixMap()\r
+ if Suffix in SuffixMap:\r
+ FileList.extend(SuffixMap[Suffix])\r
+ \r