1 | package CMT |
---|
2 | |
---|
3 | author arnault@lal.in2p3.fr |
---|
4 | |
---|
5 | tag alpha OSF1 |
---|
6 | tag alpha_dux40 alpha |
---|
7 | tag alpha-debug alpha debug |
---|
8 | |
---|
9 | tag LynxOS-VGPW2 LynxOS |
---|
10 | tag LynxOS-PowerPC LynxOS |
---|
11 | tag RIO806X LynxOS |
---|
12 | tag VMTR2X LynxOS |
---|
13 | |
---|
14 | tag hp9000s780 HP-UX |
---|
15 | tag hp9000s700 HP-UX |
---|
16 | tag hp700_ux101 HP-UX |
---|
17 | tag hp_ux102 HP-UX |
---|
18 | |
---|
19 | tag Linux-i686 Linux |
---|
20 | tag i386_redhat51 Linux |
---|
21 | tag i386_linux22 Linux |
---|
22 | |
---|
23 | tag rs_aix42 AIX |
---|
24 | |
---|
25 | tag sun4u SunOS |
---|
26 | tag sun4x_57 SunOS |
---|
27 | |
---|
28 | # Alternate possible tags for VisualC |
---|
29 | tag VisualC WIN32 |
---|
30 | tag VisualC Win32 |
---|
31 | tag WIN32 VisualC |
---|
32 | |
---|
33 | # Some alternate definitions for debug on VisualC |
---|
34 | tag VisualCdbg WIN32 windebug |
---|
35 | tag VisualD WIN32 windebug |
---|
36 | tag VisualDbg WIN32 windebug |
---|
37 | tag VisualDebug WIN32 windebug |
---|
38 | tag VisualD VisualC windebug |
---|
39 | tag VisualDbg VisualC windebug |
---|
40 | tag Win32Debug VisualC windebug |
---|
41 | |
---|
42 | |
---|
43 | path_remove PATH "CMT" |
---|
44 | path_prepend PATH "${CMTROOT}/${CMTBIN}" \ |
---|
45 | WIN32 "%CMTROOT%\%CMTBIN%" |
---|
46 | |
---|
47 | path_remove CLASSPATH "CMT" |
---|
48 | path_append CLASSPATH "${CMTROOT}/java" \ |
---|
49 | WIN32 "%CMTROOT%\java" |
---|
50 | |
---|
51 | path_append include "" |
---|
52 | path_append lib "" |
---|
53 | |
---|
54 | # |
---|
55 | # C environment |
---|
56 | # |
---|
57 | |
---|
58 | macro cc "gcc" \ |
---|
59 | insure "insure" \ |
---|
60 | alpha "cc" \ |
---|
61 | alphat "cc" \ |
---|
62 | HP-UX "aCC" \ |
---|
63 | hp700_ux101 "gcc" \ |
---|
64 | AIX "xlc" \ |
---|
65 | SunOS "cc" \ |
---|
66 | VisualC "cl.exe" |
---|
67 | |
---|
68 | macro cdebugflags "" \ |
---|
69 | debug "-g" |
---|
70 | |
---|
71 | macro cflags "" \ |
---|
72 | LynxOS-VGPW2 "-X" \ |
---|
73 | insure "-std1" \ |
---|
74 | HP-UX "+Z" \ |
---|
75 | hp700_ux101 "-fpic -ansi" \ |
---|
76 | alpha "-std1" \ |
---|
77 | alphat "-std1" \ |
---|
78 | SunOS "-KPIC" \ |
---|
79 | VisualC '/nologo /DWIN32 /MD /W3 $(includes) /c' |
---|
80 | |
---|
81 | macro pp_cflags "" \ |
---|
82 | LynxOS-VGPW2 "-DVGPW2" \ |
---|
83 | HP-UX "-D_HPUX_SOURCE" \ |
---|
84 | alphat "-DCTHREADS" \ |
---|
85 | AIX "-D_ALL_SOURCE -D_BSD" \ |
---|
86 | Linux "-Di586" |
---|
87 | |
---|
88 | macro ccomp "$(cc) -c -I$(inc) $(includes) $(cdebugflags) $(cflags) $(pp_cflags)" \ |
---|
89 | VisualC "cl.exe $(cdebugflags) $(cflags) $(pp_cflags)" |
---|
90 | |
---|
91 | macro clinkflags "" |
---|
92 | |
---|
93 | macro clink "$(cc) $(clinkflags)" \ |
---|
94 | VisualC "link.exe /nologo /machine:IX86 " |
---|
95 | |
---|
96 | |
---|
97 | # |
---|
98 | # Developper Studio environment |
---|
99 | # |
---|
100 | |
---|
101 | macro msdevdll "" \ |
---|
102 | VisualC "/dll" |
---|
103 | |
---|
104 | macro msdevdllflags "" \ |
---|
105 | VisualC '/MT /D "_USRDLL" /D "WDLL_EXPORTS"' \ |
---|
106 | VisualD '/MTd /D "_USRDLL" /D "WDLL_EXPORTS"' |
---|
107 | |
---|
108 | |
---|
109 | # |
---|
110 | # C++ environment |
---|
111 | # |
---|
112 | |
---|
113 | macro ppcmd "-I" \ |
---|
114 | rs_aix41 "-WF,-I" \ |
---|
115 | VisualC "/I " |
---|
116 | |
---|
117 | macro cpp "g++" \ |
---|
118 | insure "insure" \ |
---|
119 | alpha "cxx" \ |
---|
120 | OSF1 "g++" \ |
---|
121 | HP-UX "aCC" \ |
---|
122 | hp700_ux101 "g++" \ |
---|
123 | hp_ux102 "aCC" \ |
---|
124 | AIX "xlC" \ |
---|
125 | Linux "c++" \ |
---|
126 | SunOS "CC" \ |
---|
127 | VisualC "cl.exe" |
---|
128 | |
---|
129 | macro cppdebugflags "" \ |
---|
130 | debug "-g" |
---|
131 | |
---|
132 | macro cppflags "" \ |
---|
133 | alpha "-nocompress -std arm -msg_quiet" \ |
---|
134 | OSF1 "-fpic" \ |
---|
135 | hp9000s780 "+Z" \ |
---|
136 | hp700_ux101 "-fpic" \ |
---|
137 | HP-UX "+Z -Wc,-ansi_for_scope,on" \ |
---|
138 | hp_ux102 "-z +p -Wc,-ansi_for_scope,on +O2 +Onoinitcheck" \ |
---|
139 | Linux "-pipe -ansi -pedantic -W -Wall -Wwrite-strings -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -fnonnull-objects " \ |
---|
140 | SunOS "-KPIC" \ |
---|
141 | VisualC '/nologo /DWIN32 /MD /W3 $(includes) /c' |
---|
142 | |
---|
143 | macro pp_cppflags "" \ |
---|
144 | HP-UX "-D_HPUX_SOURCE" \ |
---|
145 | Linux "-D_GNU_SOURCE" |
---|
146 | |
---|
147 | macro cppcomp "$(cpp) -c $(includes) $(cppdebugflags) $(cppflags) $(pp_cppflags)" \ |
---|
148 | VisualC "cl.exe $(cppdebugflags) $(cppflags) $(pp_cppflags)" |
---|
149 | |
---|
150 | macro cpplinkflags "" |
---|
151 | |
---|
152 | macro cpplink "$(cpp) $(cpplinkflags)" \ |
---|
153 | VisualC "link.exe /nologo /machine:I386" |
---|
154 | |
---|
155 | macro cpp_linkopts "" \ |
---|
156 | OSF1 " -lstdc++ " \ |
---|
157 | alpha " /usr/lib/cmplrs/cxx/libcxx.a -lcxxstd -lexc -lm " \ |
---|
158 | alphat " /usr/lib/cmplrs/cxx/libcxx.a -lcxxstd -lexc -lm " |
---|
159 | |
---|
160 | # |
---|
161 | # Fortran environment |
---|
162 | # |
---|
163 | |
---|
164 | macro for "f77" \ |
---|
165 | HP-UX "fort77" \ |
---|
166 | rs_aix41 "xlf" \ |
---|
167 | Linux "g77" |
---|
168 | |
---|
169 | macro fflags "-g" \ |
---|
170 | VisualC "" |
---|
171 | |
---|
172 | macro fcomp "$(for) -c $(fincludes) $(fflags) $(pp_fflags)" \ |
---|
173 | VisualC "" |
---|
174 | |
---|
175 | macro flink "$(for) $(flinkflags)" |
---|
176 | |
---|
177 | # |
---|
178 | # Java environment |
---|
179 | # |
---|
180 | |
---|
181 | macro javacomp "javac" |
---|
182 | macro javacopy "cp" VisualC "copy" |
---|
183 | macro jar "jar" |
---|
184 | |
---|
185 | # |
---|
186 | # X11 environment |
---|
187 | # |
---|
188 | |
---|
189 | macro X11_cflags "-I/usr/include" \ |
---|
190 | HP-UX "-I/usr/include/X11R5" \ |
---|
191 | SunOS "-I/usr/motif/usr/include" \ |
---|
192 | VisualC "" |
---|
193 | |
---|
194 | macro Xm_cflags "-I/usr/include" \ |
---|
195 | HP-UX "-I/usr/include/Motif1.2" \ |
---|
196 | SunOS "-I/usr/motif/usr/include" \ |
---|
197 | VisualC "" |
---|
198 | |
---|
199 | #### hp9000s700 "/usr/lib/Motif1.2/libXm.sl /usr/lib/X11R5/libXt.sl /usr/lib/X11R5/libX11.sl" |
---|
200 | |
---|
201 | macro X_linkopts ""\ |
---|
202 | alpha "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
203 | OSF1 "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
204 | insure "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
205 | HP-UX "-L/usr/lib -lXm -L/usr/contrib/X11R6/lib -lXmu -lXt -lXext -lX11" \ |
---|
206 | SunOS "-L/usr/motif/usr/lib -lXm -lXt -lX11 -lm"\ |
---|
207 | LynxOS "-lXt -lX11 -lm"\ |
---|
208 | Linux "-L/usr/X11R6/lib -lXm -lXt -lXext -lX11 -lm"\ |
---|
209 | RIO806X "-lXm -lXt -lXext -lX11 -lm"\ |
---|
210 | VGPW2 "-lXm -lXt -lXext -lX11 -lm"\ |
---|
211 | m68k "-lXm -lXt -lXext -lX11 -lm"\ |
---|
212 | IRIX "/usr/lib/libXm.so /usr/lib/libXt.so /usr/lib/libX11.so -lm -lPW"\ |
---|
213 | AIX "/usr/lib/libXm.a /usr/lib/libXt.a /usr/lib/libX11.a -lm" \ |
---|
214 | VisualC "" |
---|
215 | |
---|
216 | # |
---|
217 | # Lex environment |
---|
218 | # |
---|
219 | |
---|
220 | macro lexflags "" |
---|
221 | macro lex "lex $(lexflags)" \ |
---|
222 | i686 "flex $(lexflags)" |
---|
223 | |
---|
224 | # |
---|
225 | # Yacc environment |
---|
226 | # |
---|
227 | |
---|
228 | macro yaccflags " -l -d " \ |
---|
229 | VisualC "" |
---|
230 | |
---|
231 | macro yacc "yacc $(yaccflags)" |
---|
232 | |
---|
233 | # |
---|
234 | # Archive environment |
---|
235 | # |
---|
236 | |
---|
237 | macro ar "ar -clr" \ |
---|
238 | SunOS "ar clr" \ |
---|
239 | VGPW2 "ar clr" \ |
---|
240 | m68k "ar clr" \ |
---|
241 | LynxOS "ar clr" \ |
---|
242 | RIO806X "ar clr" \ |
---|
243 | Linux "ar r" \ |
---|
244 | VisualC "lib.exe /nologo " |
---|
245 | |
---|
246 | macro ranlib "ranlib" \ |
---|
247 | SunOS "ar ts" \ |
---|
248 | VGPW2 "ar ts" \ |
---|
249 | m68k "ranlib" \ |
---|
250 | RIO806X "ranlib" \ |
---|
251 | LynxOS "ar ts" \ |
---|
252 | IRIX "ar ts" |
---|
253 | |
---|
254 | macro make_shlib "echo" \ |
---|
255 | HP-UX "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
256 | OSF1 "${CMTROOT}/mgr/cmt_make_shlib_common.sh noextract" \ |
---|
257 | Linux "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
258 | SunOS "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
259 | VisualC "%CMTROOT%\mgr\cmt_make_shlib.bat" |
---|
260 | |
---|
261 | macro shlibsuffix "" \ |
---|
262 | HP-UX "sl" \ |
---|
263 | OSF1 "so" \ |
---|
264 | SunOS "so" \ |
---|
265 | Linux "so" |
---|
266 | |
---|
267 | macro shlibbuilder "" \ |
---|
268 | HP-UX "aCC" \ |
---|
269 | OSF1 "ld" \ |
---|
270 | SunOS "CC" \ |
---|
271 | Linux "g++" |
---|
272 | |
---|
273 | macro shlibflags "" \ |
---|
274 | HP-UX "-Wl,-a,shared -b +Z -q -Wl,+s -Wl,+vallcompatwarnings" \ |
---|
275 | OSF1 "-shared -expect_unresolved '*'" \ |
---|
276 | Linux "-shared" \ |
---|
277 | SunOS "-G" \ |
---|
278 | VisualC "" |
---|
279 | |
---|
280 | macro symlink "/bin/ln -fs " \ |
---|
281 | VisualC "" |
---|
282 | |
---|
283 | macro symunlink "/bin/rm -f " \ |
---|
284 | VisualC "" |
---|
285 | |
---|
286 | macro build_library_links "$(cmtexe) build library_links -quiet -tag=$(tags)" |
---|
287 | macro remove_library_links "$(cmtexe) remove library_links -quiet -tag=$(tags)" |
---|
288 | |
---|
289 | # |
---|
290 | # Prototype and dependency generation |
---|
291 | # |
---|
292 | |
---|
293 | macro cmtexe "${CMTROOT}/${CMTBIN}/cmt.exe" \ |
---|
294 | WIN32 "%CMTROOT%\%CMTBIN%\cmt.exe" |
---|
295 | |
---|
296 | macro tags "${CMTEXTRATAGS}" |
---|
297 | |
---|
298 | macro build_prototype "$(cmtexe) build prototype" |
---|
299 | macro build_dependencies "$(cmtexe) -quiet -tag=$(tags) build dependencies" |
---|
300 | macro build_triggers "$(cmtexe) build triggers" |
---|
301 | |
---|
302 | macro implied_library_prefix "-l" \ |
---|
303 | VisualC "$(<PACKAGE>ROOT)/$(bin)/" \ |
---|
304 | LynxOS "$(<PACKAGE>ROOT)/$(bin)/lib" |
---|
305 | |
---|
306 | macro implied_library_suffix "" \ |
---|
307 | VisualC ".lib" \ |
---|
308 | LynxOS ".a" |
---|
309 | |
---|
310 | # |
---|
311 | # Generic environments |
---|
312 | # |
---|
313 | |
---|
314 | macro SHELL "/bin/sh" |
---|
315 | |
---|
316 | macro src "../src/" |
---|
317 | macro doc "../doc/" |
---|
318 | macro inc "../src/" |
---|
319 | macro mgr "../mgr/" |
---|
320 | ##macro javabin "../classes/" |
---|
321 | |
---|
322 | macro application_suffix ".exe" |
---|
323 | |
---|
324 | macro lock_command "chmod -R a-w ../*" \ |
---|
325 | VisualC "attrib /S /D +R ..\*" |
---|
326 | |
---|
327 | macro unlock_command "chmod -R g+w ../*" \ |
---|
328 | VisualC "attrib /S /D -R ..\*" |
---|
329 | |
---|
330 | macro preprocessor_command "" \ |
---|
331 | try "gcc -M" \ |
---|
332 | VisualC "" |
---|
333 | |
---|
334 | macro_append MAKEFLAGS " --no-print-directory " |
---|
335 | |
---|
336 | #macro_prepend constituents " configclean " |
---|
337 | |
---|
338 | # |
---|
339 | # Remote definitions |
---|
340 | # |
---|
341 | |
---|
342 | macro gmake_hosts "lx1 rsplus lxtest as7 dxplus ax7 hp2 aleph hp1 hpplus papou1-fe atlas" |
---|
343 | |
---|
344 | macro make_hosts "virgo-control1 rio0a vmpc38a" |
---|
345 | |
---|
346 | macro everywhere "hosts" \ |
---|
347 | LAL "as7 lx1 virgo-control1 papou1-fe hp2 aleph hp1" \ |
---|
348 | LHCb "lxtest hpplus dxplus rsplus" \ |
---|
349 | Atlas "lxtest rsplus atlas dxplus" \ |
---|
350 | Cascina "ax7 vmpc38a rio0a" |
---|
351 | |
---|
352 | |
---|
353 | # |
---|
354 | # Fragments |
---|
355 | # |
---|
356 | |
---|
357 | make_fragment make_header |
---|
358 | make_fragment library_header |
---|
359 | make_fragment application_header |
---|
360 | make_fragment document_header |
---|
361 | make_fragment java_header |
---|
362 | make_fragment jar_header |
---|
363 | make_fragment protos_header |
---|
364 | make_fragment buildproto |
---|
365 | make_fragment library |
---|
366 | make_fragment library_no_share |
---|
367 | make_fragment application |
---|
368 | make_fragment jar |
---|
369 | make_fragment java |
---|
370 | make_fragment java_copy |
---|
371 | make_fragment cleanup_header |
---|
372 | make_fragment cleanup |
---|
373 | make_fragment cleanup_library |
---|
374 | make_fragment cleanup_application |
---|
375 | make_fragment cleanup_java |
---|
376 | make_fragment cleanup_objects |
---|
377 | |
---|
378 | make_fragment fortran |
---|
379 | make_fragment c |
---|
380 | make_fragment cpp |
---|
381 | make_fragment lex |
---|
382 | make_fragment yacc |
---|
383 | |
---|
384 | make_fragment fortran_library |
---|
385 | make_fragment c_library |
---|
386 | make_fragment cpp_library |
---|
387 | make_fragment lex_library |
---|
388 | make_fragment yacc_library |
---|
389 | |
---|
390 | make_fragment dsw_header |
---|
391 | make_fragment dsw_project |
---|
392 | make_fragment dsw_trailer |
---|
393 | make_fragment dsw_all_project_header |
---|
394 | make_fragment dsw_all_project_dependency |
---|
395 | make_fragment dsw_all_project_trailer |
---|
396 | |
---|
397 | make_fragment dsp_library_header |
---|
398 | make_fragment dsp_shared_library_header |
---|
399 | make_fragment dsp_application_header |
---|
400 | make_fragment dsp_windows_header |
---|
401 | make_fragment dsp_contents |
---|
402 | make_fragment dsp_trailer |
---|
403 | make_fragment dsp_all |
---|
404 | |
---|
405 | make_fragment make_setup |
---|
406 | make_fragment make_setup_header |
---|
407 | |
---|
408 | make_fragment constituents_header |
---|
409 | make_fragment constituent |
---|
410 | |
---|
411 | make_fragment dependencies |
---|
412 | make_fragment dependencies_and_triggers |
---|
413 | |
---|
414 | make_fragment readme_header |
---|
415 | make_fragment readme |
---|
416 | make_fragment readme_doc |
---|
417 | make_fragment readme_use |
---|
418 | make_fragment readme_trailer |
---|
419 | |
---|
420 | make_fragment tex -header=tex_header -suffix=ps |
---|
421 | |
---|
422 | make_fragment check_application |
---|
423 | make_fragment check_java |
---|
424 | make_fragment check_application_header |
---|
425 | |
---|
426 | make_fragment application_launcher -header=application_launcher_header |
---|
427 | |
---|
428 | |
---|
429 | |
---|
430 | macro install_command "cp " \ |
---|
431 | VisualC "copy /Y " |
---|
432 | |
---|
433 | macro uninstall_command "/bin/rm -f " \ |
---|
434 | VisualC "del " |
---|
435 | |
---|
436 | macro mkdir "mkdir" \ |
---|
437 | LynxOS "mkdir -f" |
---|
438 | |
---|
439 | #----------------------------------------------------------------- |
---|
440 | # Generic copy facility |
---|
441 | # It is customized through the parameter: |
---|
442 | # install_dir="<path where to install the sources>" |
---|
443 | # |
---|
444 | make_fragment installer -header=installer_header |
---|
445 | |
---|
446 | |
---|
447 | #----------------------------------------------------------------- |
---|
448 | # Generic usage of the cmt expand model facility |
---|
449 | # the fragment is customized through the following parameters: |
---|
450 | # model="<model text string>" |
---|
451 | # out="<output file name>" |
---|
452 | # |
---|
453 | make_fragment generator -header=generator_header |
---|
454 | |
---|
455 | |
---|
456 | # |
---|
457 | # The supported languages |
---|
458 | # |
---|
459 | |
---|
460 | language fortran -suffix=f -suffix=F -preprocessor_command=$(ppcmd) -linker=$(flink) |
---|
461 | language c -suffix=c -prototypes -linker=$(clink) |
---|
462 | language c++ -suffix=C -suffix=cc -suffix=cxx -suffix=cpp -fragment=cpp -linker=$(cpplink) |
---|
463 | language java -suffix=java -linker=java |
---|
464 | language yacc -suffix=y -prototypes -linker=$(clink) |
---|
465 | language lex -suffix=l -prototypes -linker=$(clink) |
---|
466 | |
---|
467 | # |
---|
468 | # The cmt constituent |
---|
469 | # |
---|
470 | |
---|
471 | application cmt cmt.cxx \ |
---|
472 | cmt_awk.cxx \ |
---|
473 | cmt_branch.cxx \ |
---|
474 | cmt_constituent.cxx \ |
---|
475 | cmt_deps_builder.cxx \ |
---|
476 | cmt_fragment.cxx \ |
---|
477 | cmt_generator.cxx \ |
---|
478 | cmt_include.cxx \ |
---|
479 | cmt_parser.cxx \ |
---|
480 | cmt_script.cxx \ |
---|
481 | cmt_string.cxx \ |
---|
482 | cmt_system.cxx \ |
---|
483 | cmt_tag.cxx \ |
---|
484 | cmt_use.cxx \ |
---|
485 | cmt_symbol.cxx \ |
---|
486 | cmt_error.cxx \ |
---|
487 | cmt_pattern.cxx \ |
---|
488 | cmt_language.cxx \ |
---|
489 | cmt_cvs.cxx \ |
---|
490 | cmt_group.cxx \ |
---|
491 | cmt_database.cxx \ |
---|
492 | cmt_lock.cxx \ |
---|
493 | cmt_triggers.cxx \ |
---|
494 | cmt_regexp.cxx \ |
---|
495 | cmt_model.cxx |
---|
496 | |
---|
497 | private |
---|
498 | |
---|
499 | macro all_constituents cmt |
---|
500 | |
---|
501 | macro_append cpplink "" VisualC " advapi32.lib " |
---|
502 | |
---|
503 | |
---|