diff options
author | Burt Silverman <burtms@gmail.com> | 2019-09-07 16:33:53 -0400 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-09-11 22:30:16 +0800 |
commit | 5e5abfcab4c2962005be89c951a86f55db27555e (patch) | |
tree | 8bc60bf62c22d26a8d8198df59b8b66ef43027d1 | |
parent | 7809492c10e8950a1b92581e6e87c6a4be069077 (diff) | |
download | edk2-5e5abfcab4c2962005be89c951a86f55db27555e.zip edk2-5e5abfcab4c2962005be89c951a86f55db27555e.tar.gz edk2-5e5abfcab4c2962005be89c951a86f55db27555e.tar.bz2 |
BaseTools: Robustness for multiple build environments
When building BaseTools, GNUmakefile builds create directory
BaseTools/Source/C/libs/. On the other hand, Makefile builds use libs
as an nmake pseudo target, so it either must NOT exist as a file or
directory, OR it must phony dependency like .PHONY. The latter
solution conflicts with NmakeSubdirs.py. Therefore, I make it go away
in the cleanall target. I could also add it to the clean target, but
it strikes me that cleanall should be more forceful.
Signed-off-by: Burt Silverman <burtms@gmail.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r-- | BaseTools/Source/C/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Makefile b/BaseTools/Source/C/Makefile index 217fc2b..e8f8abe 100644 --- a/BaseTools/Source/C/Makefile +++ b/BaseTools/Source/C/Makefile @@ -63,6 +63,8 @@ clean: cleanall:
@if defined PYTHON_COMMAND $(PYTHON_COMMAND) Makefiles\NmakeSubdirs.py cleanall $(LIBRARIES) $(APPLICATIONS)
@if not defined PYTHON_COMMAND $(PYTHON_HOME)\python.exe Makefiles\NmakeSubdirs.py cleanall $(LIBRARIES) $(APPLICATIONS)
+# Next line protects the libs pseudo target from inadvertent GNU make activity
+ if exist libs RMDIR /S /Q libs
!INCLUDE Makefiles\ms.rule
|