summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winbuild/Makefile.vc7
-rw-r--r--winbuild/MakefileBuild.vc9
2 files changed, 13 insertions, 3 deletions
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index d2498b7a4..44d9604ba 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -265,6 +265,10 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-msh3
!MESSAGE configuration name: $(CONFIG_NAME_LIB)
+# Note these directories are removed by this makefile's 'clean' so they should
+# not be changed to point to user-specified directories that may contain other
+# data. MakefileBuild.vc uses the same variable names but allows some user
+# changes and therefore does not remove the directories.
BUILD_DIR=../builds/$(CONFIG_NAME_LIB)
LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
@@ -300,4 +304,7 @@ copy_from_lib:
FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\
clean:
+ @if exist $(LIBCURL_DIROBJ) rd /s /q $(LIBCURL_DIROBJ)
+ @if exist $(CURL_DIROBJ) rd /s /q $(CURL_DIROBJ)
+ @if exist $(DIRDIST) rd /s /q $(DIRDIST)
$(MAKE) /NOLOGO /F MakefileBuild.vc $@
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
index 10a93b054..5cf65dcd7 100644
--- a/winbuild/MakefileBuild.vc
+++ b/winbuild/MakefileBuild.vc
@@ -692,6 +692,12 @@ $(CURL_DIROBJ)\curl.res: $(CURL_SRC_DIR)\curl.rc
!ENDIF # End of case where a config was provided.
+# Makefile.vc's clean removes (LIB)CURL_DIROBJ and DIRDIST dirs then calls
+# this clean. Note those are the original directories we control and not the
+# directories possibly modified by this makefile to point to user-specified
+# directories.
+# For example, don't remove DIRDIST here since it may contain user files if it
+# has been changed by WITH_PREFIX to a different output dir (eg C:\usr\local).
clean:
@-erase /s *.dll 2> NUL
@-erase /s *.exp 2> NUL
@@ -701,6 +707,3 @@ clean:
@-erase /s *.pch 2> NUL
@-erase /s *.pdb 2> NUL
@-erase /s *.res 2> NUL
- @if exist $(LIB_DIROBJ) rd /s/q $(LIB_DIROBJ)
- @if exist $(CURL_DIROBJ)rd /s/q $(CURL_DIROBJ)
- @if exist $(DIRDIST) rd /s/q $(DIRDIST)