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