File: genvcprojs.sh

package info (click to toggle)
aspectc%2B%2B 1.0pre4~svn.20080711-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 104,504 kB
  • ctags: 363,975
  • sloc: cpp: 1,645,814; ansic: 16,601; sh: 2,175; makefile: 1,043
file content (230 lines) | stat: -rwxr-xr-x 5,886 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#!/bin/sh

# to be executed in the AspectC++/tests directory

find . -maxdepth 2 -mindepth 2 -type f -name "Makefile" |
while read testmakefile; do
  testdir=`dirname "$testmakefile"`
  testname=`basename "$testdir"`

  echo "Generating project file $testdir/$testname.vcproj"
  cd "$testdir"
  rm -f "$testname.vcproj"
  
  REALINST=`grep -q "real-instances" Makefile && echo ";AC_OPTIONS="--real-instances""`

  cat >> "$testname.vcproj" << EOF
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="7.00"
	Name="$testname"
	ProjectGUID="{37F3A735-0447-48C0-8FC5-832F01725A47}"
	Keyword="Win32Proj">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="Debug"
			IntermediateDirectory="Debug"
			ConfigurationType="1"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				PreprocessorDefinitions="_ASPECTC,WIN32;_DEBUG;_CONSOLE$REALINST"
				MinimalRebuild="TRUE"
				BasicRuntimeChecks="3"
				RuntimeLibrary="5"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="TRUE"
				DebugInformationFormat="4"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				OutputFile="\$(OutDir)/feature.exe"
				LinkIncremental="2"
				GenerateDebugInformation="TRUE"
				ProgramDatabaseFile="\$(OutDir)/feature.pdb"
				SubSystem="1"
				TargetMachine="1"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="Release"
			IntermediateDirectory="Release"
			ConfigurationType="1"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="2"
				InlineFunctionExpansion="1"
				OmitFramePointers="TRUE"
				PreprocessorDefinitions="_ASPECTC,WIN32;NDEBUG;_CONSOLE$REALINST"
				StringPooling="TRUE"
				RuntimeLibrary="4"
				EnableFunctionLevelLinking="TRUE"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="TRUE"
				DebugInformationFormat="3"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				OutputFile="\$(OutDir)/feature.exe"
				LinkIncremental="1"
				GenerateDebugInformation="TRUE"
				SubSystem="1"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				TargetMachine="1"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
		</Configuration>
	</Configurations>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm">
EOF

  find . -maxdepth 1 -type f -regex "\./.*\.\(c\|cc\|cxx\|cpp\)" -printf "%f\n" |
  while read transunit; do
    cat >> "$testname.vcproj" << EOF
			<File RelativePath="$transunit"></File>
EOF
  done

  cat >> "$testname.vcproj" << EOF
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc">
EOF

  find . -maxdepth 1 -type f -regex "\./.*\.\(h\|hxx\|hpp\)" -printf "%f\n" |
  while read include; do
    cat >> "$testname.vcproj" << EOF
			<File RelativePath="$include"></File>
EOF
  done

  cat >> "$testname.vcproj" << EOF
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
		</Filter>
		<Filter
			Name="Aspect Files"
			Filter="ah;acc">
			<Filter
				Name="Active Aspects"
				Filter="ah;acc">
EOF

  rm -f "${testname}_DummyAspect.ah"

  find . -maxdepth 1 -type f -regex "\./.*\.\(ah\|acc\)" -printf "%f\n" |
  while read aspect; do
    cat >> "$testname.vcproj" << EOF
				<File RelativePath="$aspect"></File>
EOF
  done
  
  if [ -z "`find . -maxdepth 1 -type f -regex "\./.*\.\(ah\|acc\)" -printf "%f\n"`" ]; then
    echo "  add dummy aspect"
    cat >> "$testname.vcproj" << EOF
				<File RelativePath="${testname}_DummyAspect.ah"></File>
EOF
    echo " " > "${testname}_DummyAspect.ah"
  fi

  cat >> "$testname.vcproj" << EOF
			</Filter>
			<Filter
				Name="Inactive Aspects"
				Filter="ah;acc">
			</Filter>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>
EOF
  
#  recode lat1..ibmpc -q "$testname.vcproj"
  cd ..
done

echo "Generating solution file WeaverTests.sln"
rm -f "WeaverTests.sln"

cat >> "WeaverTests.sln" << EOF
Microsoft Visual Studio Solution File, Format Version 7.00
EOF

find . -maxdepth 2 -mindepth 2 -type f -name "Makefile" |
while read testmakefile; do
  testdir=`dirname "$testmakefile"`
  testname=`basename "$testdir"`
  cat >> "WeaverTests.sln" << EOF
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "$testname", "$testname\\$testname.vcproj", "{37F3A735-0447-48C0-8FC5-832F01725A47}"
EndProject
EOF
done

cat >> "WeaverTests.sln" << EOF
Global
	GlobalSection(SolutionConfiguration) = preSolution
		ConfigName.0 = Debug
		ConfigName.1 = Release
	EndGlobalSection
	GlobalSection(ProjectDependencies) = postSolution
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{37F3A735-0447-48C0-8FC5-832F01725A47}.Debug.ActiveCfg = Debug|Win32
		{37F3A735-0447-48C0-8FC5-832F01725A47}.Debug.Build.0 = Debug|Win32
		{37F3A735-0447-48C0-8FC5-832F01725A47}.Release.ActiveCfg = Release|Win32
		{37F3A735-0447-48C0-8FC5-832F01725A47}.Release.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal
EOF

#recode lat1..ibmpc -q "WeaverTests.sln"