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
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
139
  
140
  
141
  
142
  
143
  
144
  
145
  
146
  
147
  
148
  
149
  
150
  
151
  
152
  
153
  
154
  
155
  
156
  
157
  
158
  
159
  
160
  
161
  
162
  
163
  
164
  
165
  
166
  
167
  
168
  
169
  
170
  
171
  
172
  
173
  
174
  
175
  
176
  
177
  
178
  
179
  
180
  
181
  
182
  
183
  
184
  
185
  
186
  
187
  
188
  
189
  
190
  
191
  
192
  
193
  
194
  
195
  
196
  
197
  
198
  
199
  
200
  
201
  
202
  
203
  
204
  
205
  
206
  
207
  
208
  
#!/bin/sh 
 
# Support local settings. 
INIT_NTRC=${INIT_NTRC-"$HOME/.init_ntrc"} 
if [ -f "$INIT_NTRC" ]; then 
  echo Using rc-file $INIT_NTRC 
  . "$INIT_NTRC" 
fi 
 
#This can be 'sprsh', 'wine' or 'cygwin' 
REMOTE_METHOD=${REMOTE_METHOD-sprsh} 
 
# Choose 'rntcc' for Watcom or 'rntcl' for Microsoft VC++ 
# (Make sure VC++ is before Watcom in your path!) 
CC=${CC-rntcl} 
 
# Important! 
# Please be sure that you have the line 'veto oplock files = /*/' in your 
# smb.conf if NTDRIVE is a samba file system. 
 
# Edit 
NTHOST=${NTHOST-10.0.5.13} 
NTDRIVE=${NTDRIVE-k:} 
 
# Edit 
#NTHOST=10.0.5.10 
#NTDRIVE='k:' 
 
#NTHOST=localhost 
#NTDRIVE='d:' 
 
# What dir on the UNIX machine is on $NTDRIVE ? 
# This variable MUST NOT end with a slash. 
NTMOUNT=${NTMOUNT-} 
 
# Where on the UNIX machine are the NT libraries available? 
NTLD_LIBRARY_PATH=${NTLD_LIBRARY_PATH-} 
 
# Use Simple Pike Remote SHell? 
USE_SPRSH=yes 
 
# Port for sprsh 
NTPORT=${NTPORT-4711} 
 
#These are only used if you use wine 
watcom=D:\\CDROM 
INCLUDE="$watcom\\H;$watcom\\H\\NT" 
 
# Used for IA64 cross-compiling. 
IA64SDK=${IA64SDK-'C:\ia64sdk17'} 
 
case "/$CC" in 
  */rntcl) 
 
    # I'll leave the following if-statement as a monument of 
    # non-tested code. - Hubbe 
    #  
    # if [ "x$NOPATHS" = "yes" ]; then 
    #  
 
    if [ "${USER-}@${HOST-}" = "hubbe@adenin" ]; then 
      echo "I am Hubbe" 
      MSVC='j:\winshare\vc98' 
      local='j:\winshare\local' 
      REMOTE_VARIABLES=" 
path=$MSVC\\bin; 
include=$MSVC\\Include;$local\\include 
lib=$MSVC\\Lib;$local\\lib 
" 
 
      # This variable is used by pntld to find 
      # the libraries (*.lib) on the UNIX system. 
      # 
      # If your library directory is not available on the unix system you 
      # will need to make a copy. -Hubbe 
      # 
      NTLD_LIBRARY_PATH='/net/cytocin/winshare/vc98/Lib:/net/cytocin/winshare/local/lib' 
 
      export NTLD_LIBRARY_PATH 
      export REMOTE_VARIABLES 
    else 
      echo "We are not Hubbe." 
    fi 
  ;; 
 
  */rntcl64) 
    REMOTE_VARIABLES=" 
path=$IA64SDK\\bin\\Win64;$IA64SDK\\bin; 
include=$IA64SDK\\Include; 
lib=$IA64SDK\\Lib; 
" 
    export REMOTE_VARIABLES 
  ;; 
 
  */rntecl) 
    REMOTE_VARIABLES=" 
path=$IA64SDK\\bin\\Intel64;$IA64SDK\\bin; 
include=$IA64SDK\\Include; 
lib=$IA64SDK\\Lib; 
" 
    export REMOTE_VARIABLES 
  ;; 
 
  */rntcc) 
    watcom='j:\winshare\WATCOM' 
    local='j:\winshare\WATCOM\local' 
    REMOTE_VARIABLES=" 
path=$watcom\\binnt;$watcom\\binw; 
include=$watcom\\h;$watcom\\h\\nt;$local\\h 
lib=$watcom\\lib386;$local\\lib 
" 
    export REMOTE_VARIABLES 
  ;; 
esac 
 
 
# Don't edit anything below this point.. 
 
case /$0 in 
  */init_nt) 
    # We were executed we can find the path! 
    base=`echo $0 | sed -e 's@/init_nt@@'` 
    base=`(test "x$base" != "x" && cd $base ; /bin/pwd)` 
  ;; 
 
  *) 
    # We were sourced, we cannot find the path... 
    base=`pwd` 
  ;; 
esac 
 
if [ "x$OSTYPE" = xcygwin32 ]; then 
  REMOTE_METHOD=cygwin 
  driveletter=`echo $base | sed -e 's@^//\(.\)/.*@\1@` 
  if [ "x$driveletter" != "x" ]; then 
    NTDRIVE=${driveletter}: 
    NTMOUNT="//$driveletter" 
  fi 
  mkdir $base/cygtools 2>/dev/null || : 
  ( 
    cd $base/tools 
    cp rntcc rntcl ar nm ranlib uname bash-fixup sprsh lib lib.pike $base/cygtools || : 
  ) 
  SHELL=bash 
   
  NT_TOOL_PATH=$base/cygtools 
else 
  NT_TOOL_PATH=$base/tools 
fi 
 
 
 
export NT_TOOL_PATH 
 
if [ ! -d "$NT_TOOL_PATH" ]; then 
  echo Unable to find NT tools! 
  return 
  exit 
fi 
 
case :$PATH: in 
   *:$NT_TOOL_PATH:*) ;; 
   *) PATH=$NT_TOOL_PATH:$PATH ;; 
esac 
 
NTTOOLS=$NT_TOOL_PATH/lib 
 
 
if [ "x$NTMOUNT" = x ]; then 
  MNTREPLACE="" 
  PIKE_PATH_TRANSLATE="" 
else 
  MNTREPLACE="s@$NTMOUNT@@g 
" 
  PIKE_PATH_TRANSLATE="s!^$NTMOUNT!$NTDRIVE!" 
fi 
IFS='          
' 
 
export NTHOST NTDRIVE NTCC CC PATH NTTOOLS MNTREPLACE MNTREPLACE  
export NTPORT USE_SPRSH NTMOUNT IFS REMOTE_METHOD watcom INCLUDE 
export NT_TOOL_PATH NTCOMPILER PIKE_PATH_TRANSLATE NT_LIBRARY_PATH 
 
if [ "$#" = "0" ]; then 
  case /$SHELL-$TERM in 
     */bash-xterm) 
       PROMPT_COMMAND="echo -n ]2\; $REMOTE_METHOD NT compile ]1\; $CC" 
       export PROMPT_COMMAND 
     ;; 
  esac 
 
  case /$0 in 
    */init_nt) 
      case /$SHELL in 
        */bash) 
          exec $SHELL -rcfile $NT_TOOL_PATH/bash-fixup 
        ;; 
        *) 
          exec $SHELL 
        ;; 
      esac 
    ;; 
  esac 
else 
  exec $@ 
fi 
 
 
(No newline at end of file)