This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PCbuild vcproj project files need a cleanup
Type: Stage:
Components: Build Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: loewis, moese, nnorwitz
Priority: normal Keywords: patch

Created on 2005-09-29 10:08 by moese, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
PCbuild-Clean.diff moese, 2005-10-03 21:32
Messages (5)
msg48798 - (view) Author: Moese (moese) Date: 2005-09-29 10:08
The Visual Studio .NET vcproj files were probably
generated by importing the older Visual C++ 6.0 dsp
files and saving them back into the new format. The
convertor is not perfect. The bigest problem it has
it's the handling of the configuration macro defines.
Instead of defining the used macros once for each
configuration, it defines them for each individual
file. This causes file bloat and could cause problems
when new files are added to the project since we could
get builds with mixed defines due to the $(NoInherit)
flag which makes the compiler ignore global defines.

For example, the current pythoncore.vcproj file has 100
KB. A cleaned up version is less than 25 KB.

NOW:
<File
	RelativePath="..\Parser\acceler.c">
	<FileConfiguration
		Name="Release|Win32">
		<Tool
			Name="VCCLCompilerTool"
			Optimization="2"
			AdditionalIncludeDirectories=""
		
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;USE_DL_EXPORT;$(NoInherit)"/>
	</FileConfiguration>
	<FileConfiguration
		Name="Debug|Win32">
		<Tool
			Name="VCCLCompilerTool"
			Optimization="0"
			AdditionalIncludeDirectories=""
		
PreprocessorDefinitions="_DEBUG;USE_DL_EXPORT;WIN32;_WINDOWS;$(NoInherit)"/>
	</FileConfiguration>
	<FileConfiguration
		Name="ReleaseItanium|Win32">
		<Tool
			Name="VCCLCompilerTool"
			Optimization="2"
			AdditionalIncludeDirectories=""
		
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;USE_DL_EXPORT;$(NoInherit)"/>
	</FileConfiguration>
</File>

CLEANED-UP:
<File
	RelativePath="..\Parser\acceler.c">
</File>

There are a couple of files which require custom options:

..\Modules\getbuildinfo.c - 					
PreprocessorDefinitions="BUILD=67"

..\PC\import_nt.c - 					
AdditionalIncludeDirectories="..\Python"
msg48799 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-03 19:56
Logged In: YES 
user_id=33168

Can you provide a patch (attach to this bug report if
possible) for what the new file should look like?
msg48800 - (view) Author: Moese (moese) Date: 2005-10-03 21:32
Logged In: YES 
user_id=1067739

Attached patch with cleaned up .vcproj files.

VCCLCompilerTool: removed PrecompiledHeaderFile,
AssemblerListingLocation, ObjectFile,
ProgramDataBaseFileName entires. They are defined by default
to the same values.

VCMIDLTool: removed all entries.

VCResourceCompilerTool: removed all entries for all but a
couple of projects which actually have resource files.

Removed FileConfiguration entries for all project files
which don't need it.

There's still stuff which could be cleaned up, I've only
removed the biggest offenders.
msg48801 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-04 03:47
Logged In: YES 
user_id=33168

Thanks.  I'm moving this to patches.
msg48802 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-01-03 07:40
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as r41897.

If you have further simplifications that you would like to
see implemented, please submit another patch.
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42429
2005-09-29 10:08:45moesecreate