Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2658dd7

Browse files
committed
Add workaround for VS 2010 nmake clean issue. VS 2010 doesn't set up PATH for nmake.exe correctly.
1 parent fb099c9 commit 2658dd7

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ Tests
6868
Build
6969
-----
7070

71+
- Add workaround for VS 2010 nmake clean issue. VS 2010 doesn't set up PATH
72+
for nmake.exe correctly.
73+
7174

7275
What's New in Python 3.3.3?
7376
===========================

PC/python3.mak

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ $(OutDir)python33stub.lib: python33stub.def
55
lib /def:python33stub.def /out:$(OutDir)python33stub.lib /MACHINE:$(MACHINE)
66

77
clean:
8-
del $(OutDir)python3.dll $(OutDir)python3.lib $(OutDir)python33stub.lib $(OutDir)python3.exp $(OutDir)python33stub.exp
8+
IF EXIST $(OutDir)python3.dll del $(OutDir)python3.dll
9+
IF EXIST $(OutDir)python3.lib del $(OutDir)python3.lib
10+
IF EXIST $(OutDir)python33stub.lib del $(OutDir)python33stub.lib
11+
IF EXIST $(OutDir)python3.exp del $(OutDir)python3.exp
12+
IF EXIST $(OutDir)python33stub.exp del $(OutDir)python33stub.exp
913

1014
rebuild: clean $(OutDir)python3.dll

PCbuild/python3dll.vcxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)</NMakeBuildCommandLine>
9999
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd $(ProjectDir)\..\PC
100100
nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
101101
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd $(ProjectDir)\..\PC
102-
nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
102+
"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
103103
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)python3.dll</NMakeOutput>
104104
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
105105
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -111,7 +111,7 @@ nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)</NMakeBuildCommandLine>
111111
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd $(ProjectDir)\..\PC
112112
nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
113113
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd $(ProjectDir)\..\PC
114-
nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
114+
"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
115115
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)python3.dll</NMakeOutput>
116116
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
117117
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -123,7 +123,7 @@ nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)</NMakeBuildCommandLine>
123123
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">cd $(ProjectDir)\..\PC
124124
nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
125125
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">cd $(ProjectDir)\..\PC
126-
nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
126+
"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
127127
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(OutDir)python3.dll</NMakeOutput>
128128
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
129129
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -135,7 +135,7 @@ nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)</NMakeBuildCommandLine>
135135
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">cd $(ProjectDir)\..\PC
136136
nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
137137
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">cd $(ProjectDir)\..\PC
138-
nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
138+
"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
139139
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(OutDir)python3.dll</NMakeOutput>
140140
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
141141
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -147,7 +147,7 @@ nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)</NMakeBuildCommandLine>
147147
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">cd $(ProjectDir)\..\PC
148148
nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
149149
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">cd $(ProjectDir)\..\PC
150-
nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
150+
"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
151151
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(OutDir)python3.dll</NMakeOutput>
152152
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
153153
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -159,7 +159,7 @@ nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)</NMakeBuildCommandLine>
159159
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">cd $(ProjectDir)\..\PC
160160
nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
161161
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">cd $(ProjectDir)\..\PC
162-
nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
162+
"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
163163
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(OutDir)python3.dll</NMakeOutput>
164164
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
165165
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>

0 commit comments

Comments
 (0)