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