860
|
1 # @configure_input@ |
5
|
2 # |
|
3 # Common configuration rules for all of octave's Makefiles. |
|
4 # |
7017
|
5 # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
|
6 # 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton |
|
7 # |
7016
|
8 # This file is part of Octave. |
|
9 # |
|
10 # Octave is free software; you can redistribute it and/or modify it |
|
11 # under the terms of the GNU General Public License as published by the |
|
12 # Free Software Foundation; either version 3 of the License, or (at |
|
13 # your option) any later version. |
|
14 # |
|
15 # Octave is distributed in the hope that it will be useful, but WITHOUT |
|
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
17 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
18 # for more details. |
|
19 # |
|
20 # You should have received a copy of the GNU General Public License |
|
21 # along with Octave; see the file COPYING. If not, see |
|
22 # <http://www.gnu.org/licenses/>. |
1450
|
23 |
5
|
24 SHELL = /bin/sh |
|
25 |
4544
|
26 AWK = @AWK@ |
|
27 export AWK |
|
28 |
4084
|
29 SED = @SED@ |
4299
|
30 export SED |
4084
|
31 |
7244
|
32 FIND = @FIND@ |
|
33 export FIND |
|
34 |
5465
|
35 PERL = @PERL@ |
5495
|
36 PYTHON = @PYTHON@ |
5465
|
37 |
5468
|
38 DESKTOP_FILE_INSTALL = @DESKTOP_FILE_INSTALL@ |
|
39 |
3029
|
40 # A shell command to extract the version number from version.h. |
4449
|
41 getversion = $(SED) -e '/OCTAVE_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q |
|
42 |
|
43 # A shell command to extract the API version number from version.h. |
|
44 getapiversion = $(SED) -e '/OCTAVE_API_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q |
3029
|
45 |
|
46 # Look for version.h to get version information. |
|
47 xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h |
|
48 version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file)))) |
|
49 version := $(shell $(getversion) $(version_file)) |
5658
|
50 api_version := $(shell $(getapiversion) $(version_file)) |
3029
|
51 |
5
|
52 #### Start of system configuration section. #### |
|
53 |
3892
|
54 EXEEXT = @EXEEXT@ |
2577
|
55 |
4098
|
56 BUILD_EXEEXT = @BUILD_EXEEXT@ |
|
57 |
5
|
58 LEX = @LEX@ |
|
59 LFLAGS = @LFLAGS@ |
|
60 LEXLIB = @LEXLIB@ |
|
61 |
|
62 YACC = @YACC@ |
|
63 YFLAGS = -dv |
|
64 |
3675
|
65 GPERF = @GPERF@ |
|
66 |
1462
|
67 AR = @AR@ |
|
68 ARFLAGS = @ARFLAGS@ |
|
69 |
3775
|
70 TEMPLATE_AR = @TEMPLATE_AR@ |
|
71 TEMPLATE_ARFLAGS = @TEMPLATE_ARFLAGS@ |
|
72 |
5
|
73 RANLIB = @RANLIB@ |
|
74 |
1722
|
75 LN_S = @LN_S@ |
|
76 |
5934
|
77 MAKEINFO = @MAKEINFO@ |
|
78 TEXI2DVI = @TEXI2DVI@ |
|
79 TEXI2PDF = @TEXI2PDF@ |
|
80 |
|
81 GHOSTSCRIPT = @GHOSTSCRIPT@ |
2518
|
82 |
5
|
83 DEFAULT_PAGER = @DEFAULT_PAGER@ |
|
84 |
4128
|
85 ENABLE_DYNAMIC_LINKING = @ENABLE_DYNAMIC_LINKING@ |
702
|
86 |
3034
|
87 STATIC_LIBS = @STATIC_LIBS@ |
|
88 |
1679
|
89 SHARED_LIBS = @SHARED_LIBS@ |
|
90 SHLEXT = @SHLEXT@ |
4126
|
91 SHLEXT_VER = @SHLEXT_VER@ |
4102
|
92 SHLLIB = @SHLLIB@ |
4627
|
93 SHLLIB_VER = @SHLLIB_VER@ |
4102
|
94 SHLBIN = @SHLBIN@ |
4126
|
95 SHLBIN_VER = @SHLBIN_VER@ |
|
96 SHLLINKEXT= |
4102
|
97 |
3029
|
98 LIBEXT = a |
6051
|
99 LIBPRE = @LIBPRE@ |
1667
|
100 |
5
|
101 # Fortran to C translator and associated flags. |
|
102 |
|
103 F2C = @F2C@ |
|
104 F2CFLAGS = @F2CFLAGS@ |
|
105 |
|
106 # Fortran compiler flags. |
|
107 |
1163
|
108 FC = @FC@ |
798
|
109 F77 = @F77@ |
5
|
110 FFLAGS = @FFLAGS@ |
1832
|
111 FPICFLAG = @FPICFLAG@ |
2610
|
112 ALL_FFLAGS = $(FFLAGS) |
5498
|
113 F77_FLOAT_STORE_FLAG = @F77_FLOAT_STORE_FLAG@ |
5
|
114 |
6102
|
115 F77_TOLOWER=@F77_TOLOWER@ |
|
116 F77_APPEND_UNDERSCORE=@F77_TOLOWER@ |
|
117 F77_APPEND_EXTRA_UNDERSCORE=@F77_TOLOWER@ |
|
118 |
5
|
119 # cc and associated flags. |
|
120 |
2064
|
121 DLFCN_INCFLAGS = @DLFCN_INCFLAGS@ |
|
122 |
236
|
123 # Clean up INCFLAGS a bit if we are not compiling in a separate |
|
124 # directory. |
|
125 ifeq ($(srcdir),.) |
2546
|
126 TMP_IF_1 = -I. |
236
|
127 else |
2546
|
128 TMP_IF_1 = -I. -I$(srcdir) |
236
|
129 endif |
404
|
130 ifeq ($(TOPDIR),$(top_srcdir)) |
5164
|
131 TMP_IF_2 = \ |
|
132 -I$(TOPDIR) \ |
|
133 -I$(TOPDIR)/liboctave \ |
|
134 -I$(TOPDIR)/src \ |
|
135 -I$(TOPDIR)/libcruft/misc |
236
|
136 else |
5164
|
137 TMP_IF_2 = \ |
|
138 -I$(TOPDIR) \ |
|
139 -I$(TOPDIR)/liboctave \ |
|
140 -I$(TOPDIR)/src \ |
|
141 -I$(TOPDIR)/libcruft/misc \ |
|
142 -I$(top_srcdir) \ |
|
143 -I$(top_srcdir)/liboctave \ |
|
144 -I$(top_srcdir)/src \ |
|
145 -I$(top_srcdir)/libcruft/misc |
236
|
146 endif |
5169
|
147 INCFLAGS = $(TMP_IF_1) $(TMP_IF_2) $(DLFCN_INCFLAGS) |
236
|
148 |
5
|
149 LIBFLAGS = -L$(TOPDIR) |
236
|
150 |
5
|
151 DEFS = @DEFS@ |
|
152 |
2032
|
153 UGLY_DEFS = @UGLY_DEFS@ |
|
154 |
5
|
155 CC = @CC@ |
1891
|
156 CC_VERSION = @CC_VERSION@ |
5
|
157 CFLAGS = @CFLAGS@ |
1832
|
158 CPICFLAG = @CPICFLAG@ |
3126
|
159 XTRA_CFLAGS = @XTRA_CFLAGS@ |
4626
|
160 WARN_CFLAGS = @WARN_CFLAGS@ |
6141
|
161 ALL_CFLAGS = $(INCFLAGS) $(DLL_CDEFS) $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) |
4626
|
162 BUG_CFLAGS = $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) |
798
|
163 |
4094
|
164 BUILD_CC = @BUILD_CC@ |
|
165 BUILD_CFLAGS = @BUILD_CFLAGS@ |
4093
|
166 |
3775
|
167 DEPEND_FLAGS = @DEPEND_FLAGS@ |
|
168 DEPEND_EXTRA_SED_PATTERN = @DEPEND_EXTRA_SED_PATTERN@ |
6087
|
169 INCLUDE_DEPS = @INCLUDE_DEPS@ |
|
170 ifeq ($(INCLUDE_DEPS),false) |
|
171 omit_deps = true; |
|
172 endif |
3775
|
173 |
198
|
174 CXX = @CXX@ |
1891
|
175 CXX_VERSION = @CXX_VERSION@ |
518
|
176 CXXCPP = @CXXCPP@ |
198
|
177 CXXFLAGS = @CXXFLAGS@ |
1832
|
178 CXXPICFLAG = @CXXPICFLAG@ |
3126
|
179 XTRA_CXXFLAGS = @XTRA_CXXFLAGS@ |
4626
|
180 WARN_CXXFLAGS = @WARN_CXXFLAGS@ |
|
181 ALL_CXXFLAGS = \ |
6141
|
182 $(INCFLAGS) $(DLL_CXXDEFS) $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) |
4626
|
183 BUG_CXXFLAGS = $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) |
5
|
184 |
4094
|
185 BUILD_CXX = @BUILD_CXX@ |
|
186 BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ |
4093
|
187 |
858
|
188 CPPFLAGS = @CPPFLAGS@ |
|
189 |
3705
|
190 LD_CXX = @LD_CXX@ |
5
|
191 LDFLAGS = @LDFLAGS@ |
708
|
192 LD_STATIC_FLAG = @LD_STATIC_FLAG@ |
3887
|
193 ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS) |
5
|
194 |
4298
|
195 BUILD_LDFLAGS = @BUILD_LDFLAGS@ |
|
196 |
2676
|
197 SH_LD = @SH_LD@ |
|
198 SH_LDFLAGS = @SH_LDFLAGS@ |
|
199 |
4759
|
200 DL_LD = @DL_LD@ |
|
201 DL_LDFLAGS = @DL_LDFLAGS@ |
|
202 |
3036
|
203 SONAME_FLAGS = @SONAME_FLAGS@ |
|
204 |
3233
|
205 RDYNAMIC_FLAG = @RDYNAMIC_FLAG@ |
|
206 |
2674
|
207 RLD_FLAG = @RLD_FLAG@ |
|
208 |
5
|
209 FLIBS = @FLIBS@ |
708
|
210 |
2930
|
211 LIBDLFCN = @LIBDLFCN@ |
5451
|
212 LIBGLOB = @LIBGLOB@ |
3156
|
213 LIBOCTINTERP = @LIBOCTINTERP@ |
|
214 LIBOCTAVE = @LIBOCTAVE@ |
|
215 LIBCRUFT = @LIBCRUFT@ |
4102
|
216 LIBREADLINE = @LIBREADLINE@ |
|
217 TERMLIBS = @TERMLIBS@ |
3726
|
218 |
6823
|
219 QHULL_LIBS = @QHULL_LIBS@ |
5585
|
220 REGEX_LIBS = @REGEX_LIBS@ |
3726
|
221 BLAS_LIBS = @BLAS_LIBS@ |
3827
|
222 FFTW_LIBS = @FFTW_LIBS@ |
5235
|
223 GLPK_LIBS = @GLPK_LIBS@ |
6043
|
224 CURL_LIBS = @CURL_LIBS@ |
5451
|
225 AMD_LIBS = @AMD_LIBS@ |
6024
|
226 CAMD_LIBS = @CAMD_LIBS@ |
5270
|
227 UMFPACK_LIBS = @UMFPACK_LIBS@ |
5451
|
228 COLAMD_LIBS = @COLAMD_LIBS@ |
|
229 CCOLAMD_LIBS = @CCOLAMD_LIBS@ |
|
230 CHOLMOD_LIBS = @CHOLMOD_LIBS@ |
5610
|
231 CXSPARSE_LIBS = @CXSPARSE_LIBS@ |
3726
|
232 LIBS = @LIBS@ |
5
|
233 |
5275
|
234 USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@ |
|
235 |
5708
|
236 TEXINFO_COLAMD = @TEXINFO_COLAMD@ |
|
237 TEXINFO_CHOLMOD = @TEXINFO_CHOLMOD@ |
|
238 TEXINFO_UMFPACK = @TEXINFO_UMFPACK@ |
6855
|
239 TEXINFO_QHULL = @TEXINFO_QHULL@ |
5708
|
240 |
2155
|
241 # The arguments passed to configure. |
2156
|
242 config_opts = @config_opts@ |
2155
|
243 |
666
|
244 # ==================== Where To Install Things ==================== |
5
|
245 |
666
|
246 # The default location for installation. Everything is placed in |
|
247 # subdirectories of this directory. The default values for many of |
|
248 # the variables below are expressed in terms of this one, so you may |
|
249 # not need to change them. This defaults to /usr/local. |
|
250 prefix = @prefix@ |
5
|
251 |
666
|
252 # Like `prefix', but used for architecture-specific files. |
|
253 exec_prefix = @exec_prefix@ |
|
254 |
|
255 # Where to install Octave and other binaries that people will want to |
|
256 # run directly. |
|
257 bindir = @bindir@ |
5
|
258 |
4411
|
259 # Normally the directory for installing executables that system |
|
260 # administrators run. This is the same as libexecdir on Cygwin systems. |
|
261 sbindir = @sbindir@ |
|
262 |
5844
|
263 # The root of the directory tree for read-only |
|
264 # architecture-independent data files. |
|
265 datarootdir = @datarootdir@ |
|
266 |
666
|
267 # Where to install architecture-independent data files. ${fcnfiledir} |
|
268 # and ${localfcnfiledir} are subdirectories of this. |
|
269 datadir = @datadir@ |
5
|
270 |
3141
|
271 libdir = @libdir@ |
|
272 |
666
|
273 # Where to install and expect libraries like libcruft.a, liboctave.a, |
3141
|
274 # and other architecture-dependent data. |
|
275 octlibdir = @octlibdir@ |
5
|
276 |
1720
|
277 # Where to install and expect executable programs to be run by Octave |
|
278 # rather than directly by users. |
|
279 libexecdir = @libexecdir@ |
|
280 |
2141
|
281 # The prefix for Octave's include file directory. The default is |
|
282 # ${prefix}/include |
2223
|
283 includedir = @includedir@ |
2141
|
284 |
666
|
285 # Where to install Octave's man pages, and what extension they should |
|
286 # have. The default is ${prefix}/man/man1 |
|
287 mandir = @mandir@ |
2223
|
288 man1dir = @man1dir@ |
|
289 man1ext = @man1ext@ |
5
|
290 |
666
|
291 # Where to install and expect the info files describing Octave.. |
|
292 infodir = @infodir@ |
|
293 |
2512
|
294 # The fill path to the default info file. |
|
295 infofile = @infofile@ |
|
296 |
666
|
297 # ==================== Octave-specific directories ==================== |
|
298 |
2993
|
299 # These variables hold the values specific to Octave. They are |
666
|
300 # based on the values of the standard Make variables above. |
|
301 |
5451
|
302 # What is the path separation character |
|
303 sepchar = @sepchar@ |
|
304 |
3597
|
305 # Where to install Octave's include files (they will actually be |
|
306 # installed in a subdirectory called octave). The default is |
2993
|
307 # ${includedir}/octave-${version} |
|
308 octincludedir = @octincludedir@ |
|
309 |
666
|
310 # Where to install the function file distributed with |
|
311 # Octave. This includes the Octave version, so that the |
|
312 # function files for different versions of Octave will install |
|
313 # themselves in separate directories. |
|
314 fcnfiledir = @fcnfiledir@ |
|
315 |
|
316 # Directories Octave should search for function files specific |
|
317 # to this site (i.e. customizations), before consulting |
|
318 # ${fcnfiledir}. This should be a colon-separated list of |
|
319 # directories. |
827
|
320 localfcnfiledir = @localfcnfiledir@ |
4449
|
321 localapifcnfiledir = @localapifcnfiledir@ |
3597
|
322 localverfcnfiledir = @localverfcnfiledir@ |
5
|
323 |
666
|
324 # Where to put executables to be run by Octave rather than |
|
325 # the user. This path usually includes the Octave version |
|
326 # and configuration name, so that multiple configurations |
|
327 # for multiple versions of Octave may be installed at once. |
|
328 archlibdir = @archlibdir@ |
|
329 |
2439
|
330 # Where to put executables to be run by Octave rather than by the |
|
331 # user that are specific to this site. |
|
332 localarchlibdir = @localarchlibdir@ |
5909
|
333 localapiarchlibdir = @localapiarchlibdir@ |
3597
|
334 localverarchlibdir = @localverarchlibdir@ |
2439
|
335 |
666
|
336 # Where to put object files that will by dynamically loaded. |
|
337 # This path usually includes the Octave version and configuration |
|
338 # name, so that multiple configurations for multiple versions of |
|
339 # Octave may be installed at once. |
|
340 octfiledir = @octfiledir@ |
5
|
341 |
666
|
342 # Directories Octave should search for object files that will be |
|
343 # dynamically loaded and that are specific to this site |
|
344 # (i.e. customizations), before consulting ${octfiledir}. This should |
|
345 # be a colon-separated list of directories. |
827
|
346 localoctfiledir = @localoctfiledir@ |
4449
|
347 localapioctfiledir = @localapioctfiledir@ |
3597
|
348 localveroctfiledir = @localveroctfiledir@ |
666
|
349 |
5814
|
350 # Where Octave will search to find image files. |
827
|
351 imagedir = @imagedir@ |
685
|
352 |
5
|
353 # The type of computer we are running on. |
3136
|
354 canonical_host_type = @canonical_host_type@ |
5
|
355 |
4443
|
356 # Where Octave will look for startup files |
|
357 startupfiledir = ${fcnfiledir}/startup |
|
358 localstartupfiledir = ${localfcnfiledir}/startup |
|
359 |
6028
|
360 # LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PATH, ... |
|
361 library_path_var = @library_path_var@ |
|
362 |
4199
|
363 NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@ |
|
364 |
5
|
365 # The following pattern rules and the substitution functions require |
|
366 # GNU make. If you don't have it, get it! |
|
367 |
7063
|
368 # How to make .o files: |
5
|
369 |
7063
|
370 %.o : %.f |
|
371 $(FC) -c $(ALL_FFLAGS) -o $@ $< |
5
|
372 |
1984
|
373 %.o : %.c |
3615
|
374 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< -o $@ |
5
|
375 |
1984
|
376 %.o : %.cc |
3615
|
377 $(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) $< -o $@ |
308
|
378 |
7063
|
379 pic/%.o : %.f |
|
380 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@ |
|
381 |
1984
|
382 pic/%.o : %.c |
|
383 $(CC) -c $(CPPFLAGS) $(CPICFLAG) $(ALL_CFLAGS) $< -o $@ |
|
384 |
|
385 pic/%.o : %.cc |
|
386 $(CXX) -c $(CPPFLAGS) $(CXXPICFLAG) $(ALL_CXXFLAGS) $< -o $@ |
|
387 |
308
|
388 # Here is a rule for generating dependencies for .cc files: |
|
389 |
1984
|
390 %.d : %.cc |
518
|
391 @echo making $@ from $< |
|
392 @rm -f $@ |
3775
|
393 @$(CXX) $(DEPEND_FLAGS) $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \ |
4084
|
394 $(SED) \ |
3775
|
395 $(DEPEND_EXTRA_SED_PATTERN) \ |
|
396 -e 's,^[^:]*/\(.*\.o\):,\1:,' \ |
4050
|
397 -e 's,$*\.o,pic/& & $*.df $@,g' > $@-t |
4014
|
398 @mv $@-t $@ |
308
|
399 |
|
400 # And one for .c files.too: |
|
401 |
1984
|
402 %.d : %.c |
518
|
403 @echo making $@ from $< |
|
404 @rm -f $@ |
3775
|
405 @$(CC) $(DEPEND_FLAGS) $(CPPFLAGS) $(ALL_CFLAGS) $< | \ |
4084
|
406 $(SED) \ |
3775
|
407 $(DEPEND_EXTRA_SED_PATTERN) \ |
|
408 -e 's,^[^:]*/\(.*\.o\):,\1:,' \ |
4014
|
409 -e 's,$*\.o,pic/& & $@,g' > $@-t |
|
410 @mv $@-t $@ |
1166
|
411 |
1685
|
412 define do-subdir-for-command |
4414
|
413 echo making $@ in $d; $(MAKE) -C $d $@; |
1166
|
414 endef |
1685
|
415 |
|
416 define subdir-for-command |
|
417 $(foreach d, $(SUBDIRS), $(do-subdir-for-command)) |
|
418 endef |
2157
|
419 |
6152
|
420 define simple-move-if-change-rule |
|
421 if [ -s $@-t ]; then \ |
|
422 $(top_srcdir)/move-if-change $@-t $@; \ |
|
423 else \ |
|
424 echo "$@-t is empty!" 1>&2; \ |
|
425 rm -f $@-t; \ |
|
426 exit 1; \ |
|
427 fi |
|
428 endef |
|
429 |
|
430 define builddir-move-if-change-rule |
|
431 if [ -s $(@F)-t ]; then \ |
|
432 $(top_srcdir)/move-if-change $(@F)-t $(@F); \ |
|
433 else \ |
|
434 echo "$(@F)-t is empty!" 1>&2; \ |
|
435 rm -f $(@F)-t; \ |
|
436 exit 1; \ |
|
437 fi |
|
438 endef |
|
439 |
2862
|
440 # Yes, the second sed command near the end is needed, to avoid limits |
|
441 # in command lengths for some versions of sed. UGLY_DEFS is often |
|
442 # quite large, so it makes sense to split this command there. |
|
443 |
2157
|
444 define do-subst-config-vals |
2223
|
445 echo "making $@ from $<" |
4084
|
446 $(SED) < $< \ |
5451
|
447 -e "s|%NO_OCT_FILE_STRIP%|${NO_OCT_FILE_STRIP}|" \ |
|
448 -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \ |
|
449 -e "s|%OCTAVE_CONF_ALL_CFLAGS%|\"${ALL_CFLAGS}\"|" \ |
|
450 -e "s|%OCTAVE_CONF_ALL_CXXFLAGS%|\"${ALL_CXXFLAGS}\"|" \ |
|
451 -e "s|%OCTAVE_CONF_ALL_FFLAGS%|\"${ALL_FFLAGS}\"|" \ |
|
452 -e "s|%OCTAVE_CONF_ALL_LDFLAGS%|\"${ALL_LDFLAGS}\"|" \ |
|
453 -e "s|%OCTAVE_CONF_AR%|\"${AR}\"|" \ |
|
454 -e "s|%OCTAVE_CONF_ARFLAGS%|\"${ARFLAGS}\"|" \ |
|
455 -e "s|%OCTAVE_CONF_BLAS_LIBS%|\"${BLAS_LIBS}\"|" \ |
|
456 -e "s|%OCTAVE_CONF_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \ |
|
457 -e "s|%OCTAVE_CONF_CC%|\"${CC}\"|" \ |
|
458 -e "s|%OCTAVE_CONF_CC_VERSION%|\"${CC_VERSION}\"|" \ |
|
459 -e "s|%OCTAVE_CONF_CFLAGS%|\"${CFLAGS}\"|" \ |
|
460 -e "s|%OCTAVE_CONF_CPICFLAG%|\"${CPICFLAG}\"|" \ |
|
461 -e "s|%OCTAVE_CONF_CPPFLAGS%|\"${CPPFLAGS}\"|" \ |
6043
|
462 -e "s|%OCTAVE_CONF_CURL_LIBS%|\"${CURL_LIBS}\"|" \ |
5451
|
463 -e "s|%OCTAVE_CONF_CXX%|\"${CXX}\"|" \ |
|
464 -e "s|%OCTAVE_CONF_CXXCPP%|\"${CXXCPP}\"|" \ |
|
465 -e "s|%OCTAVE_CONF_CXXFLAGS%|\"${CXXFLAGS}\"|" \ |
|
466 -e "s|%OCTAVE_CONF_CXXPICFLAG%|\"${CXXPICFLAG}\"|" \ |
|
467 -e "s|%OCTAVE_CONF_CXX_VERSION%|\"${CXX_VERSION}\"|" \ |
|
468 -e "s|%OCTAVE_CONF_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \ |
|
469 -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \ |
|
470 -e "s|%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%|\"${DEPEND_EXTRA_SED_PATTERN}\"|" \ |
|
471 -e "s|%OCTAVE_CONF_DLFCN_INCFLAGS%|\"${DLFCN_INCFLAGS}\"|" \ |
|
472 -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \ |
|
473 -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \ |
|
474 -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \ |
|
475 -e "s|%OCTAVE_CONF_F2C%|\"${F2C}\"|" \ |
|
476 -e "s|%OCTAVE_CONF_F2CFLAGS%|\"${F2CFLAGS}\"|" \ |
|
477 -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \ |
5498
|
478 -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \ |
5451
|
479 -e "s|%OCTAVE_CONF_FC%|\"${FC}\"|" \ |
|
480 -e "s|%OCTAVE_CONF_FFLAGS%|\"${FFLAGS}\"|" \ |
|
481 -e "s|%OCTAVE_CONF_FFTW_LIBS%|\"${FFTW_LIBS}\"|" \ |
|
482 -e "s|%OCTAVE_CONF_FLIBS%|\"${FLIBS}\"|" \ |
|
483 -e "s|%OCTAVE_CONF_FPICFLAG%|\"${FPICFLAG}\"|" \ |
|
484 -e "s|%OCTAVE_CONF_GLPK_LIBS%|\"${GLPK_LIBS}\"|" \ |
|
485 -e "s|%OCTAVE_CONF_INCFLAGS%|\"${INCFLAGS}\"|" \ |
6311
|
486 -e "s|%OCTAVE_CONF_INCLUDEDIR%|\"${includedir}\"|" \ |
5451
|
487 -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \ |
|
488 -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \ |
|
489 -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \ |
|
490 -e "s|%OCTAVE_CONF_LEX%|\"${LEX}\"|" \ |
|
491 -e "s|%OCTAVE_CONF_LEXLIB%|\"${LEXLIB}\"|" \ |
|
492 -e "s|%OCTAVE_CONF_LFLAGS%|\"${LFLAGS}\"|" \ |
|
493 -e "s|%OCTAVE_CONF_LIBCRUFT%|\"${LIBCRUFT}\"|" \ |
6710
|
494 -e "s|%OCTAVE_CONF_LIBDIR%|\"${libdir}\"|" \ |
5451
|
495 -e "s|%OCTAVE_CONF_LIBDLFCN%|\"${LIBDLFCN}\"|" \ |
|
496 -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \ |
|
497 -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \ |
|
498 -e "s|%OCTAVE_CONF_LIBGLOB%|\"${LIBGLOB}\"|" \ |
|
499 -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \ |
|
500 -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \ |
|
501 -e "s|%OCTAVE_CONF_LIBREADLINE%|\"${LIBREADLINE}\"|" \ |
|
502 -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \ |
|
503 -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \ |
6682
|
504 -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"@MKOCTFILE_DL_LDFLAGS@\"|' \ |
6311
|
505 -e "s|%OCTAVE_CONF_OCTINCLUDEDIR%|\"${octincludedir}\"|" \ |
|
506 -e "s|%OCTAVE_CONF_OCTLIBDIR%|\"${octlibdir}\"|" \ |
|
507 -e "s|%OCTAVE_CONF_PREFIX%|\"${prefix}\"|" \ |
5451
|
508 -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \ |
|
509 -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \ |
|
510 -e "s|%OCTAVE_CONF_RLD_FLAG%|\"${RLD_FLAG}\"|" \ |
|
511 -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \ |
|
512 -e "s|%OCTAVE_CONF_SHARED_LIBS%|\"${SHARED_LIBS}\"|" \ |
|
513 -e "s|%OCTAVE_CONF_SHLEXT%|\"${SHLEXT}\"|" \ |
|
514 -e "s|%OCTAVE_CONF_SHLLINKEXT%|\"${SHLLINKEXT}\"|" \ |
|
515 -e "s|%OCTAVE_CONF_SHLEXT_VER%|\"${SHLEXT_VER}\"|" \ |
|
516 -e "s|%OCTAVE_CONF_SH_LD%|\"${SH_LD}\"|" \ |
|
517 -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \ |
|
518 -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \ |
|
519 -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \ |
|
520 -e "s|%OCTAVE_CONF_UGLY_DEFS%|\"${UGLY_DEFS}\"|" \ |
|
521 -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \ |
|
522 -e "s|%OCTAVE_CONF_VERSION%|\"${version}\"|" \ |
|
523 -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \ |
|
524 -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \ |
|
525 -e "s|%OCTAVE_CONF_XTRA_CXXFLAGS%|\"${XTRA_CXXFLAGS}\"|" \ |
|
526 -e "s|%OCTAVE_CONF_YACC%|\"${YACC}\"|" \ |
|
527 -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \ |
|
528 -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" | \ |
|
529 $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t |
6152
|
530 $(simple-move-if-change-rule) |
2157
|
531 endef |
|
532 |
|
533 define do-subst-default-vals |
2223
|
534 echo "making $@ from $<" |
4084
|
535 $(SED) < $< > $@-t \ |
5451
|
536 -e "s|%OCTAVE_ARCHLIBDIR%|\"${archlibdir}\"|" \ |
|
537 -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \ |
|
538 -e "s|%OCTAVE_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \ |
|
539 -e "s|%OCTAVE_DATADIR%|\"${datadir}\"|" \ |
5847
|
540 -e "s|%OCTAVE_DATAROOTDIR%|\"${datarootdir}\"|" \ |
5451
|
541 -e "s|%OCTAVE_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \ |
|
542 -e "s|%OCTAVE_EXEC_PREFIX%|\"${exec_prefix}\"|" \ |
|
543 -e "s|%OCTAVE_FCNFILEDIR%|\"${fcnfiledir}\"|" \ |
|
544 -e "s|%OCTAVE_IMAGEDIR%|\"${imagedir}\"|" \ |
|
545 -e "s|%OCTAVE_INCLUDEDIR%|\"${includedir}\"|" \ |
|
546 -e "s|%OCTAVE_INFODIR%|\"${infodir}\"|" \ |
|
547 -e "s|%OCTAVE_INFOFILE%|\"${infofile}\"|" \ |
|
548 -e "s|%OCTAVE_LIBDIR%|\"${libdir}\"|" \ |
|
549 -e "s|%OCTAVE_LIBEXECDIR%|\"${libexecdir}\"|" \ |
|
550 -e "s|%OCTAVE_LOCALAPIFCNFILEDIR%|\"${localapifcnfiledir}\"|" \ |
|
551 -e "s|%OCTAVE_LOCALAPIOCTFILEDIR%|\"${localapioctfiledir}\"|" \ |
|
552 -e "s|%OCTAVE_LOCALARCHLIBDIR%|\"${localarchlibdir}\"|" \ |
|
553 -e "s|%OCTAVE_LOCALFCNFILEDIR%|\"${localfcnfiledir}\"|" \ |
|
554 -e "s|%OCTAVE_LOCALOCTFILEDIR%|\"${localoctfiledir}\"|" \ |
|
555 -e "s|%OCTAVE_LOCALSTARTUPFILEDIR%|\"${localstartupfiledir}\"|" \ |
5909
|
556 -e "s|%OCTAVE_LOCALAPIARCHLIBDIR%|\"${localapiarchlibdir}\"|" \ |
5451
|
557 -e "s|%OCTAVE_LOCALVERARCHLIBDIR%|\"${localverarchlibdir}\"|" \ |
|
558 -e "s|%OCTAVE_LOCALVERFCNFILEDIR%|\"${localverfcnfiledir}\"|" \ |
|
559 -e "s|%OCTAVE_LOCALVEROCTFILEDIR%|\"${localveroctfiledir}\"|" \ |
|
560 -e "s|%OCTAVE_MAN1DIR%|\"${man1dir}\"|" \ |
|
561 -e "s|%OCTAVE_MAN1EXT%|\"${man1ext}\"|" \ |
|
562 -e "s|%OCTAVE_MANDIR%|\"${mandir}\"|" \ |
|
563 -e "s|%OCTAVE_OCTFILEDIR%|\"${octfiledir}\"|" \ |
|
564 -e "s|%OCTAVE_OCTINCLUDEDIR%|\"${octincludedir}\"|" \ |
|
565 -e "s|%OCTAVE_OCTLIBDIR%|\"${octlibdir}\"|" \ |
|
566 -e "s|%OCTAVE_STARTUPFILEDIR%|\"${startupfiledir}\"|" \ |
|
567 -e "s|%OCTAVE_PREFIX%|\"${prefix}\"|" \ |
5658
|
568 -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \ |
|
569 -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \ |
5451
|
570 -e "s|%OCTAVE_VERSION%|\"${version}\"|" |
6152
|
571 $(simple-move-if-change-rule) |
2157
|
572 endef |
4227
|
573 |
5708
|
574 define do-subst-texinfo-vals |
|
575 echo "making $@ from $<" |
|
576 $(SED) < $< \ |
6583
|
577 -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \ |
6577
|
578 -e "s|%top_srcdir%|${top_srcdir}|" \ |
5708
|
579 -e "s|%OCTAVE_HOME%|${prefix}|" \ |
|
580 -e "s|%OCTAVE_VERSION%|${version}|" \ |
|
581 -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \ |
|
582 -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \ |
6855
|
583 -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" \ |
|
584 -e "s|%TEXINFO_QHULL%|${TEXINFO_QHULL}|" | \ |
5942
|
585 $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t |
6152
|
586 $(simple-move-if-change-rule) |
5708
|
587 endef |
|
588 |
5776
|
589 define do-subst-script-vals |
|
590 echo "making $@ from $<" |
|
591 $(SED) < $< \ |
7244
|
592 -e "s|%AWK%|${AWK}|g" \ |
|
593 -e "s|%FIND%|${FIND}|g" \ |
6028
|
594 -e "s|%library_path_var%|${library_path_var}|g" \ |
6155
|
595 -e "s|%liboctinterp%|${LIBPRE}octinterp.${SHLEXT}|g" \ |
|
596 -e "s|%liboctave%|${LIBPRE}octave.${SHLEXT}|g" \ |
|
597 -e "s|%libcruft%|${LIBPRE}cruft.${SHLEXT}|g" \ |
5776
|
598 -e "s|%srcdir%|${srcdir}|" \ |
|
599 -e "s|%top_srcdir%|${top_srcdir}|" \ |
5793
|
600 -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \ |
5776
|
601 -e "s|%builddir%|$(shell pwd)|" > $@-t |
6152
|
602 $(simple-move-if-change-rule) |
5776
|
603 endef |
|
604 |
6102
|
605 define do-subst-f77-mangling |
|
606 echo "making $@ from $<" |
|
607 $(SED) < $< \ |
|
608 -e "s|%F77_TOLOWER%|${F77_TOLOWER}|g" \ |
|
609 -e "s|%F77_APPEND_UNDERSCORE%|${F77_APPEND_UNDERSCORE}|" \ |
|
610 -e "s|%F77_APPEND_EXTRA_UNDERSCORE%|${F77_APPEND_EXTRA_UNDERSCORE}|" > $@-t |
6152
|
611 $(simple-move-if-change-rule) |
6102
|
612 endef |
|
613 |
5597
|
614 define do-mkpkgadd |
|
615 $(top_srcdir)/mkpkgadd $(srcdir) > PKG_ADD.t |
|
616 if [ -n "`cat PKG_ADD.t`" ]; then \ |
|
617 mv PKG_ADD.t PKG_ADD ; \ |
|
618 else \ |
|
619 rm -f PKG_ADD.t ; \ |
|
620 fi |
|
621 endef |
|
622 |
4227
|
623 define do-script-install |
4413
|
624 $(top_srcdir)/mkinstalldirs \ |
|
625 $(addprefix $(DESTDIR), $(fcnfiledir)/$(script_sub_dir)) |
6279
|
626 for f in $(FCN_FILES); do \ |
|
627 fbase=`basename $$f`; \ |
|
628 rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$fbase; \ |
|
629 $(INSTALL_DATA) $$f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$fbase; \ |
4227
|
630 done |
4413
|
631 $(top_srcdir)/mkpkgadd $(DESTDIR)$(fcnfiledir)/$(script_sub_dir) > $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t |
|
632 if [ -n "`cat $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t`" ]; then \ |
|
633 mv $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD ; \ |
4227
|
634 else \ |
4413
|
635 rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t ; \ |
4227
|
636 fi |
|
637 endef |
|
638 |
|
639 define do-script-uninstall |
|
640 for f in $(FCN_FILES_NO_DIR); \ |
4413
|
641 do rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \ |
4227
|
642 done |
6366
|
643 rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD |
6654
|
644 -rmdir $(addprefix $(DESTDIR), $(fcnfiledir)/$(script_sub_dir)) |
4227
|
645 endef |