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