File: default.do

package info (click to toggle)
checkpw 1.02-1%2Bdeb6u1
  • links: PTS
  • area: main
  • in suites: squeeze-lts
  • size: 556 kB
  • ctags: 290
  • sloc: ansic: 2,169; makefile: 396; sh: 189
file content (172 lines) | stat: -rw-r--r-- 4,217 bytes parent folder | download | duplicates (8)
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
if test -r $1=x
then
  dependon $1=x
  libs=`grep '\.lib *$' "$1=x"`
  libscat=''
  for i in $libs
  do
    libscat="$libscat "'`'"cat $i"'`'
  done
  objs=`grep -v '\.lib *$' "$1=x"`
  dependon load $1.o $objs $libs
  directtarget
  formake ./load $1 $objs "$libscat"
  eval ./load $1 $objs $libscat
  exit 0
fi

if test -r $1=X
then
  dependon $1=X
  libs=`grep '\.lib *$' "$1=X"`
  libscat=''
  for i in $libs
  do
    libscat="$libscat "'`'"cat $i"'`'
  done
  objs=`grep -v '\.lib *$' "$1=X"`
  dependon loads $1.o $objs $libs
  directtarget
  formake ./loads $1 $objs "$libscat"
  eval ./loads $1 $objs $libscat
  exit 0
fi

if test -r $1=s
then
  dependon $1=s warn-auto.sh $1.sh conf-home
  formake cat warn-auto.sh $1.sh '\'
  formake '| sed s}HOME}"`head -1 conf-home`"}g \'
  formake '| sed s}QMAIL}"`head -1 conf-qmail`"}g \'
  formake '| sed s}MAILDIR}"`head -1 conf-maildir`"}g \'
  formake '>' $1
  formake chmod 755 $1
  cat warn-auto.sh
  cat $1.sh \
  | sed s}HOME}"`head -1 conf-home`"}g \
  | sed s}QMAIL}"`head -1 conf-qmail`"}g \
  | sed s}MAILDIR}"`head -1 conf-maildir`"}g
  chmod 755 $3
  exit 0
fi

case $1 in
  check)
    dependon it instcheck
    formake ./instcheck
    ./instcheck
    directtarget
    exit 0
    ;;
  compile)
    dependon warn-auto.sh conf-cc
    formake "( cat warn-auto.sh; \\"
    formake echo exec '"`head -1 conf-cc`"' \''-c $${1+"$$@"}'\' "\\"
    formake ") > compile"
    formake "chmod 755 compile"
    ( cat warn-auto.sh
      echo exec "`head -1 conf-cc`" '-c ${1+"$@"}'
    )
    chmod 755 $3
    exit 0
    ;;
  it)
    dependon prog install instcheck
    directtarget
    exit 0
    ;;
  load)
    dependon warn-auto.sh conf-ld
    formake "( cat warn-auto.sh; \\"
    formake echo "'"'main="$$1"; shift'"'""; \\"
    formake echo exec '"`head -1 conf-ld`"' "\\"
    formake "'"'-o "$$main" "$$main".o $${1+"$$@"}'"'" "\\"
    formake ") > load"
    formake "chmod 755 load"
    cat warn-auto.sh
    echo 'main="$1"; shift'
    echo exec "`head -1 conf-ld`" '-o "$main" "$main".o ${1+"$@"}'
    chmod 755 $3
    exit 0
    ;;
  loads)
    dependon warn-auto.sh conf-lds
    formake "( cat warn-auto.sh; \\"
    formake echo "'"'main="$$1"; shift'"'""; \\"
    formake echo exec '"`head -1 conf-lds`"' "\\"
    formake "'"'-o "$$main" "$$main".o $${1+"$$@"}'"'" "\\"
    formake ") > loads"
    formake "chmod 755 loads"
    cat warn-auto.sh
    echo 'main="$1"; shift'
    echo exec "`head -1 conf-lds`" '-o "$main" "$main".o ${1+"$@"}'
    chmod 755 $3
    exit 0
    ;;
  makelib)
    dependon warn-auto.sh systype
    formake "( cat warn-auto.sh; \\"
    formake echo \''main="$$1"; shift'\'"; \\"
    formake echo \''rm -f "$$main"'\'"; \\"
    formake echo \''ar cr "$$main" $${1+"$$@"}'\'"; \\"
    formake 'case "`cat systype`" in \'
    formake "sunos-5.*) ;; \\"
    formake "unix_sv*) ;; \\"
    formake "irix64-*) ;; \\"
    formake "irix-*) ;; \\"
    formake "dgux-*) ;; \\"
    formake "hp-ux-*) ;; \\"
    formake "sco*) ;; \\"
    formake "*)" echo \''ranlib "$$main"'\'" ;; \\"
    formake "esac \\"
    formake ") > makelib"
    formake "chmod 755 makelib"
    ( cat warn-auto.sh;
      echo 'main="$1"; shift';
      echo 'rm -f "$main"';
      echo 'ar cr "$main" ${1+"$@"}';
      case "`cat systype`" in
      sunos-5.*) ;;
      unix_sv*) ;;
      irix64-*) ;;
      irix-*) ;;
      dgux-*) ;;
      hp-ux-*) ;;
      sco*) ;;
      *) echo 'ranlib "$main"' ;;
      esac
    )
    chmod 755 $3
    exit 0
    ;;
  setup)
    dependon it install
    formake ./install
    ./install
    directtarget
    exit 0
    ;;
  systype)
    dependon find-systype.sh conf-cc conf-ld trycpp.c x86cpuid.c
    formake "( cat warn-auto.sh; \\"
    formake echo CC="\\'"'`head -1 conf-cc`'"\\'; \\"
    formake echo LD="\\'"'`head -1 conf-ld`'"\\'; \\"
    formake "cat find-systype.sh; \\"
    formake ") | sh > systype"
    ( cat warn-auto.sh
    echo CC=\'\"`head -1 conf-cc`\"\'
    echo LD=\'\"`head -1 conf-ld`\"\'
    cat find-systype.sh
    ) | sh
    exit 0
    ;;
  test)
    dependon prog rts rts.tests rts.exp
    formake './rts | cmp - rts.exp >&2'
    ./rts | cmp - rts.exp >&2
    directtarget
    exit 0
    ;;
esac

nosuchtarget