1 | package CMT |
---|
2 | |
---|
3 | author arnault@lal.in2p3.fr |
---|
4 | |
---|
5 | tag CMTr15 CMTr14 |
---|
6 | tag CMTr16 CMTr14 |
---|
7 | tag CMTr18 CMTr16 |
---|
8 | tag CMTr0 CMTr18 |
---|
9 | |
---|
10 | # |
---|
11 | # Automatic detection of some system features. |
---|
12 | # |
---|
13 | |
---|
14 | |
---|
15 | # Getting info on the hardware |
---|
16 | macro cmt_hardware_query_command "uname -m" \ |
---|
17 | Darwin "uname -p" \ |
---|
18 | SunOS "uname -p" \ |
---|
19 | HP-UX "uname -m | sed -e 's#/##g'" |
---|
20 | |
---|
21 | macro cmt_hardware `$(cmt_hardware_query_command)` WIN32 "WIN32" |
---|
22 | |
---|
23 | apply_tag $(cmt_hardware) |
---|
24 | |
---|
25 | |
---|
26 | # Getting info about the OS |
---|
27 | macro cmt_system_version_query_command "uname -r " \ |
---|
28 | Linux "${CMTROOT}/mgr/cmt_linux_version.sh" \ |
---|
29 | SunOS "uname -r | sed -e 's#^#sunos#'" \ |
---|
30 | OSF1 "uname -r | sed -e 's#^#OSF#'" \ |
---|
31 | Darwin "${CMTROOT}/mgr/cmt_mac_version.sh" \ |
---|
32 | HP-UX "uname -r | sed -e 's#^#hpux#'" \ |
---|
33 | CYGWIN "uname -r | sed -e 's#[(].*##' -e 's#^#Cygwin#'" \ |
---|
34 | LynxOS "uname -r | sed -e 's#^#LynxOS#'" |
---|
35 | |
---|
36 | macro_append cmt_system_version_query_command " | ${CMTROOT}/mgr/cmt_filter_version.sh" \ |
---|
37 | WIN32 "" |
---|
38 | |
---|
39 | macro cmt_system_version `$(cmt_system_version_query_command)` WIN32 "XP" |
---|
40 | |
---|
41 | apply_tag $(cmt_system_version) |
---|
42 | |
---|
43 | |
---|
44 | # Getting info about the C++ compiler |
---|
45 | macro cmt_compiler_version_query_command "${CMTROOT}/mgr/cmt_gcc_version.sh | grep '^gcc'" \ |
---|
46 | Linux "${CMTROOT}/mgr/cmt_gcc_version.sh" \ |
---|
47 | SunOS "${CMTROOT}/mgr/cmt_CC_version.sh" \ |
---|
48 | OSF1 "${CMTROOT}/mgr/cmt_cxx_version.sh" \ |
---|
49 | Darwin "${CMTROOT}/mgr/cmt_dcc_version.sh" \ |
---|
50 | HP-UX "echo aCC" \ |
---|
51 | LynxOS "${CMTROOT}/mgr/cmt_gcc_version.sh" |
---|
52 | |
---|
53 | macro_append cmt_compiler_version_query_command " | ${CMTROOT}/mgr/cmt_filter3_version.sh" \ |
---|
54 | rhel3 " | ${CMTROOT}/mgr/cmt_filter3_version.sh" \ |
---|
55 | cel3 " | ${CMTROOT}/mgr/cmt_filter3_version.sh" \ |
---|
56 | WIN32 "" |
---|
57 | |
---|
58 | macro cmt_compiler_version `$(cmt_compiler_version_query_command)` WIN32 "cl" |
---|
59 | |
---|
60 | apply_tag $(cmt_compiler_version) |
---|
61 | |
---|
62 | tag OSF1 Unix |
---|
63 | tag Linux Unix |
---|
64 | tag HP-UX Unix |
---|
65 | tag Darwin Unix |
---|
66 | tag LynxOS Unix |
---|
67 | tag AIX Unix |
---|
68 | tag SunOS Unix |
---|
69 | |
---|
70 | tag CYGWIN_NT-5.1 Unix CYGWIN |
---|
71 | |
---|
72 | tag alpha OSF1 |
---|
73 | tag alpha_dux40 alpha |
---|
74 | tag alpha-debug alpha debug |
---|
75 | |
---|
76 | tag LynxOS-VGPW2 LynxOS |
---|
77 | tag LynxOS-PowerPC LynxOS |
---|
78 | tag RIO806X LynxOS |
---|
79 | tag VMTR2X LynxOS |
---|
80 | |
---|
81 | tag hp9000s780 HP-UX |
---|
82 | tag hp9000s700 HP-UX |
---|
83 | tag hp700_ux101 HP-UX |
---|
84 | tag hp_ux102 HP-UX |
---|
85 | |
---|
86 | tag Linux-i686 Linux |
---|
87 | tag i386_redhat51 Linux |
---|
88 | tag i386_linux22 Linux |
---|
89 | |
---|
90 | tag rs_aix42 AIX |
---|
91 | |
---|
92 | tag sun4u SunOS |
---|
93 | tag sun4x_57 SunOS |
---|
94 | |
---|
95 | tag rhel3 Linux |
---|
96 | tag cel3 Linux |
---|
97 | tag slc3 Linux |
---|
98 | |
---|
99 | # Alternate possible tags for VisualC |
---|
100 | tag VisualC WIN32 |
---|
101 | tag VisualC Win32 |
---|
102 | tag WIN32 VisualC |
---|
103 | |
---|
104 | # Some alternate definitions for debug on VisualC |
---|
105 | tag VisualCdbg WIN32 windebug |
---|
106 | tag VisualD WIN32 windebug |
---|
107 | tag VisualDbg WIN32 windebug |
---|
108 | tag VisualDebug WIN32 windebug |
---|
109 | tag VisualD VisualC windebug |
---|
110 | tag VisualDbg VisualC windebug |
---|
111 | tag Win32Debug VisualC windebug |
---|
112 | |
---|
113 | # VSNET tags # |
---|
114 | tag VC7 vsnet |
---|
115 | tag VC7debug vsnet windebug |
---|
116 | |
---|
117 | tag_exclude WIN32 Unix |
---|
118 | tag_exclude Win32 Unix |
---|
119 | |
---|
120 | # |
---|
121 | # Global PATH variables management |
---|
122 | # |
---|
123 | |
---|
124 | path_remove PATH "CMT/v" \ |
---|
125 | WIN32 "CMT\v" |
---|
126 | |
---|
127 | path_prepend PATH "${CMTROOT}/${CMTBIN}" \ |
---|
128 | WIN32 "%CMTROOT%\%CMTBIN%" |
---|
129 | |
---|
130 | path_remove CLASSPATH "CMT" |
---|
131 | path_append CLASSPATH "${CMTROOT}/java" \ |
---|
132 | WIN32 "%CMTROOT%\java" |
---|
133 | |
---|
134 | path_append include "" |
---|
135 | path_append lib "" |
---|
136 | |
---|
137 | macro debug_option "-g" \ |
---|
138 | SunOS "-G" \ |
---|
139 | WIN32 "/G" |
---|
140 | |
---|
141 | # |
---|
142 | # C environment |
---|
143 | # |
---|
144 | |
---|
145 | macro cc "gcc" \ |
---|
146 | insure "insure" \ |
---|
147 | alpha "cc" \ |
---|
148 | alphat "cc" \ |
---|
149 | HP-UX "aCC" \ |
---|
150 | hp700_ux101 "gcc" \ |
---|
151 | AIX "xlc" \ |
---|
152 | SunOS "cc" \ |
---|
153 | VisualC "cl.exe" \ |
---|
154 | Darwin "cc" |
---|
155 | |
---|
156 | macro cdebugflags "" \ |
---|
157 | debug "$(debug_option)" |
---|
158 | |
---|
159 | macro cflags "" \ |
---|
160 | LynxOS-VGPW2 "-X" \ |
---|
161 | insure "-std1" \ |
---|
162 | HP-UX "+Z" \ |
---|
163 | hp700_ux101 "-fpic -ansi" \ |
---|
164 | alpha "-std1" \ |
---|
165 | alphat "-std1" \ |
---|
166 | SunOS "-KPIC" \ |
---|
167 | VisualC '/nologo /DWIN32 /MD /W3 $(includes) /c' |
---|
168 | |
---|
169 | macro pp_cflags "" \ |
---|
170 | LynxOS-VGPW2 "-DVGPW2" \ |
---|
171 | HP-UX "-D_HPUX_SOURCE" \ |
---|
172 | alphat "-DCTHREADS" \ |
---|
173 | AIX "-D_ALL_SOURCE -D_BSD" |
---|
174 | |
---|
175 | macro ccomp "$(cc) -c $(includes) $(cdebugflags) $(cflags) $(pp_cflags)" \ |
---|
176 | VisualC "cl.exe $(cdebugflags) $(cflags) $(pp_cflags)" |
---|
177 | |
---|
178 | macro clinkflags "" |
---|
179 | |
---|
180 | macro clink "$(cc) $(clinkflags) $(cdebugflags)" \ |
---|
181 | VisualC "link.exe /nologo /machine:IX86 " |
---|
182 | |
---|
183 | macro cdepflags "" \ |
---|
184 | c_native_dependencies&Linux "-MM" \ |
---|
185 | c_native_dependencies&Darwin "-MM" \ |
---|
186 | c_native_dependencies&VisualC "/showIncludes /E" |
---|
187 | |
---|
188 | # |
---|
189 | # Developper Studio environment |
---|
190 | # |
---|
191 | |
---|
192 | macro msdevdll "" \ |
---|
193 | VisualC "/dll" |
---|
194 | |
---|
195 | macro msdevdllflags "" \ |
---|
196 | VisualC '/MT /D "_USRDLL" /D "WDLL_EXPORTS"' \ |
---|
197 | VisualD '/MTd /D "_USRDLL" /D "WDLL_EXPORTS"' |
---|
198 | |
---|
199 | macro vsCONFIG "" \ |
---|
200 | VC7 "Release" \ |
---|
201 | VC7debug "Debug" |
---|
202 | |
---|
203 | macro vsOptimize "" \ |
---|
204 | VC7 "2" \ |
---|
205 | VC7debug "0" |
---|
206 | |
---|
207 | macro devenv_command "" \ |
---|
208 | VS&WIN32 "devenv /?" |
---|
209 | |
---|
210 | # |
---|
211 | # C++ environment |
---|
212 | # |
---|
213 | |
---|
214 | macro ppcmd "-I" \ |
---|
215 | rs_aix41 "-WF,-I" \ |
---|
216 | VisualC "/I " |
---|
217 | |
---|
218 | macro preproc "g++ -MD -c " \ |
---|
219 | insure "insure" \ |
---|
220 | alpha "cxx" \ |
---|
221 | OSF1 "g++" \ |
---|
222 | HP-UX "aCC" \ |
---|
223 | hp700_ux101 "g++" \ |
---|
224 | hp_ux102 "aCC" \ |
---|
225 | AIX "xlC" \ |
---|
226 | Linux "c++ -MD -c " \ |
---|
227 | SunOS "CC" \ |
---|
228 | VisualC "cl.exe" \ |
---|
229 | Darwin "c++" |
---|
230 | |
---|
231 | macro cpp "g++" \ |
---|
232 | insure "insure" \ |
---|
233 | alpha "cxx" \ |
---|
234 | OSF1 "g++" \ |
---|
235 | HP-UX "aCC" \ |
---|
236 | hp700_ux101 "g++" \ |
---|
237 | hp_ux102 "aCC" \ |
---|
238 | AIX "xlC" \ |
---|
239 | Linux "c++" \ |
---|
240 | SunOS "CC" \ |
---|
241 | VisualC "cl.exe" \ |
---|
242 | Darwin "c++" |
---|
243 | |
---|
244 | macro cppdebugflags "" \ |
---|
245 | debug "$(debug_option)" |
---|
246 | |
---|
247 | macro cppflags "" \ |
---|
248 | alpha "-nocompress -std arm -msg_quiet" \ |
---|
249 | OSF1 "-fpic" \ |
---|
250 | hp9000s780 "+Z" \ |
---|
251 | hp700_ux101 "-fpic" \ |
---|
252 | HP-UX "+Z -Wc,-ansi_for_scope,on" \ |
---|
253 | hp_ux102 "-z +p -Wc,-ansi_for_scope,on +O2 +Onoinitcheck" \ |
---|
254 | Linux "-pipe -ansi -pedantic -W -Wall -Wwrite-strings -Wpointer-arith -Woverloaded-virtual " \ |
---|
255 | SunOS "-KPIC" \ |
---|
256 | VisualC '/nologo /DWIN32 /MD /W3 $(includes) /c /EHsc' |
---|
257 | |
---|
258 | macro pp_cppflags "" \ |
---|
259 | HP-UX "-D_HPUX_SOURCE" \ |
---|
260 | Linux "-D_GNU_SOURCE" |
---|
261 | |
---|
262 | macro cppcomp "$(cpp) -c $(includes) $(cppdebugflags) $(cppflags) $(pp_cppflags)" \ |
---|
263 | VisualC "cl.exe $(cppdebugflags) $(cppflags) $(pp_cppflags)" |
---|
264 | |
---|
265 | macro cpplinkflags "" |
---|
266 | |
---|
267 | macro cpplink "$(cpp) $(cpplinkflags) $(cppdebugflags)" \ |
---|
268 | VisualC "link.exe /nologo /machine:I386" |
---|
269 | |
---|
270 | macro cpp_linkopts "" \ |
---|
271 | OSF1 " -lstdc++ " \ |
---|
272 | alpha " /usr/lib/cmplrs/cxx/libcxx.a -lcxxstd -lexc -lm " \ |
---|
273 | alphat " /usr/lib/cmplrs/cxx/libcxx.a -lcxxstd -lexc -lm " |
---|
274 | |
---|
275 | macro cppdepflags "" \ |
---|
276 | cpp_native_dependencies&Linux "-MM" \ |
---|
277 | cpp_native_dependencies&Darwin "-MM" \ |
---|
278 | cpp_native_dependencies&VisualC "/showIncludes /E" |
---|
279 | |
---|
280 | # |
---|
281 | # Fortran environment |
---|
282 | # |
---|
283 | |
---|
284 | macro for "f77" \ |
---|
285 | HP-UX "fort77" \ |
---|
286 | rs_aix41 "xlf" \ |
---|
287 | Linux "g77" |
---|
288 | |
---|
289 | macro fflags "$(debug_option)" \ |
---|
290 | VisualC "" |
---|
291 | |
---|
292 | macro fcomp "$(for) -c $(fincludes) $(fflags) $(pp_fflags)" \ |
---|
293 | VisualC "" |
---|
294 | |
---|
295 | macro flink "$(for) $(flinkflags)" |
---|
296 | |
---|
297 | # |
---|
298 | # Java environment |
---|
299 | # |
---|
300 | |
---|
301 | macro javacomp "javac -classpath $(src):$(CLASSPATH) " |
---|
302 | macro javacopy "cp" VisualC "copy" |
---|
303 | macro jar "jar" |
---|
304 | |
---|
305 | # |
---|
306 | # X11 environment |
---|
307 | # |
---|
308 | |
---|
309 | macro X11_cflags "-I/usr/include" \ |
---|
310 | HP-UX "-I/usr/include/X11R5" \ |
---|
311 | SunOS "-I/usr/motif/usr/include" \ |
---|
312 | VisualC "" |
---|
313 | |
---|
314 | macro Xm_cflags "-I/usr/include" \ |
---|
315 | HP-UX "-I/usr/include/Motif1.2" \ |
---|
316 | SunOS "-I/usr/motif/usr/include" \ |
---|
317 | VisualC "" |
---|
318 | |
---|
319 | #### hp9000s700 "/usr/lib/Motif1.2/libXm.sl /usr/lib/X11R5/libXt.sl /usr/lib/X11R5/libX11.sl" |
---|
320 | |
---|
321 | macro X_linkopts ""\ |
---|
322 | alpha "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
323 | OSF1 "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
324 | insure "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
325 | HP-UX "-L/usr/lib -lXm -L/usr/contrib/X11R6/lib -lXmu -lXt -lXext -lX11" \ |
---|
326 | SunOS "-L/usr/motif/usr/lib -lXm -lXt -lX11 -lm"\ |
---|
327 | LynxOS "-lXt -lX11 -lm"\ |
---|
328 | Linux "-L/usr/X11R6/lib -lXm -lXt -lXext -lX11 -lm"\ |
---|
329 | RIO806X "-lXm -lXt -lXext -lX11 -lm"\ |
---|
330 | VGPW2 "-lXm -lXt -lXext -lX11 -lm"\ |
---|
331 | m68k "-lXm -lXt -lXext -lX11 -lm"\ |
---|
332 | IRIX "/usr/lib/libXm.so /usr/lib/libXt.so /usr/lib/libX11.so -lm -lPW"\ |
---|
333 | AIX "/usr/lib/libXm.a /usr/lib/libXt.a /usr/lib/libX11.a -lm" \ |
---|
334 | VisualC "" |
---|
335 | |
---|
336 | # |
---|
337 | # Lex environment |
---|
338 | # |
---|
339 | |
---|
340 | macro lexflags "" |
---|
341 | macro lex "lex $(lexflags)" \ |
---|
342 | i686 "flex $(lexflags)" |
---|
343 | |
---|
344 | # |
---|
345 | # Yacc environment |
---|
346 | # |
---|
347 | |
---|
348 | macro yaccflags " -l -d " \ |
---|
349 | VisualC "" |
---|
350 | |
---|
351 | macro yacc "yacc $(yaccflags)" |
---|
352 | |
---|
353 | # |
---|
354 | # Archive environment |
---|
355 | # |
---|
356 | |
---|
357 | macro ar "ar -clr" \ |
---|
358 | SunOS "ar clr" \ |
---|
359 | VGPW2 "ar clr" \ |
---|
360 | m68k "ar clr" \ |
---|
361 | LynxOS "ar clr" \ |
---|
362 | RIO806X "ar clr" \ |
---|
363 | Linux "ar cr" \ |
---|
364 | Darwin "libtool -static -o" \ |
---|
365 | VisualC "lib.exe /nologo " |
---|
366 | |
---|
367 | macro ranlib "ranlib" \ |
---|
368 | SunOS "ar ts" \ |
---|
369 | VGPW2 "ar ts" \ |
---|
370 | m68k "ranlib" \ |
---|
371 | RIO806X "ranlib" \ |
---|
372 | LynxOS "ar ts" \ |
---|
373 | IRIX "ar ts" \ |
---|
374 | Darwin ":" |
---|
375 | |
---|
376 | macro make_shlib "echo" \ |
---|
377 | HP-UX "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
378 | OSF1 "${CMTROOT}/mgr/cmt_make_shlib_common.sh noextract" \ |
---|
379 | Linux "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
380 | CYGWIN "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
381 | SunOS "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
382 | Darwin "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
383 | VisualC "%CMTROOT%\mgr\cmt_make_shlib.bat" |
---|
384 | |
---|
385 | macro shlibsuffix "" \ |
---|
386 | HP-UX "sl" \ |
---|
387 | OSF1 "so" \ |
---|
388 | SunOS "so" \ |
---|
389 | Linux "so" \ |
---|
390 | CYGWIN "dll" \ |
---|
391 | Darwin "dylib" \ |
---|
392 | WIN32 "dll" |
---|
393 | |
---|
394 | macro shlibbuilder "" \ |
---|
395 | HP-UX "aCC" \ |
---|
396 | OSF1 "ld" \ |
---|
397 | SunOS "CC" \ |
---|
398 | Linux "g++" \ |
---|
399 | CYGWIN "g++" \ |
---|
400 | Darwin "c++" |
---|
401 | |
---|
402 | macro shlibflags "" \ |
---|
403 | HP-UX "-Wl,-a,shared -b +Z -q -Wl,+s -Wl,+vallcompatwarnings" \ |
---|
404 | OSF1 "-shared -expect_unresolved '*'" \ |
---|
405 | Linux "-shared" \ |
---|
406 | CYGWIN "-shared" \ |
---|
407 | SunOS "$(debug_option)" \ |
---|
408 | VisualC "" \ |
---|
409 | Darwin "-dynamiclib -flat_namespace -undefined suppress " |
---|
410 | |
---|
411 | macro symlink "/bin/ln -fs " \ |
---|
412 | VisualC "" |
---|
413 | |
---|
414 | macro symunlink "/bin/rm -f " \ |
---|
415 | VisualC "" |
---|
416 | |
---|
417 | macro library_install_command "${symlink}" \ |
---|
418 | VisualC "copy " |
---|
419 | |
---|
420 | macro build_library_links "$(cmtexe) build library_links -tag=$(tags)" |
---|
421 | macro remove_library_links "$(cmtexe) remove library_links -tag=$(tags)" |
---|
422 | |
---|
423 | # |
---|
424 | # Prototype and dependency generation |
---|
425 | # |
---|
426 | |
---|
427 | macro cmtexe "${CMTROOT}/${CMTBIN}/cmt.exe" \ |
---|
428 | WIN32 "%CMTROOT%\%CMTBIN%\cmt.exe" |
---|
429 | |
---|
430 | ##macro tags "$(CMTEXTRATAGS)" |
---|
431 | |
---|
432 | macro build_prototype "$(cmtexe) build prototype" |
---|
433 | macro build_dependencies "$(cmtexe) -tag=$(tags) build dependencies" |
---|
434 | macro build_triggers "$(cmtexe) build triggers" |
---|
435 | |
---|
436 | macro format_dependencies "" \ |
---|
437 | Linux "${CMTROOT}/mgr/cmt_format_deps.sh" \ |
---|
438 | Darwin "${CMTROOT}/mgr/cmt_format_deps.sh" \ |
---|
439 | VisualC "%CMTROOT%\mgr\cmt_format_deps.bat" |
---|
440 | |
---|
441 | macro implied_library_prefix "-l" \ |
---|
442 | LynxOS "$(<PACKAGE>ROOT)/$(bin)/lib" |
---|
443 | |
---|
444 | macro implied_library_suffix "" \ |
---|
445 | VisualC ".lib" \ |
---|
446 | LynxOS ".a" |
---|
447 | |
---|
448 | # |
---|
449 | # Generic environments |
---|
450 | # |
---|
451 | |
---|
452 | macro SHELL "/bin/sh" WIN32 "cmd" |
---|
453 | |
---|
454 | macro q '"' |
---|
455 | macro src "../src/" WIN32 "..\src\" |
---|
456 | macro doc "../doc/" WIN32 "..\doc\" |
---|
457 | macro inc "../src/" WIN32 "..\src\" |
---|
458 | macro mgr "../mgr/" WIN32 "..\mgr\" |
---|
459 | ##macro javabin "../classes/" |
---|
460 | |
---|
461 | macro application_suffix ".exe" |
---|
462 | macro library_prefix "lib" WIN32 "" CYGWIN "" |
---|
463 | macro library_suffix "" |
---|
464 | |
---|
465 | macro lock_command "" \ |
---|
466 | cmt_parallel_bins&Linux "lockfile " \ |
---|
467 | cmt_parallel_bins&Darwin "lockfile " \ |
---|
468 | cmt_parallel_bins&VisualC "%CMTROOT%\mgr\cmt_lockfile.bat " |
---|
469 | |
---|
470 | macro unlock_command "rm -rf " \ |
---|
471 | VisualC "rmdir " |
---|
472 | |
---|
473 | macro lock_name "cmt" |
---|
474 | macro lock_suffix ".lock" |
---|
475 | macro lock_file "${lock_name}${lock_suffix}" |
---|
476 | |
---|
477 | |
---|
478 | macro svn_checkout_command "" \ |
---|
479 | Linux "python ${CMTROOT}/mgr/cmt_svn_checkout.py " \ |
---|
480 | Darwin "python ${CMTROOT}/mgr/cmt_svn_checkout.py " \ |
---|
481 | VisualC "python %CMTROOT%\mgr\cmt_svn_checkout.py " |
---|
482 | |
---|
483 | macro preprocessor_command "" \ |
---|
484 | VisualC "" |
---|
485 | |
---|
486 | #macro_append MAKEFLAGS " --no-print-directory " |
---|
487 | |
---|
488 | #macro_prepend constituents " configclean " |
---|
489 | |
---|
490 | # |
---|
491 | # Remote definitions |
---|
492 | # |
---|
493 | |
---|
494 | macro gmake_hosts "lx1 rsplus lxtest as7 dxplus ax7 hp2 aleph hp1 hpplus papou1-fe atlas" |
---|
495 | |
---|
496 | macro make_hosts "virgo-control1 rio0a vmpc38a" |
---|
497 | |
---|
498 | macro everywhere "hosts" \ |
---|
499 | LAL "as7 lx1 virgo-control1 papou1-fe hp2 aleph hp1" \ |
---|
500 | LHCb "lxtest hpplus dxplus rsplus" \ |
---|
501 | Atlas "lxplus sundev" \ |
---|
502 | Cascina "ax7 vmpc38a rio0a" |
---|
503 | |
---|
504 | |
---|
505 | # |
---|
506 | # Fragments |
---|
507 | # |
---|
508 | |
---|
509 | make_fragment make_header |
---|
510 | make_fragment library_header |
---|
511 | make_fragment application_header |
---|
512 | make_fragment document_header |
---|
513 | make_fragment java_header |
---|
514 | make_fragment jar_header |
---|
515 | make_fragment protos_header |
---|
516 | make_fragment buildproto |
---|
517 | make_fragment library |
---|
518 | make_fragment library_no_share |
---|
519 | make_fragment library_no_static |
---|
520 | make_fragment application |
---|
521 | make_fragment jar |
---|
522 | make_fragment java |
---|
523 | make_fragment java_copy |
---|
524 | make_fragment cleanup_header |
---|
525 | make_fragment cleanup |
---|
526 | make_fragment cleanup_library |
---|
527 | make_fragment cleanup_application |
---|
528 | make_fragment cleanup_java |
---|
529 | make_fragment cleanup_objects |
---|
530 | |
---|
531 | make_fragment fortran |
---|
532 | make_fragment c |
---|
533 | make_fragment cpp |
---|
534 | make_fragment lex |
---|
535 | make_fragment yacc |
---|
536 | |
---|
537 | make_fragment fortran_library |
---|
538 | make_fragment c_library |
---|
539 | make_fragment cpp_library |
---|
540 | make_fragment lex_library |
---|
541 | make_fragment yacc_library |
---|
542 | |
---|
543 | make_fragment dsw_header |
---|
544 | make_fragment dsw_project |
---|
545 | make_fragment dsw_trailer |
---|
546 | make_fragment dsw_all_project_header |
---|
547 | make_fragment dsw_all_project_dependency |
---|
548 | make_fragment dsw_all_project_trailer |
---|
549 | |
---|
550 | make_fragment dsp_library_header |
---|
551 | make_fragment dsp_shared_library_header |
---|
552 | make_fragment dsp_application_header |
---|
553 | make_fragment dsp_windows_header |
---|
554 | make_fragment dsp_contents |
---|
555 | make_fragment dsp_trailer |
---|
556 | make_fragment dsp_all |
---|
557 | |
---|
558 | # vsnet fragments |
---|
559 | make_fragment vcproj_library_header |
---|
560 | make_fragment vcproj_application_header |
---|
561 | make_fragment vcproj_all |
---|
562 | make_fragment vcproj_trailer |
---|
563 | make_fragment vcproj_contents |
---|
564 | make_fragment vcproj_directory_header |
---|
565 | make_fragment vcproj_directory_trailer |
---|
566 | |
---|
567 | make_fragment sln_header |
---|
568 | make_fragment sln_project |
---|
569 | make_fragment sln_trailer |
---|
570 | make_fragment sln_project_config |
---|
571 | make_fragment sln_dependency_project |
---|
572 | |
---|
573 | make_fragment sln_dependency_header |
---|
574 | make_fragment sln_dependency_trailer |
---|
575 | |
---|
576 | #### all packages have same GUID, and the "all" project as well |
---|
577 | |
---|
578 | macro GUID_all "" vsnet {DD1EDB1B-B098-44F8-8012-3039B5A56FEF} |
---|
579 | macro package_GUID "" vsnet {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942} |
---|
580 | |
---|
581 | make_fragment make_setup |
---|
582 | make_fragment make_setup_header |
---|
583 | |
---|
584 | make_fragment constituents_header |
---|
585 | make_fragment group |
---|
586 | make_fragment constituent |
---|
587 | make_fragment constituent_lock |
---|
588 | make_fragment constituents_trailer |
---|
589 | |
---|
590 | make_fragment packages_header |
---|
591 | make_fragment package |
---|
592 | make_fragment packages_trailer |
---|
593 | |
---|
594 | make_fragment dependencies |
---|
595 | make_fragment dependencies_and_triggers |
---|
596 | make_fragment dependency |
---|
597 | |
---|
598 | make_fragment readme_header |
---|
599 | make_fragment readme |
---|
600 | #make_fragment readme_doc |
---|
601 | make_fragment readme_use |
---|
602 | make_fragment readme_trailer |
---|
603 | |
---|
604 | make_fragment tex -header=tex_header -suffix=ps |
---|
605 | |
---|
606 | make_fragment check_application |
---|
607 | make_fragment check_java |
---|
608 | make_fragment check_application_header |
---|
609 | |
---|
610 | make_fragment application_launcher -header=application_launcher_header |
---|
611 | |
---|
612 | make_fragment install_includes -header=install_includes_header |
---|
613 | |
---|
614 | macro install_command "cp " \ |
---|
615 | WIN32 "xcopy /S /E /Y " |
---|
616 | |
---|
617 | macro uninstall_command "/bin/rm -f " \ |
---|
618 | WIN32 "del " |
---|
619 | |
---|
620 | macro cmt_installarea_command "ln -fs " \ |
---|
621 | WIN32 "xcopy /S /E /Y " |
---|
622 | |
---|
623 | macro cmt_uninstallarea_command "/bin/rm -f " \ |
---|
624 | WIN32 "del " |
---|
625 | |
---|
626 | macro cmt_install_area_command "$(cmt_installarea_command)" |
---|
627 | macro cmt_uninstall_area_command "$(cmt_uninstallarea_command)" |
---|
628 | |
---|
629 | macro cmt_install_action "$(CMTROOT)/mgr/cmt_install_action.sh" \ |
---|
630 | WIN32 "$(CMTROOT)\mgr\cmt_install_action.bat" |
---|
631 | |
---|
632 | macro cmt_installdir_action "$(CMTROOT)/mgr/cmt_installdir_action.sh" \ |
---|
633 | WIN32 "$(CMTROOT)\mgr\cmt_installdir_action.bat" |
---|
634 | |
---|
635 | macro cmt_uninstall_action "$(CMTROOT)/mgr/cmt_uninstall_action.sh" \ |
---|
636 | WIN32 "$(CMTROOT)\mgr\cmt_uninstall_action.bat" |
---|
637 | |
---|
638 | macro cmt_uninstalldir_action "$(CMTROOT)/mgr/cmt_uninstalldir_action.sh" \ |
---|
639 | WIN32 "$(CMTROOT)\mgr\cmt_uninstalldir_action.bat" |
---|
640 | |
---|
641 | macro cmt_installdir_excludes "" WIN32 "$(CMTROOT)\mgr\cmt_installdir_excludes.txt" |
---|
642 | |
---|
643 | action make "gmake bin=$(bin) $(cmt_args)" Darwin "make bin=$(bin) $(cmt_args)" CYGWIN "make bin=$(bin) $(cmt_args)" WIN32 "nmake /f nmake $(cmt_args) bin=$(bin) " |
---|
644 | # with NMake (Version 7.10.3077), the first macro definition on the command line |
---|
645 | # takes precedence over the following (if any) |
---|
646 | |
---|
647 | macro mkdir "mkdir" \ |
---|
648 | LynxOS "mkdir -f" |
---|
649 | |
---|
650 | #----------------------------------------------------------------- |
---|
651 | # Generic copy facility |
---|
652 | # It is customized through the parameter: |
---|
653 | # install_dir="<path where to install the sources>" |
---|
654 | # |
---|
655 | make_fragment installer -header=installer_header |
---|
656 | |
---|
657 | |
---|
658 | #----------------------------------------------------------------- |
---|
659 | # Generic usage of the cmt expand model facility |
---|
660 | # the fragment is customized through the following parameters: |
---|
661 | # model="<model text string>" |
---|
662 | # out="<output file name>" |
---|
663 | # |
---|
664 | make_fragment generator -header=generator_header |
---|
665 | |
---|
666 | #----------------------------------------------------------------- |
---|
667 | # Generic action runner |
---|
668 | # |
---|
669 | make_fragment cmt_action_runner -header=cmt_action_runner_header |
---|
670 | |
---|
671 | # |
---|
672 | # The supported languages |
---|
673 | # |
---|
674 | |
---|
675 | language fortran -suffix=f -suffix=F -preprocessor_command=$(ppcmd) -linker=$(flink) |
---|
676 | language c -suffix=c -prototypes -linker=$(clink) -dependencies_options=$(cdepflags) |
---|
677 | language c++ -suffix=C -suffix=cc -suffix=cxx -suffix=cpp -fragment=cpp -linker=$(cpplink) -dependencies_options=$(cppdepflags) |
---|
678 | language java -suffix=java -linker=java |
---|
679 | language yacc -suffix=y -prototypes -linker=$(clink) |
---|
680 | language lex -suffix=l -prototypes -linker=$(clink) |
---|
681 | |
---|
682 | # |
---|
683 | # Protocol level for the CVS pluggin |
---|
684 | # |
---|
685 | |
---|
686 | macro cmt_cvs_protocol_level "v1r1" |
---|
687 | |
---|
688 | # |
---|
689 | # The CMTPATH patterns for installation areas |
---|
690 | # |
---|
691 | |
---|
692 | macro cmt_installarea_prefix "InstallArea" |
---|
693 | |
---|
694 | cmtpath_pattern \ |
---|
695 | macro cmt_installarea_paths " $(cmt_installarea_prefix)/$(CMTCONFIG)/bin" ; \ |
---|
696 | macro_prepend use_linkopts " $(cmt_installarea_linkopts) " ; \ |
---|
697 | macro_append shlibbuilder " $(cmt_installarea_linkopts) " |
---|
698 | |
---|
699 | cmtpath_pattern \ |
---|
700 | macro_append cmt_installarea_paths "" <project>_with_installarea " $(<project>_installarea_prefix)/$(CMTCONFIG)/lib" ; \ |
---|
701 | macro_append cmt_installarea_paths "" <project>_with_installarea " $(<project>_installarea_prefix)/share/lib" ; \ |
---|
702 | macro_append cmt_installarea_paths "" <project>_with_installarea " $(<project>_installarea_prefix)/share/bin" |
---|
703 | |
---|
704 | macro CMT_PATH_remove_regexp "/[^/]*/" WIN32 "\\[^\\]*\\" |
---|
705 | macro CMT_PATH_remove_share_regexp "/share/" WIN32 "\\share\\" |
---|
706 | |
---|
707 | cmtpath_pattern \ |
---|
708 | macro <project>_installarea_prefix "$(cmt_installarea_prefix)" ; \ |
---|
709 | macro <project>_installarea_prefix_remove "$(<project>_installarea_prefix)" ; \ |
---|
710 | path_remove_regexp PATH "" <project>_with_installarea "$(<project>_installarea_prefix_remove)$(CMT_PATH_remove_regexp)bin$" ; \ |
---|
711 | path_remove_regexp PATH "" <project>_with_installarea "$(<project>_installarea_prefix_remove)$(CMT_PATH_remove_regexp)lib$" ; \ |
---|
712 | path_remove_regexp LD_LIBRARY_PATH "" <project>_with_installarea "$(<project>_installarea_prefix_remove)/[^/]*/lib$" ; \ |
---|
713 | path_remove_regexp CLASSPATH "" <project>_with_installarea "$(<project>_installarea_prefix_remove)$(CMT_PATH_remove_share_regexp)lib$" ; \ |
---|
714 | path_remove_regexp CLASSPATH "" <project>_with_installarea "$(<project>_installarea_prefix_remove)$(CMT_PATH_remove_share_regexp)bin$" |
---|
715 | |
---|
716 | cmtpath_pattern \ |
---|
717 | path_prepend PATH "" \ |
---|
718 | <project>_with_installarea&WIN32 "<path>/$(<project>_installarea_prefix)/${CMTCONFIG}/bin" \ |
---|
719 | <project>_with_installarea&Unix "<path>/$(<project>_installarea_prefix)/${CMTCONFIG}/bin" ; \ |
---|
720 | path_prepend PATH "" \ |
---|
721 | <project>_with_installarea&WIN32 "<path>/$(<project>_installarea_prefix)/${CMTCONFIG}/lib" \ |
---|
722 | <project>_with_installarea&CYGWIN "<path>/$(<project>_installarea_prefix)/${CMTCONFIG}/lib" ; \ |
---|
723 | path_prepend LD_LIBRARY_PATH "" \ |
---|
724 | <project>_with_installarea&Unix "<path>/$(<project>_installarea_prefix)/${CMTCONFIG}/lib" ; \ |
---|
725 | macro_prepend cmt_installarea_linkopts "" \ |
---|
726 | <project>_without_installarea "" \ |
---|
727 | <project>_with_installarea&Unix " -L<path>/$(<project>_installarea_prefix)/$(CMTCONFIG)/lib " \ |
---|
728 | <project>_with_installarea&WIN32 " /LIBPATH:<path>\$(<project>_installarea_prefix)\$(CMTCONFIG)\lib " |
---|
729 | |
---|
730 | set NEWCMTCONFIG "${cmt_hardware}-${cmt_system_version}-${cmt_compiler_version}" |
---|
731 | |
---|
732 | # |
---|
733 | # The cmt constituent |
---|
734 | # |
---|
735 | |
---|
736 | application cmt -s=../source cmt.cxx \ |
---|
737 | cmt_awk.cxx \ |
---|
738 | cmt_branch.cxx \ |
---|
739 | cmt_constituent.cxx \ |
---|
740 | cmt_deps_builder.cxx \ |
---|
741 | cmt_fragment.cxx \ |
---|
742 | cmt_generator.cxx \ |
---|
743 | cmt_include.cxx \ |
---|
744 | cmt_parser.cxx \ |
---|
745 | cmt_script.cxx \ |
---|
746 | cmt_string.cxx \ |
---|
747 | cmt_system.cxx \ |
---|
748 | cmt_tag.cxx \ |
---|
749 | cmt_use.cxx \ |
---|
750 | cmt_symbol.cxx \ |
---|
751 | cmt_error.cxx \ |
---|
752 | cmt_pattern.cxx \ |
---|
753 | cmt_language.cxx \ |
---|
754 | cmt_vcs.cxx \ |
---|
755 | cmt_group.cxx \ |
---|
756 | cmt_database.cxx \ |
---|
757 | cmt_lock.cxx \ |
---|
758 | cmt_triggers.cxx \ |
---|
759 | cmt_regexp.cxx \ |
---|
760 | cmt_model.cxx \ |
---|
761 | cmt_project.cxx \ |
---|
762 | cmt_syntax.cxx \ |
---|
763 | cmt_install_area.cxx \ |
---|
764 | cmt_cmtpath_pattern.cxx \ |
---|
765 | cmt_sequence.cxx \ |
---|
766 | cmt_generators.cxx \ |
---|
767 | cmt_scope_section.cxx \ |
---|
768 | cmt_log.cxx \ |
---|
769 | cmt_commands.cxx |
---|
770 | |
---|
771 | private |
---|
772 | |
---|
773 | macro all_constituents cmt |
---|
774 | |
---|
775 | macro_append cpplink "" VisualC " advapi32.lib " |
---|