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
|
$NetBSD: patch-ab,v 1.6 2003/01/28 01:18:21 uebayasi Exp $
--- Makefile.in.orig Fri Apr 30 23:32:04 1999
+++ Makefile.in
@@ -99,20 +99,20 @@
# -lfftpack FFTPACK library (double precision version)
# -lranlib RANLIB (random number generation)
#
-LAPACK = ./flibs/lapack/liblapack.a
-LAPACK_LIB = -L./flibs/lapack -llapack
+LAPACK = ./flibs/lapack/liblapack_rlab.a
+LAPACK_LIB = -L./flibs/lapack -llapack_rlab
-BLAS = ./flibs/blas/libblas.a
-BLAS_LIB = -L./flibs/blas -lblas
+BLAS = ./flibs/blas/libblas_rlab.a
+BLAS_LIB = -L./flibs/blas -lblas_rlab
-FFTPACK = ./flibs/fftpack/libfftpack.a
-FFTPACK_LIB = -L./flibs/fftpack -lfftpack
+FFTPACK = ./flibs/fftpack/libfftpack_rlab.a
+FFTPACK_LIB = -L./flibs/fftpack -lfftpack_rlab
-Ranlib = ./flibs/ranlib/src/libranlib.a
-RANLIB_LIB = -L./flibs/ranlib/src -lranlib
+Ranlib = ./flibs/ranlib/src/libranlib_rlab.a
+RANLIB_LIB = -L./flibs/ranlib/src -lranlib_rlab
-Minpack = ./flibs/minpack/libminpack.a
-MINPACK_LIB = -L./flibs/minpack -lminpack
+Minpack = ./flibs/minpack/libminpack_rlab.a
+MINPACK_LIB = -L./flibs/minpack -lminpack_rlab
REQ_LIBS = $(LAPACK_LIB) $(BLAS_LIB) $(FFTPACK_LIB) $(RANLIB_LIB) $(MINPACK_LIB)
@@ -151,13 +151,13 @@
# Silicon Graphics machines need this for popen()
# SPECIAL_FLAGS = -ansiposix
-SPECIAL_FLAGS = -DASSERT_OFF $(IGC)
+SPECIAL_FLAGS = $(CPPFLAGS) -DASSERT_OFF $(IGC)
# prefix: The parent directory for the installation
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
+libdir = $(exec_prefix)/share
mand = $(exec_prefix)/man
mandir = $(exec_prefix)/man/man1
buildir = @BUILD_DIR@
@@ -166,9 +166,9 @@
# Don't change these without modifying the install actions
#
-TOPDIR = $(libdir)/rlab-$(VER)
-DOCDIR = $(TOPDIR)/doc
-RHELPDIR = $(TOPDIR)/doc/help
+TOPDIR = $(libdir)/rlab
+DOCDIR = $(prefix)/share/doc/rlab
+RHELPDIR = $(TOPDIR)/help
RLIBDIR = $(TOPDIR)/rlib
DEFAULT_RC0 = $(TOPDIR)/.rlab
TOOLBOX = $(TOPDIR)/toolbox
@@ -236,7 +236,7 @@
SRC = $(R_SRC) $(F_SRC) $(EXTRA_SRC) $(GNU_SRC) $(CMD_SRC)
OBJ = $(R_OBJ) $(F_OBJ) $(EXTRA_OBJ) $(GNU_OBJ) $(CMD_OBJ)
-all: gc libs rlab
+all: libs rlab
libs: $(LAPACK) $(BLAS) $(FFTPACK) $(Ranlib) $(Minpack)
@@ -268,7 +268,7 @@
rlab: $(OBJ)
$(F77) $(EXFLAGS) $(CFLAGS) $(DEFS) $(SPECIAL_FLAGS) \
- $(OBJ) $(R_LIBS) $(PLOT_LIBS) -o rlab
+ $(OBJ) $(LDFLAGS) $(R_LIBS) $(PLOT_LIBS) -o rlab
#
# Ignore these unless you know what CodeTEST Native for Solaris is.
@@ -301,51 +301,67 @@
COPYDIR = rlib toolbox controls-toolbox doc examples .rlab config.h test.r \
test.getline test.input Makefile
-install: rlab mkdir
- -if [ `/bin/pwd` != `(cd ${TOPDIR}; /bin/pwd)` ] ; then \
- tar cf - ${COPYDIR} [A-Z]* | (cd ${TOPDIR}; umask 022; tar xf - ) ;\
- fi
- if test "$(PLOT_PROG)" = "plplot" ; then\
- cp misc/plplot.r ${TOPDIR}/rlib/plot.r;\
- cd misc/plhelp; tar cf - . | (cd ${RHELPDIR}; umask 022; tar xf - ) ;\
- fi
- if test "$(PLOT_PROG)" = "pgplot" ; then\
- cp misc/pgplot.r ${TOPDIR}/rlib/plot.r;\
- cd misc/pghelp; tar cf - . | (cd ${RHELPDIR}; umask 022; tar xf - ) ;\
+install: rlab
+ $(BSD_INSTALL_DATA_DIR) $(TOPDIR)
+ $(BSD_INSTALL_DATA) $(buildir)/.rlab $(TOPDIR)
+ $(BSD_INSTALL_DATA_DIR) $(RLIBDIR)
+ @for f in $(buildir)/rlib/*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(RLIBDIR)"; \
+ echo $$i; $$i; \
+ done
+ $(BSD_INSTALL_DATA_DIR) $(TOOLBOX)
+ @for f in $(buildir)/toolbox/*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(TOOLBOX)"; \
+ echo $$i; $$i; \
+ done
+ $(BSD_INSTALL_DATA_DIR) $(CTOOLBOX)
+ @for f in $(buildir)/controls-toolbox/*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(CTOOLBOX)"; \
+ echo $$i; $$i; \
+ done
+ $(BSD_INSTALL_DATA_DIR) $(RHELPDIR)
+ @for f in $(buildir)/doc/help/*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(RHELPDIR)"; \
+ echo $$i; $$i; \
+ done
+ $(BSD_INSTALL_DATA_DIR) $(TOPDIR)/examples
+ @for f in $(buildir)/examples/* $(buildir)/test*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(TOPDIR)/examples/"; \
+ echo $$i; $$i; \
+ done
+ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/doc/rlab
+ $(BSD_INSTALL_DATA) $(buildir)/doc/rlab-ref.ps $(DOCDIR)
+ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/doc/html/rlab
+ @for f in $(buildir)/doc/html/*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/doc/html/rlab/"; \
+ echo $$i; $$i; \
+ done
+ if test "$(PLOT_PROG)" = "plplot" ; then \
+ $(BSD_INSTALL_DATA) $(buildir)/misc/plplot.r $(RLIBDIR)/plot.r;\
+ for f in $(buildir)/misc/plhelp/*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(RHELPDIR)"; \
+ echo $$i; $$i; \
+ done \
fi
if test "$(PLOT_PROG)" = "gnuplot" ; then\
- cp misc/gnuplot.r ${TOPDIR}/rlib/plot.r;\
- cp misc/gp-compat.r ${TOPDIR}/rlib/gp-compat.r;\
- cd misc/gnuplothelp; tar cf - . | (cd ${RHELPDIR}; umask 022; tar xf - ) ;\
+ $(BSD_INSTALL_DATA) $(buildir)/misc/gnuplot.r $(RLIBDIR)/plot.r;\
+ $(BSD_INSTALL_DATA) $(buildir)/misc/gp-compat.r $(RLIBDIR)/gp-compat.r;\
+ for f in $(buildir)/misc/gnuplothelp/*; do \
+ i="$(BSD_INSTALL_DATA) $$f $(RHELPDIR)"; \
+ echo $$i; $$i; \
+ done \
fi
if test "$(PLOT_PROG)" = "plotmtv" ; then\
- cp misc/plotmtv.r ${TOPDIR}/rlib/plotmtv.r;\
- fi
- $(INSTALL_PROGRAM) rlab $(bindir)/rlab-$(VER)
- if test -x "$(bindir)/rlab2" ; then\
- rm -f $(bindir)/rlab2;\
+ $(BSD_INSTALL_DATA) $(buildir)/misc/plotmtv.r $(RLIBDIR);\
fi
+ $(BSD_INSTALL_PROGRAM) $(buildir)/rlab $(bindir)/rlab-$(VER)
sed 's@rlab_exec_prefix@$(exec_prefix)@' ./misc/rlab > ./misc/rlab.tmp.0
sed 's@rlab_ver_string@$(VER)@' ./misc/rlab.tmp.0 > ./misc/rlab.tmp.1
sed 's@plot_dir@$(PLOT_DIR)@' ./misc/rlab.tmp.1 > ./misc/rlab.tmp.2
- sed 's@plot_prog@$(PLOT_PROG)@' ./misc/rlab.tmp.2 > ./misc/rlab2
+ sed 's@plot_prog@$(PLOT_PROG)@' ./misc/rlab.tmp.2 > ./misc/rlab
rm -f ./misc/rlab.tmp.0 ./misc/rlab.tmp.1 ./misc/rlab.tmp.2
- $(INSTALL_PROGRAM) ./misc/rlab2 $(bindir)/rlab2
- if test "$(LN)" = "ln" ; then\
- @echo "RECOMMENDED YOU MV $(TOPDIR) to $(libdir)/rlab2";\
- fi
- if test "$(LN)" = "ln -s" ; then\
- if test -r "$(libdir)/rlab2" ; then\
- mv $(libdir)/rlab2 $(libdir)/rlab2.old;\
- fi;\
- cd $(libdir); $(LN) ./rlab-$(VER) ./rlab2;\
- fi
- cd $(buildir); $(INSTALL) doc/rlab2.1 $(mandir)/rlab2.1
-
-mkdir:
- -mkdir $(exec_prefix) $(bindir) $(libdir) $(mand) \
- $(mandir) $(TOPDIR) $(RLIBDIR) $(DOCDIR) \
- $(RHELPDIR) $(TOOLBOX) $(CTOOLBOX)
+ $(BSD_INSTALL_SCRIPT) $(buildir)/misc/rlab $(bindir)
+ $(BSD_INSTALL_MAN) $(buildir)/doc/rlab2.1 $(mandir)/rlab.1
FRC:
|