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
|
$NetBSD: patch-aa,v 1.2 2005/02/16 23:20:24 jschauma Exp $
Make this script run non-interactively.
--- makeall.orig 2003-12-14 12:24:09.000000000 -0500
+++ makeall 2005-02-15 17:41:37.000000000 -0500
@@ -36,17 +36,10 @@
_EOF_
if ( ! $?EDITOR ) then
- echo -n "What is your preferred editor [vi]? "
- set ans="$<"
- if ( "$ans" != "" ) then
- setenv EDITOR "$ans"
- else
setenv EDITOR vi
- endif
endif
again1:
-echo -n "Where do you want the executables [/usr/local/bin]? "
-set idir=$<
+set idir=@WRKSRC@/radiance/bin
(echo $idir) >/dev/null
if ( $status ) then
goto again1
@@ -54,19 +47,16 @@
set idir=$idir
if ( "$idir" == "" ) then
set idir=/usr/local/bin
-else if ( "$idir" !~ /* ) then
- echo "Directory must be relative to root, please reenter"
- goto again1
endif
if ( ! -d $idir ) then
- mkdir $idir
+ mkdir -p $idir
if ( $status ) then
echo "Cannot create directory, please reenter"
goto again1
endif
endif
-if ( ! -d $idir/dev ) then
- mkdir $idir/dev
+if ( ! -d $idir/../dev ) then
+ mkdir -p $idir/../dev
if ( $status ) then
echo "Cannot create subdirectory, please reenter"
goto again1
@@ -84,10 +74,6 @@
goto gotrmake
endif
set newrmake
-more src/common/copyright.h
-echo -n "Do you understand and accept the terms of this agreement [n]? "
-set ans="$<"
-if ( "$ans" !~ [yY]* ) exit
set special=
set arch=
set opt=
@@ -95,24 +81,7 @@
set compat=
set extras=
set esuffix=
-cat << _EOF_
-
-Please select your system type from the following list:
-
- 1) Sun Solaris
- 2) HP workstation
- 3) Silicon Graphics
- 4) AIX (RS/6000)
- 5) BSDI BSD/386
- 6) Linux
- 7) MacOS X
- 8) FreeBSD
- 9) Cygwin
- 10) Other
-
-_EOF_
-echo -n "Choice? "
-set arch="$<"
+set arch=@PKGSRC_ARCH@
switch ("$arch")
case 1: # SPARC Station
set arch=sun
@@ -163,7 +132,7 @@
set compat="malloc.o erf.o strcmp.o"
breaksw
case 6: # Linux
- set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
+ set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/X11R6/include -DNOSTEREO"
set opt="-O2 -DSPEED=200"
set arch=IBMPC
set compat="bmalloc.o erf.o getpagesize.o"
@@ -181,11 +150,16 @@
set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
set opt="-O -DSPEED=200"
set compat="bmalloc.o erf.o"
- set extras="CC=cc"
set arch=IBMPC
breaksw
-case 9: # Cygwin
- set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO"
+case 9: # NetBSD
+ set mach="-DBSD -DNOSTEREO -Dnetbsd -I/usr/X11R6/include -L/usr/X11R6/lib"
+ set opt="-O -DSPEED=200"
+ set compat="bmalloc.o erf.o"
+ set arch=IBMPC
+ breaksw
+case 10: # Cygwin
+ set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6 -I/usr/X11R6/include -DNOSTEREO"
set opt="-O2 -DSPEED=200"
set arch=IBMPC
set compat="bmalloc.o erf.o getpagesize.o"
@@ -193,7 +167,7 @@
set special="ogl"
set esuffix=".exe"
breaksw
-case 10: # Other
+case 11: # Other
set opt="-O"
set compat="bmalloc.o erf.o strcmp.o"
echo -n "Are you using the GNU C compiler [n]? "
@@ -211,7 +185,7 @@
source installib
sed 's/[ ]*$//' > $rmake << _EOF_
#!/bin/sh
-exec make "SPECIAL=$special" \
+exec @MAKE@ "SPECIAL=$special" \
"OPT=$opt" \
"MACH=$mach" \
ARCH=$arch "COMPAT=$compat" \
@@ -225,28 +199,16 @@
gotrmake:
echo "Current rmake command is:"
cat $rmake
-echo -n "Do you want to change it? "
-set ans="$<"
-if ( "$ans" =~ [yY]* ) then
- cp $rmake /tmp/rmake$$
- $EDITOR $rmake
- if ( `cat $rmake /tmp/rmake$$ | grep OPT= | uniq | wc -l` == 2 ) set newrmake
- rm -f /tmp/rmake$$
-endif
if ( ! -d src/lib ) then
mkdir src/lib
endif
-if ( $?newrmake ) then
- echo 'New rmake command -- running "makeall clean"...'
- csh -f $0 clean
-endif
cd src
echo "Making programs..."
set errs=0
foreach i ( $srcdirs )
pushd $i
echo "In directory $i..."
- $rmake -k $*
+ $rmake $*
@ errs += $status
popd
end
@@ -256,22 +218,6 @@
echo "Done."
endif
cd ..
-if (! $inpath ) then
- echo ""
- echo "Add $idir to the beginning of your execution path:"
- echo 'For C-shell users, put the following into ~/.cshrc'
- echo " set path=( $idir "'$path )'
- echo 'For Bourne shell users, put the following into $HOME/profile'
- echo " PATH=$idir"':$PATH'
- echo " export PATH"
-endif
-if (! -d /usr/tmp) then
- ln -s /tmp /usr/tmp
- if ($status) then
- echo ""
- echo "IMPORTANT: Execute 'sudo ln -s /tmp /usr/tmp'"
- endif
-endif
else
cd src
foreach i ( $srcdirs )
|