From f56e7574d9f5f6cd2cf604a9b292e3f5c0fe9628 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 24 Mar 2016 11:36:39 +0100 Subject: [PATCH] When locally installed prebuild MSM is found, the build process clones it automatically now. --- Makefile | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dc9f3b6..2963017 100644 --- a/Makefile +++ b/Makefile @@ -81,9 +81,14 @@ MSIBUILD_PLAT=Intel !ELSE MSIBUILD_PLAT=$(PLAT) !ENDIF +!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" +MSIBUILD_MSM_MS_REPO=$(PROGRAMW6432) (x86)\Common Files\Merge Modules +!ELSE +MSIBUILD_MSM_MS_REPO=$(COMMONPROGRAMFILES)\Merge Modules +!ENDIF ###################################################################### -# Target stubs +# Target Stubs ###################################################################### All :: @@ -151,6 +156,9 @@ $(MSIBUILD_MODULES) :: $(MAKE) /f "Makefile" /$(MAKEFLAGS) MSIBUILD_HAS_VERSION=1 cd "$(MAKEDIR)" +$(MSIBUILD_MODULES_PRECOMPILED) :: + if exist "$(MSIBUILD_MSM_MS_REPO)\$(@F:"=)" $(MAKE) /f "Makefile" /$(MAKEFLAGS) MSIBUILD_PHASE=90 MSIBUILD_MSM_SRC="$(MSIBUILD_MSM_MS_REPO)\$(@F:"=)" MSIBUILD_MSM_DST=$@ All + !ELSEIF $(MSIBUILD_PHASE) == 2 ###################################################################### @@ -221,10 +229,21 @@ All :: \ attrib.exe +r "$(@:"=).tmp" move /y "$(@:"=).tmp" $@ > NUL +!ELSEIF $(MSIBUILD_PHASE) == 90 + +###################################################################### +# MSM Copy from Repository Phase +###################################################################### + +All :: "$(MSIBUILD_MSM_DST)" + +"$(MSIBUILD_MSM_DST)" : "$(MSIBUILD_MSM_SRC)" + copy /y $** $@ > NUL + !ELSE ###################################################################### -# Cleanup phase +# Cleanup Phase # - Cleaning modules ######################################################################