/usr/share/tau/tools/inc/languages.tcl is in tau-racy 2.16.4-1.5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | # TODO
# - Allow multiple possible extensions for each language source code file.
set languages {hpc++ pc++ ansic}
set pc++(cgm_cmd) "cgm"
set pc++(cgm_ext) "dep"
set pc++(prog_ext) "pc"
set pc++(template) "lang_support/pc++/PROJ-TEMPLATE"
set pc++(compileopts) {CXX_SWITCHES PCXX_SWITCHES}
set pc++(compileopts_desc) {"extra C++ switches:" "extra pC++ switches:"}
set pc++(tools) {cosy fancy spiffy cagey classy racy speedy}
set hpc++(cgm_cmd) "cppcgm"
set hpc++(cgm_ext) "dep"
set hpc++(prog_ext) "C"
set hpc++(template) "lang_support/hpc++/PROJ-TEMPLATE"
set hpc++(compileopts) {CXX_SWITCHES}
set hpc++(compileopts_desc) {"extra C++ switches:"}
set hpc++(tools) {cosy fancy spiffy cagey classy racy}
set ansic(cgm_cmd) "ccgm"
set ansic(cgm_ext) "dep"
set ansic(prog_ext) "c"
set ansic(template) "lang_support/ansic/PROJ-TEMPLATE"
set ansic(compileopts) {CC_SWITCHES}
set ansic(compileopts_desc) {"extra C switches:"}
set ansic(tools) {cosy fancy spiffy cagey classy}
proc Lang_GetCGM {lang} {
global languages; foreach l $languages {global $l}
return [eval set ${lang}(cgm_cmd)]
}
proc Lang_GetExt {lang} {
global languages; foreach l $languages {global $l}
return [eval set ${lang}(cgm_ext)]
}
proc Lang_GetProgExt {lang} {
global languages; foreach l $languages {global $l}
return [eval set ${lang}(prog_ext)]
}
proc Lang_GetTemplateName {lang} {
global languages; foreach l $languages {global $l}
return [eval set ${lang}(template)]
}
proc Lang_GetCompileOpts {lang} {
global languages; foreach l $languages {global $l}
return [eval set ${lang}(compileopts)]
}
proc Lang_GetCompileOptsDesc {lang} {
global languages; foreach l $languages {global $l}
return [eval set ${lang}(compileopts_desc)]
}
proc Lang_GuessLang {filen} {
global languages; foreach l $languages {global $l}
set file_ext [string range [file extension $filen] 1 end]
foreach lang $languages {
if {$file_ext == [Lang_GetProgExt $lang]} {
return $lang
}
}
}
# returns 1 if compatible, 0 if not
proc Lang_CheckCompatibility {proj_langs tool} {
global languages; foreach l $languages {global $l}
if {[llength $proj_langs] == 0} { return 1; }
foreach lang $proj_langs {
if {[lsearch [eval set ${lang}(tools)] $tool] >= 0} {
return 1;
}
}
return 0
}
|