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