860
|
1 # @configure_input@ |
5
|
2 # |
|
3 # Common configuration rules for all of octave's Makefiles. |
|
4 # |
|
5 # John W. Eaton |
1450
|
6 # jwe@bevo.che.wisc.edu |
|
7 # University of Wisconsin-Madison |
5
|
8 # Department of Chemical Engineering |
1450
|
9 |
5
|
10 SHELL = /bin/sh |
|
11 |
4544
|
12 AWK = @AWK@ |
|
13 export AWK |
|
14 |
4084
|
15 SED = @SED@ |
4299
|
16 export SED |
4084
|
17 |
5465
|
18 PERL = @PERL@ |
5495
|
19 PYTHON = @PYTHON@ |
5465
|
20 |
5468
|
21 DESKTOP_FILE_INSTALL = @DESKTOP_FILE_INSTALL@ |
|
22 |
3029
|
23 # A shell command to extract the version number from version.h. |
4449
|
24 getversion = $(SED) -e '/OCTAVE_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q |
|
25 |
|
26 # A shell command to extract the API version number from version.h. |
|
27 getapiversion = $(SED) -e '/OCTAVE_API_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q |
3029
|
28 |
|
29 # Look for version.h to get version information. |
|
30 xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h |
|
31 version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file)))) |
|
32 version := $(shell $(getversion) $(version_file)) |
5658
|
33 api_version := $(shell $(getapiversion) $(version_file)) |
3029
|
34 |
5
|
35 #### Start of system configuration section. #### |
|
36 |
3892
|
37 EXEEXT = @EXEEXT@ |
2577
|
38 |
4098
|
39 BUILD_EXEEXT = @BUILD_EXEEXT@ |
|
40 |
5
|
41 LEX = @LEX@ |
|
42 LFLAGS = @LFLAGS@ |
|
43 LEXLIB = @LEXLIB@ |
|
44 |
|
45 YACC = @YACC@ |
|
46 YFLAGS = -dv |
|
47 |
3675
|
48 GPERF = @GPERF@ |
|
49 |
1462
|
50 AR = @AR@ |
|
51 ARFLAGS = @ARFLAGS@ |
|
52 |
3775
|
53 TEMPLATE_AR = @TEMPLATE_AR@ |
|
54 TEMPLATE_ARFLAGS = @TEMPLATE_ARFLAGS@ |
|
55 |
5
|
56 RANLIB = @RANLIB@ |
|
57 |
1722
|
58 LN_S = @LN_S@ |
|
59 |
5
|
60 RUNTEST = @RUNTEST@ |
|
61 |
5934
|
62 MAKEINFO = @MAKEINFO@ |
|
63 TEXI2DVI = @TEXI2DVI@ |
|
64 TEXI2PDF = @TEXI2PDF@ |
|
65 |
6116
|
66 # Both texi2dvi and texi2pdf check COMSPEC to decide what path |
|
67 # separator to use. We build Octave with a Unixy shell, even on |
|
68 # Windows sytems, so we need to unset COMSPEC when invoking these |
|
69 # scripts. Used in the doc/*/Makefiles. |
|
70 ifneq ($(COMSPEC),) |
|
71 UNSETCOMSPEC = COMSPEC= |
|
72 endif |
|
73 |
5934
|
74 GHOSTSCRIPT = @GHOSTSCRIPT@ |
2518
|
75 |
5
|
76 DEFAULT_PAGER = @DEFAULT_PAGER@ |
|
77 |
4128
|
78 ENABLE_DYNAMIC_LINKING = @ENABLE_DYNAMIC_LINKING@ |
702
|
79 |
3034
|
80 STATIC_LIBS = @STATIC_LIBS@ |
|
81 |
1679
|
82 SHARED_LIBS = @SHARED_LIBS@ |
|
83 SHLEXT = @SHLEXT@ |
4126
|
84 SHLEXT_VER = @SHLEXT_VER@ |
4102
|
85 SHLLIB = @SHLLIB@ |
4627
|
86 SHLLIB_VER = @SHLLIB_VER@ |
4102
|
87 SHLBIN = @SHLBIN@ |
4126
|
88 SHLBIN_VER = @SHLBIN_VER@ |
|
89 SHLLINKEXT= |
4102
|
90 |
3029
|
91 LIBEXT = a |
6051
|
92 LIBPRE = @LIBPRE@ |
1667
|
93 |
5
|
94 # Fortran to C translator and associated flags. |
|
95 |
|
96 F2C = @F2C@ |
|
97 F2CFLAGS = @F2CFLAGS@ |
|
98 |
|
99 # Fortran compiler flags. |
|
100 |
1163
|
101 FC = @FC@ |
798
|
102 F77 = @F77@ |
5
|
103 FFLAGS = @FFLAGS@ |
1832
|
104 FPICFLAG = @FPICFLAG@ |
2610
|
105 ALL_FFLAGS = $(FFLAGS) |
5498
|
106 F77_FLOAT_STORE_FLAG = @F77_FLOAT_STORE_FLAG@ |
5
|
107 |
6102
|
108 F77_TOLOWER=@F77_TOLOWER@ |
|
109 F77_APPEND_UNDERSCORE=@F77_TOLOWER@ |
|
110 F77_APPEND_EXTRA_UNDERSCORE=@F77_TOLOWER@ |
|
111 |
5
|
112 # cc and associated flags. |
|
113 |
2064
|
114 DLFCN_INCFLAGS = @DLFCN_INCFLAGS@ |
|
115 |
236
|
116 # Clean up INCFLAGS a bit if we are not compiling in a separate |
|
117 # directory. |
|
118 ifeq ($(srcdir),.) |
2546
|
119 TMP_IF_1 = -I. |
236
|
120 else |
2546
|
121 TMP_IF_1 = -I. -I$(srcdir) |
236
|
122 endif |
404
|
123 ifeq ($(TOPDIR),$(top_srcdir)) |
5164
|
124 TMP_IF_2 = \ |
|
125 -I$(TOPDIR) \ |
|
126 -I$(TOPDIR)/liboctave \ |
|
127 -I$(TOPDIR)/src \ |
|
128 -I$(TOPDIR)/libcruft/misc |
236
|
129 else |
5164
|
130 TMP_IF_2 = \ |
|
131 -I$(TOPDIR) \ |
|
132 -I$(TOPDIR)/liboctave \ |
|
133 -I$(TOPDIR)/src \ |
|
134 -I$(TOPDIR)/libcruft/misc \ |
|
135 -I$(top_srcdir) \ |
|
136 -I$(top_srcdir)/liboctave \ |
|
137 -I$(top_srcdir)/src \ |
|
138 -I$(top_srcdir)/libcruft/misc |
236
|
139 endif |
5169
|
140 INCFLAGS = $(TMP_IF_1) $(TMP_IF_2) $(DLFCN_INCFLAGS) |
236
|
141 |
5
|
142 LIBFLAGS = -L$(TOPDIR) |
236
|
143 |
5
|
144 DEFS = @DEFS@ |
|
145 |
2032
|
146 UGLY_DEFS = @UGLY_DEFS@ |
|
147 |
5
|
148 CC = @CC@ |
1891
|
149 CC_VERSION = @CC_VERSION@ |
5
|
150 CFLAGS = @CFLAGS@ |
1832
|
151 CPICFLAG = @CPICFLAG@ |
3126
|
152 XTRA_CFLAGS = @XTRA_CFLAGS@ |
4626
|
153 WARN_CFLAGS = @WARN_CFLAGS@ |
6141
|
154 ALL_CFLAGS = $(INCFLAGS) $(DLL_CDEFS) $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) |
4626
|
155 BUG_CFLAGS = $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) |
798
|
156 |
4094
|
157 BUILD_CC = @BUILD_CC@ |
|
158 BUILD_CFLAGS = @BUILD_CFLAGS@ |
4093
|
159 |
3775
|
160 DEPEND_FLAGS = @DEPEND_FLAGS@ |
|
161 DEPEND_EXTRA_SED_PATTERN = @DEPEND_EXTRA_SED_PATTERN@ |
6087
|
162 INCLUDE_DEPS = @INCLUDE_DEPS@ |
|
163 ifeq ($(INCLUDE_DEPS),false) |
|
164 omit_deps = true; |
|
165 endif |
3775
|
166 |
198
|
167 CXX = @CXX@ |
1891
|
168 CXX_VERSION = @CXX_VERSION@ |
518
|
169 CXXCPP = @CXXCPP@ |
198
|
170 CXXFLAGS = @CXXFLAGS@ |
1832
|
171 CXXPICFLAG = @CXXPICFLAG@ |
3126
|
172 XTRA_CXXFLAGS = @XTRA_CXXFLAGS@ |
4626
|
173 WARN_CXXFLAGS = @WARN_CXXFLAGS@ |
|
174 ALL_CXXFLAGS = \ |
6141
|
175 $(INCFLAGS) $(DLL_CXXDEFS) $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) |
4626
|
176 BUG_CXXFLAGS = $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) |
5
|
177 |
4094
|
178 BUILD_CXX = @BUILD_CXX@ |
|
179 BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ |
4093
|
180 |
858
|
181 CPPFLAGS = @CPPFLAGS@ |
|
182 |
3705
|
183 LD_CXX = @LD_CXX@ |
5
|
184 LDFLAGS = @LDFLAGS@ |
708
|
185 LD_STATIC_FLAG = @LD_STATIC_FLAG@ |
3887
|
186 ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS) |
5
|
187 |
4298
|
188 BUILD_LDFLAGS = @BUILD_LDFLAGS@ |
|
189 |
2676
|
190 SH_LD = @SH_LD@ |
|
191 SH_LDFLAGS = @SH_LDFLAGS@ |
|
192 |
4759
|
193 DL_LD = @DL_LD@ |
|
194 DL_LDFLAGS = @DL_LDFLAGS@ |
|
195 |
3036
|
196 SONAME_FLAGS = @SONAME_FLAGS@ |
|
197 |
3233
|
198 RDYNAMIC_FLAG = @RDYNAMIC_FLAG@ |
|
199 |
2674
|
200 RLD_FLAG = @RLD_FLAG@ |
|
201 |
5
|
202 FLIBS = @FLIBS@ |
708
|
203 |
2930
|
204 LIBDLFCN = @LIBDLFCN@ |
5451
|
205 LIBGLOB = @LIBGLOB@ |
3156
|
206 LIBOCTINTERP = @LIBOCTINTERP@ |
|
207 LIBOCTAVE = @LIBOCTAVE@ |
|
208 LIBCRUFT = @LIBCRUFT@ |
4102
|
209 LIBREADLINE = @LIBREADLINE@ |
|
210 TERMLIBS = @TERMLIBS@ |
3726
|
211 |
5585
|
212 REGEX_LIBS = @REGEX_LIBS@ |
3726
|
213 BLAS_LIBS = @BLAS_LIBS@ |
3827
|
214 FFTW_LIBS = @FFTW_LIBS@ |
5235
|
215 GLPK_LIBS = @GLPK_LIBS@ |
6043
|
216 CURL_LIBS = @CURL_LIBS@ |
5451
|
217 AMD_LIBS = @AMD_LIBS@ |
6024
|
218 CAMD_LIBS = @CAMD_LIBS@ |
5270
|
219 UMFPACK_LIBS = @UMFPACK_LIBS@ |
5451
|
220 COLAMD_LIBS = @COLAMD_LIBS@ |
|
221 CCOLAMD_LIBS = @CCOLAMD_LIBS@ |
|
222 CHOLMOD_LIBS = @CHOLMOD_LIBS@ |
5610
|
223 CXSPARSE_LIBS = @CXSPARSE_LIBS@ |
3726
|
224 LIBS = @LIBS@ |
5
|
225 |
5275
|
226 USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@ |
|
227 |
5708
|
228 TEXINFO_COLAMD = @TEXINFO_COLAMD@ |
|
229 TEXINFO_CHOLMOD = @TEXINFO_CHOLMOD@ |
|
230 TEXINFO_UMFPACK = @TEXINFO_UMFPACK@ |
|
231 |
2155
|
232 # The arguments passed to configure. |
2156
|
233 config_opts = @config_opts@ |
2155
|
234 |
666
|
235 # ==================== Where To Install Things ==================== |
5
|
236 |
666
|
237 # The default location for installation. Everything is placed in |
|
238 # subdirectories of this directory. The default values for many of |
|
239 # the variables below are expressed in terms of this one, so you may |
|
240 # not need to change them. This defaults to /usr/local. |
|
241 prefix = @prefix@ |
5
|
242 |
666
|
243 # Like `prefix', but used for architecture-specific files. |
|
244 exec_prefix = @exec_prefix@ |
|
245 |
|
246 # Where to install Octave and other binaries that people will want to |
|
247 # run directly. |
|
248 bindir = @bindir@ |
5
|
249 |
4411
|
250 # Normally the directory for installing executables that system |
|
251 # administrators run. This is the same as libexecdir on Cygwin systems. |
|
252 sbindir = @sbindir@ |
|
253 |
5844
|
254 # The root of the directory tree for read-only |
|
255 # architecture-independent data files. |
|
256 datarootdir = @datarootdir@ |
|
257 |
666
|
258 # Where to install architecture-independent data files. ${fcnfiledir} |
|
259 # and ${localfcnfiledir} are subdirectories of this. |
|
260 datadir = @datadir@ |
5
|
261 |
3141
|
262 libdir = @libdir@ |
|
263 |
666
|
264 # Where to install and expect libraries like libcruft.a, liboctave.a, |
3141
|
265 # and other architecture-dependent data. |
|
266 octlibdir = @octlibdir@ |
5
|
267 |
1720
|
268 # Where to install and expect executable programs to be run by Octave |
|
269 # rather than directly by users. |
|
270 libexecdir = @libexecdir@ |
|
271 |
2141
|
272 # The prefix for Octave's include file directory. The default is |
|
273 # ${prefix}/include |
2223
|
274 includedir = @includedir@ |
2141
|
275 |
666
|
276 # Where to install Octave's man pages, and what extension they should |
|
277 # have. The default is ${prefix}/man/man1 |
|
278 mandir = @mandir@ |
2223
|
279 man1dir = @man1dir@ |
|
280 man1ext = @man1ext@ |
5
|
281 |
666
|
282 # Where to install and expect the info files describing Octave.. |
|
283 infodir = @infodir@ |
|
284 |
2512
|
285 # The fill path to the default info file. |
|
286 infofile = @infofile@ |
|
287 |
666
|
288 # ==================== Octave-specific directories ==================== |
|
289 |
2993
|
290 # These variables hold the values specific to Octave. They are |
666
|
291 # based on the values of the standard Make variables above. |
|
292 |
5451
|
293 # What is the path separation character |
|
294 sepchar = @sepchar@ |
|
295 |
3597
|
296 # Where to install Octave's include files (they will actually be |
|
297 # installed in a subdirectory called octave). The default is |
2993
|
298 # ${includedir}/octave-${version} |
|
299 octincludedir = @octincludedir@ |
|
300 |
666
|
301 # Where to install the function file distributed with |
|
302 # Octave. This includes the Octave version, so that the |
|
303 # function files for different versions of Octave will install |
|
304 # themselves in separate directories. |
|
305 fcnfiledir = @fcnfiledir@ |
|
306 |
|
307 # Directories Octave should search for function files specific |
|
308 # to this site (i.e. customizations), before consulting |
|
309 # ${fcnfiledir}. This should be a colon-separated list of |
|
310 # directories. |
827
|
311 localfcnfiledir = @localfcnfiledir@ |
4449
|
312 localapifcnfiledir = @localapifcnfiledir@ |
3597
|
313 localverfcnfiledir = @localverfcnfiledir@ |
5
|
314 |
666
|
315 # Where to put executables to be run by Octave rather than |
|
316 # the user. This path usually includes the Octave version |
|
317 # and configuration name, so that multiple configurations |
|
318 # for multiple versions of Octave may be installed at once. |
|
319 archlibdir = @archlibdir@ |
|
320 |
2439
|
321 # Where to put executables to be run by Octave rather than by the |
|
322 # user that are specific to this site. |
|
323 localarchlibdir = @localarchlibdir@ |
5909
|
324 localapiarchlibdir = @localapiarchlibdir@ |
3597
|
325 localverarchlibdir = @localverarchlibdir@ |
2439
|
326 |
666
|
327 # Where to put object files that will by dynamically loaded. |
|
328 # This path usually includes the Octave version and configuration |
|
329 # name, so that multiple configurations for multiple versions of |
|
330 # Octave may be installed at once. |
|
331 octfiledir = @octfiledir@ |
5
|
332 |
666
|
333 # Directories Octave should search for object files that will be |
|
334 # dynamically loaded and that are specific to this site |
|
335 # (i.e. customizations), before consulting ${octfiledir}. This should |
|
336 # be a colon-separated list of directories. |
827
|
337 localoctfiledir = @localoctfiledir@ |
4449
|
338 localapioctfiledir = @localapioctfiledir@ |
3597
|
339 localveroctfiledir = @localveroctfiledir@ |
666
|
340 |
5814
|
341 # Where Octave will search to find image files. |
827
|
342 imagedir = @imagedir@ |
685
|
343 |
5
|
344 # The type of computer we are running on. |
3136
|
345 canonical_host_type = @canonical_host_type@ |
5
|
346 |
4443
|
347 # Where Octave will look for startup files |
|
348 startupfiledir = ${fcnfiledir}/startup |
|
349 localstartupfiledir = ${localfcnfiledir}/startup |
|
350 |
6028
|
351 # LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PATH, ... |
|
352 library_path_var = @library_path_var@ |
|
353 |
3591
|
354 # The -I flags to use for the mkoctfile script. |
4302
|
355 ifeq ($(includedir),/usr/include) |
4301
|
356 MKOCTFILE_INCFLAGS = \ |
|
357 -I$(octincludedir) -I$(octincludedir)/octave |
|
358 else |
|
359 MKOCTFILE_INCFLAGS = \ |
|
360 -I$(octincludedir) -I$(octincludedir)/octave -I$(includedir) |
|
361 endif |
3591
|
362 |
3859
|
363 # The -L flags to use for the mkoctfile scrip (for --link-stand-alone) |
|
364 MKOCTFILE_LFLAGS = -L$(octlibdir) |
|
365 |
4761
|
366 MKOCTFILE_DL_LDFLAGS = @MKOCTFILE_DL_LDFLAGS@ |
4199
|
367 |
|
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}\"|" \ |
|
498 -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \ |
|
499 -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \ |
|
500 -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \ |
|
501 -e "s|%OCTAVE_CONF_LEX%|\"${LEX}\"|" \ |
|
502 -e "s|%OCTAVE_CONF_LEXLIB%|\"${LEXLIB}\"|" \ |
|
503 -e "s|%OCTAVE_CONF_LFLAGS%|\"${LFLAGS}\"|" \ |
|
504 -e "s|%OCTAVE_CONF_LIBCRUFT%|\"${LIBCRUFT}\"|" \ |
|
505 -e "s|%OCTAVE_CONF_LIBDLFCN%|\"${LIBDLFCN}\"|" \ |
|
506 -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \ |
|
507 -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \ |
|
508 -e "s|%OCTAVE_CONF_LIBGLOB%|\"${LIBGLOB}\"|" \ |
|
509 -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \ |
|
510 -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \ |
|
511 -e "s|%OCTAVE_CONF_LIBREADLINE%|\"${LIBREADLINE}\"|" \ |
|
512 -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \ |
|
513 -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \ |
|
514 -e "s|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"${MKOCTFILE_DL_LDFLAGS}\"|" \ |
|
515 -e "s|%OCTAVE_CONF_MKOCTFILE_INCFLAGS%|\"${MKOCTFILE_INCFLAGS}\"|" \ |
|
516 -e "s|%OCTAVE_CONF_MKOCTFILE_LFLAGS%|\"${MKOCTFILE_LFLAGS}\"|" \ |
|
517 -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \ |
|
518 -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \ |
|
519 -e "s|%OCTAVE_CONF_RLD_FLAG%|\"${RLD_FLAG}\"|" \ |
|
520 -e "s|%OCTAVE_CONF_RUNTEST%|\"${RUNTEST}\"|" \ |
|
521 -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \ |
|
522 -e "s|%OCTAVE_CONF_SHARED_LIBS%|\"${SHARED_LIBS}\"|" \ |
|
523 -e "s|%OCTAVE_CONF_SHLEXT%|\"${SHLEXT}\"|" \ |
|
524 -e "s|%OCTAVE_CONF_SHLLINKEXT%|\"${SHLLINKEXT}\"|" \ |
|
525 -e "s|%OCTAVE_CONF_SHLEXT_VER%|\"${SHLEXT_VER}\"|" \ |
|
526 -e "s|%OCTAVE_CONF_SH_LD%|\"${SH_LD}\"|" \ |
|
527 -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \ |
|
528 -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \ |
|
529 -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \ |
|
530 -e "s|%OCTAVE_CONF_UGLY_DEFS%|\"${UGLY_DEFS}\"|" \ |
|
531 -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \ |
|
532 -e "s|%OCTAVE_CONF_VERSION%|\"${version}\"|" \ |
|
533 -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \ |
|
534 -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \ |
|
535 -e "s|%OCTAVE_CONF_XTRA_CXXFLAGS%|\"${XTRA_CXXFLAGS}\"|" \ |
|
536 -e "s|%OCTAVE_CONF_YACC%|\"${YACC}\"|" \ |
|
537 -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \ |
|
538 -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" | \ |
|
539 $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t |
6152
|
540 $(simple-move-if-change-rule) |
2157
|
541 endef |
|
542 |
|
543 define do-subst-default-vals |
2223
|
544 echo "making $@ from $<" |
4084
|
545 $(SED) < $< > $@-t \ |
5451
|
546 -e "s|%OCTAVE_ARCHLIBDIR%|\"${archlibdir}\"|" \ |
|
547 -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \ |
|
548 -e "s|%OCTAVE_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \ |
|
549 -e "s|%OCTAVE_DATADIR%|\"${datadir}\"|" \ |
5847
|
550 -e "s|%OCTAVE_DATAROOTDIR%|\"${datarootdir}\"|" \ |
5451
|
551 -e "s|%OCTAVE_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \ |
|
552 -e "s|%OCTAVE_EXEC_PREFIX%|\"${exec_prefix}\"|" \ |
|
553 -e "s|%OCTAVE_FCNFILEDIR%|\"${fcnfiledir}\"|" \ |
|
554 -e "s|%OCTAVE_IMAGEDIR%|\"${imagedir}\"|" \ |
|
555 -e "s|%OCTAVE_INCLUDEDIR%|\"${includedir}\"|" \ |
|
556 -e "s|%OCTAVE_INFODIR%|\"${infodir}\"|" \ |
|
557 -e "s|%OCTAVE_INFOFILE%|\"${infofile}\"|" \ |
|
558 -e "s|%OCTAVE_LIBDIR%|\"${libdir}\"|" \ |
|
559 -e "s|%OCTAVE_LIBEXECDIR%|\"${libexecdir}\"|" \ |
|
560 -e "s|%OCTAVE_LOCALAPIFCNFILEDIR%|\"${localapifcnfiledir}\"|" \ |
|
561 -e "s|%OCTAVE_LOCALAPIOCTFILEDIR%|\"${localapioctfiledir}\"|" \ |
|
562 -e "s|%OCTAVE_LOCALARCHLIBDIR%|\"${localarchlibdir}\"|" \ |
|
563 -e "s|%OCTAVE_LOCALFCNFILEDIR%|\"${localfcnfiledir}\"|" \ |
|
564 -e "s|%OCTAVE_LOCALOCTFILEDIR%|\"${localoctfiledir}\"|" \ |
|
565 -e "s|%OCTAVE_LOCALSTARTUPFILEDIR%|\"${localstartupfiledir}\"|" \ |
5909
|
566 -e "s|%OCTAVE_LOCALAPIARCHLIBDIR%|\"${localapiarchlibdir}\"|" \ |
5451
|
567 -e "s|%OCTAVE_LOCALVERARCHLIBDIR%|\"${localverarchlibdir}\"|" \ |
|
568 -e "s|%OCTAVE_LOCALVERFCNFILEDIR%|\"${localverfcnfiledir}\"|" \ |
|
569 -e "s|%OCTAVE_LOCALVEROCTFILEDIR%|\"${localveroctfiledir}\"|" \ |
|
570 -e "s|%OCTAVE_MAN1DIR%|\"${man1dir}\"|" \ |
|
571 -e "s|%OCTAVE_MAN1EXT%|\"${man1ext}\"|" \ |
|
572 -e "s|%OCTAVE_MANDIR%|\"${mandir}\"|" \ |
|
573 -e "s|%OCTAVE_OCTFILEDIR%|\"${octfiledir}\"|" \ |
|
574 -e "s|%OCTAVE_OCTINCLUDEDIR%|\"${octincludedir}\"|" \ |
|
575 -e "s|%OCTAVE_OCTLIBDIR%|\"${octlibdir}\"|" \ |
|
576 -e "s|%OCTAVE_STARTUPFILEDIR%|\"${startupfiledir}\"|" \ |
|
577 -e "s|%OCTAVE_PREFIX%|\"${prefix}\"|" \ |
5658
|
578 -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \ |
|
579 -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \ |
5451
|
580 -e "s|%OCTAVE_VERSION%|\"${version}\"|" |
6152
|
581 $(simple-move-if-change-rule) |
2157
|
582 endef |
4227
|
583 |
5708
|
584 define do-subst-texinfo-vals |
|
585 echo "making $@ from $<" |
|
586 $(SED) < $< \ |
|
587 -e "s|%OCTAVE_HOME%|${prefix}|" \ |
|
588 -e "s|%OCTAVE_VERSION%|${version}|" \ |
|
589 -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \ |
|
590 -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \ |
|
591 -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" | \ |
5942
|
592 $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t |
6152
|
593 $(simple-move-if-change-rule) |
5708
|
594 endef |
|
595 |
5776
|
596 define do-subst-script-vals |
|
597 echo "making $@ from $<" |
|
598 $(SED) < $< \ |
6028
|
599 -e "s|%library_path_var%|${library_path_var}|g" \ |
6155
|
600 -e "s|%liboctinterp%|${LIBPRE}octinterp.${SHLEXT}|g" \ |
|
601 -e "s|%liboctave%|${LIBPRE}octave.${SHLEXT}|g" \ |
|
602 -e "s|%libcruft%|${LIBPRE}cruft.${SHLEXT}|g" \ |
5776
|
603 -e "s|%srcdir%|${srcdir}|" \ |
|
604 -e "s|%top_srcdir%|${top_srcdir}|" \ |
5793
|
605 -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \ |
5776
|
606 -e "s|%builddir%|$(shell pwd)|" > $@-t |
6152
|
607 $(simple-move-if-change-rule) |
5776
|
608 endef |
|
609 |
6102
|
610 define do-subst-f77-mangling |
|
611 echo "making $@ from $<" |
|
612 $(SED) < $< \ |
|
613 -e "s|%F77_TOLOWER%|${F77_TOLOWER}|g" \ |
|
614 -e "s|%F77_APPEND_UNDERSCORE%|${F77_APPEND_UNDERSCORE}|" \ |
|
615 -e "s|%F77_APPEND_EXTRA_UNDERSCORE%|${F77_APPEND_EXTRA_UNDERSCORE}|" > $@-t |
6152
|
616 $(simple-move-if-change-rule) |
6102
|
617 endef |
|
618 |
5597
|
619 define do-mkpkgadd |
|
620 $(top_srcdir)/mkpkgadd $(srcdir) > PKG_ADD.t |
|
621 if [ -n "`cat PKG_ADD.t`" ]; then \ |
|
622 mv PKG_ADD.t PKG_ADD ; \ |
|
623 else \ |
|
624 rm -f PKG_ADD.t ; \ |
|
625 fi |
|
626 endef |
|
627 |
4227
|
628 define do-script-install |
4413
|
629 $(top_srcdir)/mkinstalldirs \ |
|
630 $(addprefix $(DESTDIR), $(fcnfiledir)/$(script_sub_dir)) |
4227
|
631 for f in $(FCN_FILES_NO_DIR); do \ |
4413
|
632 rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \ |
|
633 $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \ |
4227
|
634 done |
4413
|
635 $(top_srcdir)/mkpkgadd $(DESTDIR)$(fcnfiledir)/$(script_sub_dir) > $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t |
|
636 if [ -n "`cat $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t`" ]; then \ |
|
637 mv $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD ; \ |
4227
|
638 else \ |
4413
|
639 rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t ; \ |
4227
|
640 fi |
|
641 endef |
|
642 |
|
643 define do-script-uninstall |
|
644 for f in $(FCN_FILES_NO_DIR); \ |
4413
|
645 do rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \ |
4227
|
646 done |
|
647 endef |