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