OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [tools/] [doxx.tcl] - Blame information for rev 1782

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# doxx.tcl --
2
#
3
# Common code shared by doconfig.tcl and domakefile.tcl
4
#
5
 
6
case $argv {
7
    tk4.0 {
8
        set TCL_VERSION 7.4
9
        set subs(@@_V_TCL_VER_@@) 7.4
10
        set subs(@@_V_TCLVER_@@)  74
11
        set subs(@@_V_TK_VER_@@)  4.0
12
        set subs(@@_V_TKVER_@@)   40
13
    }
14
    tk4.1 {
15
        set TCL_VERSION 7.5
16
        set subs(@@_V_TCL_VER_@@) 7.5
17
        set subs(@@_V_TCLVER_@@)  75
18
        set subs(@@_V_TK_VER_@@)  4.1
19
        set subs(@@_V_TKVER_@@)   41
20
    }
21
    tk4.2 {
22
        set TCL_VERSION 7.6
23
        set subs(@@_V_TCL_VER_@@) 7.6
24
        set subs(@@_V_TCLVER_@@)  76
25
        set subs(@@_V_TK_VER_@@)  4.2
26
        set subs(@@_V_TKVER_@@)   42
27
    }
28
    tk4.3 {
29
        set TCL_VERSION 7.7
30
        set subs(@@_V_TCL_VER_@@) 7.7
31
        set subs(@@_V_TCLVER_@@)  77
32
        set subs(@@_V_TK_VER_@@)  4.3
33
        set subs(@@_V_TKVER_@@)   43
34
    }
35
    tk8.0 {
36
        set TCL_VERSION 8.0
37
        set subs(@@_V_TCL_VER_@@) 8.0
38
        set subs(@@_V_TCLVER_@@)  80
39
        set subs(@@_V_TK_VER_@@)  8.0
40
        set subs(@@_V_TKVER_@@)   80
41
    }
42
    itcl2.0 {
43
        set TCL_VERSION 7.4
44
        set subs(@@_V_TCL_VER_@@)  7.4
45
        set subs(@@_V_TCLVER_@@)   74
46
        set subs(@@_V_TK_VER_@@)   4.0
47
        set subs(@@_V_TKVER_@@)    40
48
        set subs(@@_V_ITCL_VER_@@) 2.0
49
        set subs(@@_V_ITCLVER_@@)  20
50
    }
51
    itcl2.1 {
52
        set TCL_VERSION 7.5
53
        set subs(@@_V_TCL_VER_@@)  7.5
54
        set subs(@@_V_TCLVER_@@)   75
55
        set subs(@@_V_TK_VER_@@)   4.1
56
        set subs(@@_V_TKVER_@@)    41
57
        set subs(@@_V_ITCL_VER_@@) 2.1
58
        set subs(@@_V_ITCLVER_@@)  21
59
        set subs(@@_V_IWIDGETS_VER_@@) 2.1.0
60
    }
61
    itcl2.2 {
62
        set TCL_VERSION 7.6
63
        set subs(@@_V_TCL_VER_@@)  7.6
64
        set subs(@@_V_TCLVER_@@)   76
65
        set subs(@@_V_TK_VER_@@)   4.2
66
        set subs(@@_V_TKVER_@@)    42
67
        set subs(@@_V_ITCL_VER_@@) 2.2
68
        set subs(@@_V_ITCLVER_@@)  22
69
        set subs(@@_V_IWIDGETS_VER_@@) 2.2.0
70
    }
71
    default {
72
        puts stderr "option \"$argv\" not supported"
73
        exit 1
74
    }
75
}
76
 
77
if [info exists subs(@@_V_ITCLVER_@@)] {
78
    set ITCL 1
79
    set subs(@@_V_LNAME_@@)   tix
80
    set subs(@@_V_BVEREXT_@@) 1
81
} else {
82
    set ITCL 0
83
    set subs(@@_V_LNAME_@@) tix
84
    set subs(@@_V_BVEREXT_@@) ""
85
}
86
 
87
if {$subs(@@_V_TCL_VER_@@) == 7.4} {
88
    set TCL74 1
89
} else {
90
    set TCL74 0
91
}
92
 
93
proc p {string} {
94
    global subs
95
 
96
    foreach name [array name subs] {
97
        regsub -all $name $string $subs($name) string
98
    }
99
    regsub ^[format \n] $string "" string
100
    regsub "\[[format \t] \]*\$" $string "" string
101
    regsub -all \\\\\\\\ $string \\ string
102
    puts $string
103
}
104
 
105
proc p74 {string} {
106
    global TCL74
107
    if $TCL74 {
108
        p $string
109
    }
110
}
111
 
112
proc p75+ {string} {
113
    global TCL74
114
    if !$TCL74 {
115
        p $string
116
    }
117
}
118
 
119
proc pitcl {string} {
120
    global ITCL
121
    if $ITCL {
122
        p $string
123
    }
124
}
125
 
126
proc ptcl {string} {
127
    global ITCL
128
    if !$ITCL {
129
        p $string
130
    }
131
}
132
 
133
set ENABLE_SAM 0
134
set SAM_LIB    0
135
set SAM_EXE    0
136
 
137
if {!$ITCL} {
138
    if {$TCL_VERSION <= 7.6} {
139
        set ENABLE_SAM 1
140
        set SAM_LIB    1
141
        set SAM_EXE    1
142
    } else {
143
        set ENABLE_SAM 1
144
        set SAM_LIB    1
145
        set SAM_EXE    0
146
    }
147
} else {
148
    if {$TCL_VERSION == 7.6} {
149
        set ENABLE_SAM 1
150
        set SAM_LIB    1
151
        set SAM_EXE    0
152
    }
153
}
154
 
155
proc p_sam {string} {
156
    global ENABLE_SAM
157
    if $ENABLE_SAM {
158
        p $string
159
    }
160
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.