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