]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/regex/build/vc_gen.sh
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / regex / build / vc_gen.sh
CommitLineData
7c673cae
FG
1#! /bin/bash
2
3# copyright John Maddock 2003
4# Distributed under the Boost Software License, Version 1.0.
5# (See accompanying file LICENSE_1_0.txt or copy at
6# http://www.boost.org/LICENSE_1_0.txt.
7
8libname=""
9src=""
10header=""
11all_dep=""
12
13# current makefile:
14out=""
15# temporary file:
16tout=""
17# install target temp file:
18iout=""
19# debug flag:
20debug="no"
21# compile options:
22opts=""
23# main output sub-directory:
24subdir=""
25stlport_suffix=""
26# extra debug /RTc options:
27debug_extra=""
28
29function vc6_gen_lib()
30{
31 all_dep="$all_dep $libname""_dir ./$subdir$stlport_suffix/$libname.lib"
32 echo " copy $subdir$stlport_suffix\\$libname.lib "'"$'"(MSVCDIR)\\lib"'"' >> $iout
33 if test $debug == "yes"; then
34 echo " copy $subdir$stlport_suffix\\$libname.pdb "'"$'"(MSVCDIR)\\lib"'"' >> $iout
35 fi
36#
37# set up section comments:
38 cat >> $tout << EOF
39########################################################
40#
41# section for $libname.lib
42#
43########################################################
44EOF
45#
46# process source files:
47 all_obj=""
48 for file in $src
49 do
50 obj=`echo "$file" | sed 's/.*src\/\(.*\)cpp/\1obj/g'`
51 obj="$subdir$stlport_suffix/$libname/$obj"
52 all_obj="$all_obj $obj"
53 echo "$obj: $file \$(ALL_HEADER)" >> $tout
54 echo " cl \$(INCLUDES) $opts \$(CXXFLAGS) \$(ICU_COMPILE_OPTS) -Y- -Fo./$subdir$stlport_suffix/$libname/ -Fd$subdir$stlport_suffix/$libname.pdb $file" >> $tout
55 echo "" >> $tout
56 done
57#
58# now for the directories for this library:
59 echo "$libname"_dir : >> $tout
60 echo " @if not exist \"$subdir$stlport_suffix\\$libname\\\$(NULL)\" mkdir $subdir$stlport_suffix\\$libname" >> $tout
61 echo "" >> $tout
62#
63# now for the clean options for this library:
64 all_clean="$all_clean $libname""_clean"
65 echo "$libname"_clean : >> $tout
66 echo " del $subdir$stlport_suffix\\$libname\\"'*.obj' >> $tout
67 echo " del $subdir$stlport_suffix\\$libname\\"'*.idb' >> $tout
68 echo " del $subdir$stlport_suffix\\$libname\\"'*.exp' >> $tout
69 echo " del $subdir$stlport_suffix\\$libname\\"'*.pch' >> $tout
70 echo "" >> $tout
71#
72# now for the main target for this library:
73 echo ./$subdir$stlport_suffix/$libname.lib : $all_obj >> $tout
74 echo " link -lib /nologo /out:$subdir$stlport_suffix/$libname.lib \$(XSFLAGS) $all_obj" >> $tout
75 echo "" >> $tout
76}
77
78function vc6_gen_dll()
79{
80 all_dep="$all_dep $libname""_dir ./$subdir$stlport_suffix/$libname.lib"
81 echo " copy $subdir$stlport_suffix\\$libname.lib "'"$'"(MSVCDIR)\\lib"'"' >> $iout
82 echo " copy $subdir$stlport_suffix\\$libname.dll "'"$'"(MSVCDIR)\\bin"'"' >> $iout
83 if test $debug == "yes"; then
84 echo " copy $subdir$stlport_suffix\\$libname.pdb "'"$'"(MSVCDIR)\\lib"'"' >> $iout
85 fi
86#
87# set up section comments:
88 cat >> $tout << EOF
89########################################################
90#
91# section for $libname.lib
92#
93########################################################
94EOF
95#
96# process source files:
97 all_obj=""
98 for file in $src
99 do
100 obj=`echo "$file" | sed 's/.*src\/\(.*\)cpp/\1obj/g'`
101 obj="$subdir$stlport_suffix/$libname/$obj"
102 all_obj="$all_obj $obj"
103 echo "$obj: $file \$(ALL_HEADER)" >> $tout
104 echo " cl \$(INCLUDES) $opts \$(CXXFLAGS) \$(ICU_COMPILE_OPTS) -Y- -Fo./$subdir$stlport_suffix/$libname/ -Fd$subdir$stlport_suffix/$libname.pdb $file" >> $tout
105 echo "" >> $tout
106 done
107#
108# now for the directories for this library:
109 echo "$libname"_dir : >> $tout
110 echo " @if not exist \"$subdir$stlport_suffix\\$libname\\\$(NULL)\" mkdir $subdir$stlport_suffix\\$libname" >> $tout
111 echo "" >> $tout
112#
113# now for the clean options for this library:
114 all_clean="$all_clean $libname""_clean"
115 echo "$libname"_clean : >> $tout
116 echo " del $subdir$stlport_suffix\\$libname\\"'*.obj' >> $tout
117 echo " del $subdir$stlport_suffix\\$libname\\"'*.idb' >> $tout
118 echo " del $subdir$stlport_suffix\\$libname\\"'*.exp' >> $tout
119 echo " del $subdir$stlport_suffix\\$libname\\"'*.pch' >> $tout
120 echo "" >> $tout
121#
122# now for the main target for this library:
123 echo ./$subdir$stlport_suffix/$libname.lib : $all_obj >> $tout
124 echo " link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /incremental:yes /pdb:\"$subdir$stlport_suffix/$libname.pdb\" /debug /machine:I386 /out:\"$subdir$stlport_suffix/$libname.dll\" /implib:\"$subdir$stlport_suffix/$libname.lib\" /LIBPATH:\"\$(STLPORT_PATH)\\lib\" \$(XLFLAGS) \$(ICU_LINK_OPTS) $all_obj" >> $tout
125 echo "" >> $tout
126}
127
128is_stlport="no"
129build_static="yes"
130
131function vc6_gen()
132{
133 debug="no"
134 tout="temp"
135 iout="temp_install"
136 all_dep="main_dir"
137 all_clean=""
138 echo > $out
139 echo > $tout
140 rm -f $iout
141 stlport_suffix=""
142
143 if test ${build_static} == "yes" ; then
144 libname="libboost_regex-${subdir}-s-${boost_version}"
145 opts='/c /nologo /ML /W3 '$EH_OPTS' /O2 '$PROC_OPTS' /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /FD '"$release_extra"' '
146 vc6_gen_lib
147 fi
148
149 libname="libboost_regex-${subdir}-mt-s-${boost_version}"
150 opts='/nologo /MT /W3 '$EH_OPTS' /O2 '$PROC_OPTS' /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /FD '"$release_extra"' /c'
151 vc6_gen_lib
152
153 if test ${build_static} == "yes" ; then
154 debug="yes"
155 libname="libboost_regex-${subdir}-sgd-${boost_version}"
156 opts='/nologo /MLd /W3 /Gm '$EH_OPTS' /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /FD '"$debug_extra"' /c '
157 vc6_gen_lib
158 fi
159
160 libname="libboost_regex-${subdir}-mt-sgd-${boost_version}"
161 opts='/nologo /MTd /W3 /Gm '$EH_OPTS' /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /FD '"$debug_extra"' /c'
162 vc6_gen_lib
163
164 libname="boost_regex-${subdir}-mt-gd-${boost_version}"
165 opts='/nologo /MDd /W3 /Gm '$EH_OPTS' /Zi /Od /I../../../ /D_DEBUG /DBOOST_REGEX_DYN_LINK /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD '"$debug_extra"' /c'
166 vc6_gen_dll
167
168 debug="no"
169 opts='/nologo /MD /W3 '$EH_OPTS' /O2 '$PROC_OPTS' /GF /Gy /I../../../ /DBOOST_REGEX_DYN_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /FD '"$release_extra"' /c'
170 libname="boost_regex-${subdir}-mt-${boost_version}"
171 vc6_gen_dll
172
173 debug="no"
174 opts='/nologo /MD /W3 '$EH_OPTS' /O2 '$PROC_OPTS' /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /FD '"$release_extra"' /c'
175 libname="libboost_regex-${subdir}-mt-${boost_version}"
176 vc6_gen_lib
177
178 debug="yes"
179 libname="libboost_regex-${subdir}-mt-gd-${boost_version}"
180 opts='/nologo /MDd /W3 /Gm '$EH_OPTS' /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD '"$debug_extra"' /c'
181 vc6_gen_lib
182
183 VC8_CHECK=""
184 echo ${subdir}
185 if test ${subdir} = "vc80" ; then
186 VC8_CHECK='MSVCDIR=$(VS80COMNTOOLS)..\..\VC'
187 echo setting VC8 setup to: ${VC8_CHECK}
188 else
189 if test ${subdir} = "vc71" ; then
190 VC8_CHECK='MSVCDIR=$(VS71COMNTOOLS)..\..\VC7'
191 echo setting VC71 setup to: ${VC8_CHECK}
192 fi
193 if test ${subdir} = "vc90" ; then
194 VC8_CHECK='MSVCDIR=$(VS90COMNTOOLS)..\..\VC'
195 echo setting VC9 setup to: ${VC8_CHECK}
196 fi
197 if test ${subdir} = "vc100" ; then
198 VC8_CHECK='MSVCDIR=$(VS100COMNTOOLS)..\..\VC'
199 echo setting VC10 setup to: ${VC8_CHECK}
200 fi
201 fi
202
203 cat > $out << EOF
204# copyright John Maddock 2006
205# Distributed under the Boost Software License, Version 1.0.
206# (See accompanying file LICENSE_1_0.txt or copy at
207# http://www.boost.org/LICENSE_1_0.txt.
208#
209# auto generated makefile for MSVC compiler
210#
211# usage:
212# make
213# brings libraries up to date
214# make install
215# brings libraries up to date and copies binaries to your VC6 /lib and /bin directories (recomended)
216#
217
218#
219# path to ICU library installation goes here:
220#
221ICU_PATH=
222#
223# Add additional compiler options here:
224#
225CXXFLAGS=
226#
227# Add additional include directories here:
228#
229INCLUDES=
230#
231# add additional linker flags here:
232#
233XLFLAGS=
234#
235# add additional static-library creation flags here:
236#
237XSFLAGS=
238
239!IF "\$(OS)" == "Windows_NT"
240NULL=
241!ELSE
242NULL=nul
243!ENDIF
244
245!IF "\$(MSVCDIR)" == ""
246$VC8_CHECK
247!ENDIF
248
249!IF "\$(MSVCDIR)" == ""
250!ERROR Variable MSVCDIR not set.
251!ENDIF
252
253!IF "\$(ICU_PATH)" == ""
254ICU_COMPILE_OPTS=
255ICU_LINK_OPTS=
256!MESSAGE Building Boost.Regex without ICU / Unicode support:
257!MESSAGE Hint: set ICU_PATH on the nmake command line to point
258!MESSAGE to your ICU installation if you have one.
259!ELSE
260ICU_COMPILE_OPTS= -DBOOST_HAS_ICU=1 -I"\$(ICU_PATH)\\include"
261ICU_LINK_OPTS= /LIBPATH:"\$(ICU_PATH)\\lib" icuin.lib icuuc.lib
262!MESSAGE Building Boost.Regex with ICU in \$(ICU_PATH)
263!ENDIF
264
265EOF
266 echo "" >> $out
267 echo "ALL_HEADER=$header" >> $out
268 echo "" >> $out
269 echo "all : $all_dep" >> $out
270 echo >> $out
271 echo "clean : $all_clean" >> $out
272 echo >> $out
273 echo "install : all" >> $out
274 cat $iout >> $out
275 echo >> $out
276 echo main_dir : >> $out
277 echo " @if not exist \"$subdir$stlport_suffix\\\$(NULL)\" mkdir $subdir$stlport_suffix" >> $out
278 echo "" >> $out
279
280 cat $tout >> $out
281}
282
283function vc6_stlp_gen()
284{
285 debug="no"
286 tout="temp"
287 iout="temp_install"
288 all_dep="main_dir"
289 all_clean=""
290 echo > $out
291 echo > $tout
292 rm -f $iout
293 stlport_suffix="-stlport"
294
295 libname="libboost_regex-${subdir}-mt-sp-${boost_version}"
296 opts='/nologo /MT /W3 '$EH_OPTS' /O2 '$PROC_OPTS' /GF /Gy /I"$(STLPORT_PATH)\stlport" /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB '"$release_extra"' /c'
297 vc6_gen_lib
298
299 debug="true"
300 libname="libboost_regex-${subdir}-mt-sgdp-${boost_version}"
301 opts='/nologo /MTd /W3 /Gm '$EH_OPTS' /Zi /Od /I"$(STLPORT_PATH)\stlport" /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB '"$debug_extra"' /c'
302 #vc6_gen_lib
303
304 libname="boost_regex-${subdir}-mt-gdp-${boost_version}"
305 opts='/nologo /MDd /W3 /Gm '$EH_OPTS' /Zi /Od /I"$(STLPORT_PATH)\stlport" /I../../../ /DBOOST_REGEX_DYN_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL '"$debug_extra"' /c'
306 #vc6_gen_dll
307
308 debug="no"
309 opts='/nologo /MD /W3 '$EH_OPTS' /O2 '$PROC_OPTS' /GF /I"$(STLPORT_PATH)\stlport" /Gy /I../../../ /DBOOST_REGEX_DYN_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL '"$release_extra"' /c'
310 libname="boost_regex-${subdir}-mt-p-${boost_version}"
311 vc6_gen_dll
312
313 debug="no"
314 opts='/nologo /MD /W3 '$EH_OPTS' /O2 '$PROC_OPTS' /GF /Gy /I"$(STLPORT_PATH)\stlport" /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL '"$release_extra"' /c'
315 libname="libboost_regex-${subdir}-mt-p-${boost_version}"
316 vc6_gen_lib
317
318 debug="true"
319 libname="libboost_regex-${subdir}-mt-gdp-${boost_version}"
320 opts='/nologo /MDd /W3 /Gm '$EH_OPTS' /Zi /Od /I"$(STLPORT_PATH)\stlport" /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL '"$debug_extra"' /c'
321 #vc6_gen_lib
322
323# debug STLPort mode:
324 debug="yes"
325 opts='/nologo /MDd /W3 /Gm '$EH_OPTS' /Zi /Od /I"$(STLPORT_PATH)\stlport" /I../../../ /DBOOST_REGEX_DYN_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL '"$debug_extra"' /c'
326 libname="boost_regex-${subdir}-mt-gdp-${boost_version}"
327 vc6_gen_dll
328 libname="libboost_regex-${subdir}-mt-sgdp-${boost_version}"
329 opts='/nologo /MTd /W3 /Gm '$EH_OPTS' /Zi /Od /I"$(STLPORT_PATH)\stlport" /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB '"$debug_extra"' /c'
330 vc6_gen_lib
331 opts='/nologo /MDd /W3 /Gm '$EH_OPTS' /Zi /Od /I"$(STLPORT_PATH)\stlport" /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL '"$debug_extra"' /c'
332 libname="libboost_regex-${subdir}-mt-gdp-${boost_version}"
333 vc6_gen_lib
334
335 cat > $out << EOF
336# copyright John Maddock 2006
337# Distributed under the Boost Software License, Version 1.0.
338# (See accompanying file LICENSE_1_0.txt or copy at
339# http://www.boost.org/LICENSE_1_0.txt.
340#
341# auto generated makefile for VC6+STLPort
342#
343# usage:
344# make
345# brings libraries up to date
346# make install
347# brings libraries up to date and copies binaries to your VC6 /lib and /bin directories (recomended)
348#
349
350#
351# ICU setup:
352#
353ICU_PATH=
354#
355# Add additional compiler options here:
356#
357CXXFLAGS=
358#
359# Add additional include directories here:
360#
361INCLUDES=
362#
363# add additional linker flags here:
364#
365XLFLAGS=
366#
367# add additional static-library creation flags here:
368#
369XSFLAGS=
370
371!IF "\$(OS)" == "Windows_NT"
372NULL=
373!ELSE
374NULL=nul
375!ENDIF
376
377!IF "\$(MSVCDIR)" == ""
378!ERROR Variable MSVCDIR not set.
379!ENDIF
380
381!IF "\$(STLPORT_PATH)" == ""
382!ERROR Variable STLPORT_PATH not set.
383!ENDIF
384
385!IF "\$(ICU_PATH)" == ""
386ICU_COMPILE_OPTS=
387ICU_LINK_OPTS=
388!MESSAGE Building Boost.Regex without ICU / Unicode support:
389!MESSAGE Hint: set ICU_PATH on the nmake command line to point
390!MESSAGE to your ICU installation if you have one.
391!ELSE
392ICU_COMPILE_OPTS= -DBOOST_HAS_ICU=1 -I"\$(ICU_PATH)\\include"
393ICU_LINK_OPTS= /LIBPATH:"\$(ICU_PATH)\\lib" icuin.lib icuuc.lib
394!MESSAGE Building Boost.Regex with ICU in \$(ICU_PATH)
395!ENDIF
396
397EOF
398 echo "" >> $out
399 echo "ALL_HEADER=$header" >> $out
400 echo "" >> $out
401 echo "all : $all_dep" >> $out
402 echo >> $out
403 echo "clean : $all_clean" >> $out
404 echo >> $out
405 echo "install : stlport_check all" >> $out
406 cat $iout >> $out
407 echo >> $out
408 echo main_dir : >> $out
409 echo " @if not exist \"$subdir$stlport_suffix\\\$(NULL)\" mkdir $subdir$stlport_suffix" >> $out
410 echo "" >> $out
411 echo 'stlport_check : "$(STLPORT_PATH)\stlport\string"' >> $out
412 echo " echo" >> $out
413 echo "" >> $out
414
415 cat $tout >> $out
416}
417
418
419. common.sh
420
421#
422# options that change with compiler version:
423#
424EH_OPTS="/GX"
425PROC_OPTS="/GB"
426
427#
428# generate vc6 makefile:
429debug_extra="$EH_OPTS"
430out="vc6.mak"
431subdir="vc6"
432vc6_gen
433#
434# generate vc6-stlport makefile:
435is_stlport="yes"
436out="vc6-stlport.mak"
437no_single="yes"
438subdir="vc6"
439vc6_stlp_gen
440#
441# generate vc7 makefile:
442debug_extra="$EH_OPTS /RTC1 /Zc:wchar_t"
443release_extra="/Zc:wchar_t"
444is_stlport="no"
445out="vc7.mak"
446no_single="no"
447subdir="vc7"
448vc6_gen
449#
450# generate vc7-stlport makefile:
451is_stlport="yes"
452out="vc7-stlport.mak"
453no_single="yes"
454subdir="vc7"
455vc6_stlp_gen
456#
457# generate vc71 makefile:
458is_stlport="no"
459out="vc71.mak"
460no_single="no"
461subdir="vc71"
462vc6_gen
463#
464# generate vc71-stlport makefile:
465is_stlport="yes"
466out="vc71-stlport.mak"
467no_single="yes"
468subdir="vc71"
469vc6_stlp_gen
470#
471# generate vc8 makefile:
472EH_OPTS="/EHsc"
473PROC_OPTS=""
474debug_extra="$EH_OPTS"
475is_stlport="no"
476out="vc8.mak"
477no_single="no"
478subdir="vc80"
479vc6_gen
480#
481# generate vc9 makefile:
482build_static="no"
483EH_OPTS="/EHsc"
484PROC_OPTS=""
485debug_extra="$EH_OPTS"
486is_stlport="no"
487out="vc9.mak"
488no_single="no"
489subdir="vc90"
490vc6_gen
491#
492# generate vc10 makefile:
493build_static="no"
494EH_OPTS="/EHsc"
495PROC_OPTS=""
496debug_extra="$EH_OPTS"
497is_stlport="no"
498out="vc10.mak"
499no_single="no"
500subdir="vc100"
501vc6_gen
502
503
504#
505# remove tmep files;
506rm -f $tout $iout
507
508
509