Mercurial > hg > octave-lyh
comparison scripts/miscellaneous/mkoctfile.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | d6619410e79c |
children | 2090995ca588 |
comparison
equal
deleted
inserted
replaced
11586:12df7854fa7c | 11587:c792872f8942 |
---|---|
16 ## along with Octave; see the file COPYING. If not, see | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Command} {} mkoctfile [-options] file @dots{} | 20 ## @deftypefn {Command} {} mkoctfile [-options] file @dots{} |
21 ## | 21 ## |
22 ## The @code{mkoctfile} function compiles source code written in C, | 22 ## The @code{mkoctfile} function compiles source code written in C, |
23 ## C++, or Fortran. Depending on the options used with @code{mkoctfile}, the | 23 ## C++, or Fortran. Depending on the options used with @code{mkoctfile}, the |
24 ## compiled code can be called within Octave or can be used as a stand-alone | 24 ## compiled code can be called within Octave or can be used as a stand-alone |
25 ## application. | 25 ## application. |
26 ## | 26 ## |
37 ## @item -D DEF | 37 ## @item -D DEF |
38 ## Add the definition DEF to the compiler call. | 38 ## Add the definition DEF to the compiler call. |
39 ## | 39 ## |
40 ## @item -l LIB | 40 ## @item -l LIB |
41 ## Add the library LIB to the link command. | 41 ## Add the library LIB to the link command. |
42 ## | 42 ## |
43 ## @item -L DIR | 43 ## @item -L DIR |
44 ## Add the library directory DIR to the link command. | 44 ## Add the library directory DIR to the link command. |
45 ## | 45 ## |
46 ## @item -M | 46 ## @item -M |
47 ## @itemx --depend | 47 ## @itemx --depend |
48 ## Generate dependency files (.d) for C and C++ source files. | 48 ## Generate dependency files (.d) for C and C++ source files. |
49 ## | 49 ## |
50 ## @item -R DIR | 50 ## @item -R DIR |
51 ## Add the run-time path to the link command. | 51 ## Add the run-time path to the link command. |
52 ## | 52 ## |
63 ## | 63 ## |
64 ## @item -g | 64 ## @item -g |
65 ## Enable debugging options for compilers. | 65 ## Enable debugging options for compilers. |
66 ## | 66 ## |
67 ## @item -o FILE | 67 ## @item -o FILE |
68 ## @itemx --output FILE | 68 ## @itemx --output FILE |
69 ## Output file name. Default extension is .oct | 69 ## Output file name. Default extension is .oct |
70 ## (or .mex if --mex is specified) unless linking | 70 ## (or .mex if --mex is specified) unless linking |
71 ## a stand-alone executable. | 71 ## a stand-alone executable. |
72 ## | 72 ## |
73 ## @item -p VAR | 73 ## @item -p VAR |
74 ## @itemx --print VAR | 74 ## @itemx --print VAR |
75 ## Print the configuration variable VAR@. Recognized variables are: | 75 ## Print the configuration variable VAR@. Recognized variables are: |
76 ## | 76 ## |
77 ## @example | 77 ## @example |
78 ## ALL_CFLAGS FFTW_LIBS | 78 ## ALL_CFLAGS FFTW_LIBS |
79 ## ALL_CXXFLAGS FLIBS | 79 ## ALL_CXXFLAGS FLIBS |
80 ## ALL_FFLAGS FPICFLAG | 80 ## ALL_FFLAGS FPICFLAG |
81 ## ALL_LDFLAGS INCFLAGS | 81 ## ALL_LDFLAGS INCFLAGS |
82 ## BLAS_LIBS LDFLAGS | 82 ## BLAS_LIBS LDFLAGS |
83 ## CC LD_CXX | 83 ## CC LD_CXX |
84 ## CFLAGS LD_STATIC_FLAG | 84 ## CFLAGS LD_STATIC_FLAG |
85 ## CPICFLAG LFLAGS | 85 ## CPICFLAG LFLAGS |
86 ## CPPFLAGS LIBCRUFT | 86 ## CPPFLAGS LIBCRUFT |
87 ## CXX LIBOCTAVE | 87 ## CXX LIBOCTAVE |
88 ## CXXFLAGS LIBOCTINTERP | 88 ## CXXFLAGS LIBOCTINTERP |
89 ## CXXPICFLAG LIBREADLINE | 89 ## CXXPICFLAG LIBREADLINE |
90 ## DEPEND_EXTRA_SED_PATTERN LIBS | 90 ## DEPEND_EXTRA_SED_PATTERN LIBS |
91 ## DEPEND_FLAGS OCTAVE_LIBS | 91 ## DEPEND_FLAGS OCTAVE_LIBS |
92 ## DL_LD RDYNAMIC_FLAG | 92 ## DL_LD RDYNAMIC_FLAG |
93 ## DL_LDFLAGS RLD_FLAG | 93 ## DL_LDFLAGS RLD_FLAG |
94 ## F2C SED | 94 ## F2C SED |
95 ## F2CFLAGS XTRA_CFLAGS | 95 ## F2CFLAGS XTRA_CFLAGS |
96 ## F77 XTRA_CXXFLAGS | 96 ## F77 XTRA_CXXFLAGS |
97 ## FFLAGS | 97 ## FFLAGS |
98 ## @end example | 98 ## @end example |
99 ## | 99 ## |
100 ## @item --link-stand-alone | 100 ## @item --link-stand-alone |
101 ## Link a stand-alone executable file. | 101 ## Link a stand-alone executable file. |
102 ## | 102 ## |
103 ## @item --mex | 103 ## @item --mex |
104 ## Assume we are creating a MEX file. Set the default output extension | 104 ## Assume we are creating a MEX file. Set the default output extension |
105 ## to ".mex". | 105 ## to ".mex". |
106 ## | 106 ## |
107 ## @item -s | 107 ## @item -s |
108 ## @itemx --strip | 108 ## @itemx --strip |
109 ## Strip the output file. | 109 ## Strip the output file. |
141 | 141 |
142 cmd = cstrcat ("\"", shell_script, "\""); | 142 cmd = cstrcat ("\"", shell_script, "\""); |
143 for i = 1:nargin | 143 for i = 1:nargin |
144 cmd = cstrcat (cmd, " \"", varargin{i}, "\""); | 144 cmd = cstrcat (cmd, " \"", varargin{i}, "\""); |
145 endfor | 145 endfor |
146 | 146 |
147 status = system (cmd); | 147 status = system (cmd); |
148 | 148 |
149 if (status == 127) | 149 if (status == 127) |
150 warning ("unable to find mkoctfile in expected location: `%s'", | 150 warning ("unable to find mkoctfile in expected location: `%s'", |
151 shell_script); | 151 shell_script); |