Windows: Use pushd and popd for recursive builds
authorAsanka Herath <asanka@secure-endpoints.com>
Wed, 14 Jul 2010 05:28:32 +0000 (01:28 -0400)
committerAsanka Herath <asanka@secure-endpoints.com>
Fri, 20 Aug 2010 17:14:17 +0000 (13:14 -0400)
This makes it possible to recurse into arbitrary directories instead
of just subdirectories.

windows/NTMakefile.w32

index 9d3f2a903d7cb11a213a567c59eb6ec8148998ac..f02d93467131610a600fce23a28b5bfc8f69a78d 100644 (file)
@@ -370,13 +370,13 @@ mkdirs:
 
 !ifdef SUBDIRS
 subdirs:
-       @for %%f in ( $(SUBDIRS) ) do @ (cd %%f && $(RMAKE) && cd ..) || exit /b 1
+       @for %%f in ( $(SUBDIRS) ) do @ (pushd %%f && $(RMAKE) && popd) || exit /b 1
 
 clean-subdirs:
-       @for %%f in ( $(SUBDIRS) ) do @ (cd %%f && $(RMAKE) clean && cd ..) || exit /b 1
+       @for %%f in ( $(SUBDIRS) ) do @ (pushd %%f && $(RMAKE) clean && popd) || exit /b 1
 
 test-subdirs:
-       @for %%f in ( $(SUBDIRS) ) do @ (cd %%f && $(RMAKE) test && cd ..) || exit /b 1
+       @for %%f in ( $(SUBDIRS) ) do @ (pushd %%f && $(RMAKE) test && popd) || exit /b 1
 
 all:: subdirs