|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| examples/ | H | 08-Dec-2019 | - | 34,359 | 31,046 |
| ficl/ | H | 03-May-2022 | - | 14,353 | 8,538 |
| lib/ | H | 08-Dec-2019 | - | 7,713 | 5,418 |
| src/ | H | 08-Dec-2019 | - | 37,199 | 29,221 |
| tests/ | H | 08-Dec-2019 | - | 5,646 | 4,883 |
| AUTHORS | H A D | 12-Jan-2018 | 218 | 6 | 5 |
| COPYING | H A D | 25-Mar-2016 | 1.3 KiB | 24 | 21 |
| HISTORY | H A D | 07-Dec-2019 | 506 | 23 | 22 |
| Makefile.in | H A D | 07-Dec-2019 | 10.1 KiB | 376 | 310 |
| NEWS | H A D | 25-Nov-2019 | 915 | 37 | 25 |
| README | H A D | 08-Dec-2019 | 6.9 KiB | 244 | 194 |
| README.man | H A D | 08-Dec-2019 | 9.5 KiB | 354 | 353 |
| SConscript | H A D | 18-Nov-2019 | 5.3 KiB | 177 | 158 |
| SConstruct | H A D | 03-Dec-2019 | 16.6 KiB | 655 | 578 |
| aclocal.m4 | H A D | 03-Dec-2019 | 3.9 KiB | 101 | 87 |
| common.mk | H A D | 18-Nov-2019 | 2.8 KiB | 78 | 39 |
| config.guess | H A D | 07-Dec-2012 | 41.1 KiB | 1,408 | 1,211 |
| config.h | H A D | 22-Mar-2016 | 1.5 KiB | 35 | 2 |
| config.sub | H A D | 07-Dec-2012 | 29.6 KiB | 1,505 | 1,364 |
| configure | H A D | 03-Dec-2019 | 209.8 KiB | 7,628 | 6,293 |
| configure.ac | H A D | 03-Dec-2019 | 15.1 KiB | 463 | 435 |
| fth-config.h.in | H A D | 03-Dec-2019 | 3.1 KiB | 106 | 101 |
| fth.0 | H A D | 25-Nov-2019 | 185.2 KiB | 3,449 | 3,341 |
| fth.1 | H A D | 25-Nov-2019 | 172.4 KiB | 8,724 | 8,723 |
| fth.m4 | H A D | 19-Jan-2014 | 3.5 KiB | 98 | 93 |
| fth.sh.in | H A D | 23-Mar-2016 | 1.6 KiB | 37 | 4 |
| install-sh | H A D | 07-Dec-2012 | 13.3 KiB | 520 | 344 |
| libfth.0 | H A D | 07-Dec-2019 | 106.4 KiB | 1,456 | 1,383 |
| libfth.3 | H A D | 07-Dec-2019 | 75.5 KiB | 2,950 | 2,932 |
| mkinstalldirs | H A D | 07-Dec-2012 | 3.4 KiB | 162 | 112 |
| src-config.h.in | H A D | 03-Dec-2019 | 4.4 KiB | 169 | 163 |
| stamp-h.in | H A D | 07-Dec-2012 | 10 | 2 | 1 |
README
1README LOCAL README
2
3NAME
4 README - installation information for the Fth package
5
6INTRODUCTION
7 Fth is a software package which includes the interpreter fth and the
8 library libfth. You can write Forth scripts and interpret them with the
9 interpreter fth or you can link libfth into an application to use Fth as
10 extension language.
11
12 The core language of Fth is John Sadler's Forth-inspired command language
13 Ficl. Fth has object type extensions, for example array, hash, string,
14 regexp, bignum, ratio etc.
15
16WHERE IS FTH LOCATED?
17 You can get the latest archive from http://www.sf.net/projects/fth/. If
18 you prefer svn, you can get the source code from
19 svn.code.sf.net/p/fth/code/. Check out the source tree with
20
21 % svn co svn://svn.code.sf.net/p/fth/code/trunk fth
22
23 and update later with
24
25 % svn up
26
27 in the new fth directory.
28
29REQUIREMENTS
30 Tecla
31 The interactive Fth interpreter supports tcsh-like command-line editing
32 and history manipulation with the tecla(7) library. You can find a copy
33 at http://www.astro.caltech.edu/~mcs/tecla/libtecla-1.6.3.tar.gz. If you
34 won't use tecla(7), you can configure Fth without it, see CONFIGURE AND
35 BUILD FTH WITH SCONS.
36
37 64-Bit-NetBSD and Tecla
38 The libtecla package on NetBSD provides a static library libtecla.a. On
39 64-bit machines this package should be compiled with:
40
41 % cd /usr/pkgsrc/devel/libtecla
42 % env CFLAGS=-fPIC make install clean
43
44CONFIGURE AND BUILD FTH WITH SCONS
45 If you have the python(1) package scons(1), you can config, build and
46 install Fth with scons:
47
48 % scons install
49
50 or
51
52 % scons test install
53
54 You can set additional variables on the command line, see below for the
55 full set of variables:
56
57 % scons CC=clang CFLAGS='-fno-strict-aliasing' install
58
59 Scons for Fth has the following command line options. For the full list,
60 try
61
62 % scons -h
63
64 --prefix path
65 Installation prefix.
66 --build path
67 Build path, default ./build.
68 --tecla-prefix path
69 Search for tecla(7) in path/{include,lib}.
70 --program-prefix string
71 --program-suffix string
72 Prepend or append string to the installed program and library name.
73 More than one version of fth may be installed at the same time. You
74 can have different names, for example:
75
76 % scons --prefix=/usr/local --program-suffix=-1.4 test install
77
78 installs the interpreter as fth-1.4, the library as libfth-1.4.so,
79 creates a library path /usr/local/lib/fth-1.4 for local dynamic libs
80 and installs the header files in /usr/local/include/fth-1.4:
81
82 /usr/local/bin/fth-1.4
83 /usr/local/lib/libfth-1.4.so
84 /usr/local/lib/fth-1.4/
85 /usr/local/include/fth-1.4/
86
87 --enable-warnings
88 Enable extra C compiler warning flags.
89 --disable-shared
90 Disable shared library support.
91 --without-tecla
92 Do not use the tecla(7) command-line editing library.
93
94 Scons has the following targets:
95 install
96 Install the Fth package.
97 test
98 Test the Fth package.
99 uninstall
100 Uninstall all installed files.
101
102 % scons -c
103
104 is similar to `make clean'.
105
106 Scons handles command line variables. They can be mixed with command
107 line options as well:
108
109 % scons --prefix=/usr/opt CC=clang warnings=yes install
110
111 These variables can be also set in ${HOME}/.scons/fth.py as normal Python
112 variables. Strings have to be enclosed between single or double quotes
113 corresponding to Python requirements.
114
115 % cat ~/.scons/fth.py
116 CC = 'clang'
117 CFLAGS = '-fno-strict-aliasing'
118
119 Here is the full list of variables:
120 CC C Compiler, default cc.
121 CFLAGS
122 Additional CFLAGS, default empty.
123 LDFLAGS
124 Additional LDFLAGS, default empty.
125 build
126 Build path, default ./build.
127 prefix
128 Install prefix.
129 program_prefix
130 program_suffix
131 Prepend or append string to the fth program and library. See above
132 for an example.
133 tecla_prefix
134 tecla(7) prefix.
135 libtecla
136 Set to yes or no, default yes.
137 shared
138 Set to yes or no, default yes.
139 warnings
140 Set to yes or no, default no.
141
142CONFIGURE AND BUILD FTH THE OLD WAY
143 You may also configure and install Fth this way:
144
145 % ./configure
146 % make
147 % make test # optional
148 % make install
149
150 There are a few additional configure options which may be of interest.
151 See CONFIGURE AND BUILD FTH WITH SCONS for explanations of them. For
152 more, try:
153
154 % ./configure -h
155
156 --prefix path
157 --with-tecla-prefix path
158 --program-prefix string
159 --program-suffix string
160 --enable-warnings
161 --enable-maintainer-mode
162 --disable-shared
163 --without-tecla
164
165 The following make targets are provided:
166
167 all
168 clean
169 distclean
170 fth-shared
171 fth-static
172 install
173 install-shared
174 install-static
175 install-strip
176 maintainer-clean
177 test
178 uninstall
179
180 Testing with
181
182 make test
183
184 checks two environment variables:
185 FTH_TEST_IO
186 FTH_TEST_FILE
187 If set, the IO and File tests will be executed. These two tests may bear
188 problems so they are disabled by default.
189
190AUTOCONF MACRO FTH_CHECK_LIB
191 An application using the Fth package as extension language can detect
192 program and library using the autoconf macro FTH_CHECK_LIB which is
193 located in fth.m4. This macro tests if the interpreter fth can be found
194 in $PATH. If so, it tests if libfth contains complex and rational
195 numbers. Eventually it substitutes six variables for configure.ac.
196
197 After including FTH_CHECK_LIB in configure.ac call
198
199 aclocal && autoconf
200
201 to update aclocal.m4.
202 FTH Set to full path of the interpreter or "no", e.g.
203 "/usr/local/bin/fth".
204 FTH_VERSION
205 Set to version number of the Fth package or "no", e.g. "1.4.0".
206 FTH_CFLAGS
207 Set to include path or "no", e.g. "-I/usr/local/include/fth".
208 FTH_LIBS
209 Set to library path or "no", e.g. "-L/usr/local/lib -lfth".
210 FTH_HAVE_COMPLEX
211 Set to "yes" or "no".
212 FTH_HAVE_RATIO
213 Set to "yes" or "no".
214
215 Short configure.ac Example
216 AC_ARG_WITH([forth],
217 [AS_HELP_STRING([--with-forth],
218 [use Forth as the extension language])],
219 [if test "$withval" = yes ; then
220 FTH_CHECK_LIB([AC_DEFINE([HAVE_FORTH])])
221 fi])
222
223 Long configure.ac Example
224 AC_ARG_WITH([forth],
225 [AS_HELP_STRING([--with-forth],
226 [use Forth as the extension language])],
227 [if test "$withval" = yes ; then
228 FTH_CHECK_LIB([AC_DEFINE([HAVE_FORTH])
229 AC_DEFINE([HAVE_EXTENSION_LANGUAGE])
230 if test "$FTH_HAVE_COMPLEX" = yes ; then
231 AC_DEFINE([HAVE_COMPLEX_TRIG])
232 AC_DEFINE([HAVE_MAKE_COMPLEX])
233 AC_DEFINE([HAVE_MAKE_RECTANGULAR])
234 fi
235 if test "$FTH_HAVE_RATIO" = yes ; then
236 AC_DEFINE([HAVE_MAKE_RATIO])
237 fi
238 AC_SUBST(XEN_CFLAGS, $FTH_CFLAGS)
239 AC_SUBST(XEN_LIBS, $FTH_LIBS)
240 LOCAL_LANGUAGE="Forth"
241 ac_snd_have_extension_language=yes])
242 fi])
243
244
README.man
1.\" Copyright (c) 2012-2019 Michael Scholz <mi-scholz@users.sourceforge.net>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" @(#)README.man 1.40 12/8/19
26.\"
27.Dd 2019/12/08
28.Dt README
29.Os
30.\"
31.\" NAME
32.\"
33.Sh NAME
34.Nm README
35.Nd installation information for the Fth package
36.\"
37.\" INTRODUCTION
38.\"
39.Sh INTRODUCTION
40.Em Fth
41is a software package which includes the interpreter
42.Cm fth
43and the library
44.Cm libfth .
45You can write Forth scripts and interpret them with the interpreter
46.Cm fth
47or you can link
48.Cm libfth
49into an application to use Fth as extension language.
50.Pp
51The core language of Fth is John Sadler's Forth-inspired command
52language Ficl. Fth has object type extensions, for example array,
53hash, string, regexp, bignum, ratio etc.
54.\"
55.\" WHERE IS FTH LOCATED?
56.\"
57.Sh WHERE IS FTH LOCATED?
58You can get the latest archive from
59.Pa http://www.sf.net/projects/fth/ .
60If you prefer svn, you can get the source code from
61.Pa svn.code.sf.net/p/fth/code/ .
62Check out the source tree with
63.Pp
64.Dl % svn co svn://svn.code.sf.net/p/fth/code/trunk fth
65.Pp
66and update later with
67.Pp
68.Dl % svn up
69.Pp
70in the new fth directory.
71.\"
72.\" REQUIREMENTS
73.\"
74.Sh REQUIREMENTS
75.\"
76.\" Tecla
77.\"
78.Ss Tecla
79The interactive Fth interpreter supports tcsh-like command-line editing
80and history manipulation with the
81.Xr tecla 7
82library. You can find a copy at
83.Pa http://www.astro.caltech.edu/~mcs/tecla/libtecla-1.6.3.tar.gz .
84If you won't use
85.Xr tecla 7 ,
86you can configure Fth without it, see
87.Sx "CONFIGURE AND BUILD FTH WITH SCONS" .
88.\"
89.\" 64-Bit-NetBSD and Tecla
90.\"
91.Ss 64-Bit-NetBSD and Tecla
92The libtecla package on
93.Nx
94provides a static library
95.Pa libtecla.a .
96On 64-bit machines this package should be compiled with:
97.Pp
98.Dl % cd /usr/pkgsrc/devel/libtecla
99.Dl % env CFLAGS=-fPIC make install clean
100.Pp
101.\"
102.\" CONFIGURE AND BUILD FTH WITH SCONS
103.\"
104.Sh CONFIGURE AND BUILD FTH WITH SCONS
105If you have the
106.Xr python 1
107package
108.Xr scons 1 ,
109you can config, build and install Fth with scons:
110.Pp
111.Dl % scons install
112.Pp
113or
114.Pp
115.Dl % scons test install
116.Pp
117You can set additional variables on the command line, see below
118for the full set of variables:
119.Pp
120.Dl % scons CC=clang CFLAGS='-fno-strict-aliasing' install
121.Pp
122Scons for Fth has the following command line options. For the full
123list, try
124.Pp
125.Dl % scons -h
126.Pp
127.Bl -tag -width MMM -compact
128.It Fl Fl prefix Ar path
129Installation prefix.
130.It Fl Fl build Ar path
131Build path, default
132.Pa ./build .
133.It Fl Fl tecla-prefix Ar path
134Search for
135.Xr tecla 7
136in
137.Ar path/{include,lib} .
138.It Fl Fl program-prefix Ar string
139.It Fl Fl program-suffix Ar string
140Prepend or append
141.Ar string
142to the installed program and library name. More than one version
143of fth may be installed at the same time. You can have different
144names, for example:
145.Pp
146.Dl % scons --prefix=/usr/local --program-suffix=-1.4 test install
147.Pp
148installs the interpreter as fth-1.4, the library as libfth-1.4.so,
149creates a library path /usr/local/lib/fth-1.4 for local dynamic
150libs and installs the header files in /usr/local/include/fth-1.4:
151.Pp
152.Bd -literal -compact
153.Dl /usr/local/bin/fth-1.4
154.Dl /usr/local/lib/libfth-1.4.so
155.Dl /usr/local/lib/fth-1.4/
156.Dl /usr/local/include/fth-1.4/
157.Ed
158.Pp
159.It Fl Fl enable-warnings
160Enable extra C compiler warning flags.
161.It Fl Fl disable-shared
162Disable shared library support.
163.It Fl Fl without-tecla
164Do not use the
165.Xr tecla 7
166command-line editing library.
167.El
168.Pp
169Scons has the following targets:
170.Bl -tag -width MMM -compact
171.It Cm install
172Install the Fth package.
173.It Cm test
174Test the Fth package.
175.It Cm uninstall
176Uninstall all installed files.
177.El
178.Pp
179.Dl % scons -c
180.Pp
181is similar to
182.Sq make clean .
183.Pp
184Scons handles command line variables. They can be mixed with
185command line options as well:
186.Pp
187.Dl % scons --prefix=/usr/opt CC=clang warnings=yes install
188.Pp
189These variables can be also set in
190.Pa ${HOME}/.scons/fth.py
191as normal Python variables. Strings have to be enclosed between
192single or double quotes corresponding to Python requirements.
193.Bd -literal
194% cat ~/.scons/fth.py
195CC = 'clang'
196CFLAGS = '-fno-strict-aliasing'
197.Ed
198.Pp
199Here is the full list of variables:
200.Bl -tag -width MMM -compact
201.It Cm CC
202C Compiler, default
203.Cm cc .
204.It Cm CFLAGS
205Additional CFLAGS, default empty.
206.It Cm LDFLAGS
207Additional LDFLAGS, default empty.
208.It Cm build
209Build path, default
210.Pa ./build .
211.It Cm prefix
212Install prefix.
213.It Cm program_prefix
214.It Cm program_suffix
215Prepend or append
216.Ar string
217to the fth program and library. See above for an example.
218.It Cm tecla_prefix
219.Xr tecla 7
220prefix.
221.It Cm libtecla
222Set to yes or no, default yes.
223.It Cm shared
224Set to yes or no, default yes.
225.It Cm warnings
226Set to yes or no, default no.
227.El
228.\"
229.\" CONFIGURE AND BUILD FTH THE OLD WAY
230.\"
231.Sh CONFIGURE AND BUILD FTH THE OLD WAY
232You may also configure and install Fth this way:
233.Pp
234.Dl % ./configure
235.Dl % make
236.Dl % make test # optional
237.Dl % make install
238.Pp
239There are a few additional configure options which may be of
240interest. See
241.Sx "CONFIGURE AND BUILD FTH WITH SCONS"
242for explanations of them. For more, try:
243.Pp
244.Dl % ./configure -h
245.Pp
246.Bl -tag -width MMM -compact
247.It Fl Fl prefix Ar path
248.It Fl Fl with-tecla-prefix Ar path
249.It Fl Fl program-prefix Ar string
250.It Fl Fl program-suffix Ar string
251.It Fl Fl enable-warnings
252.It Fl Fl enable-maintainer-mode
253.It Fl Fl disable-shared
254.It Fl Fl without-tecla
255.El
256.Pp
257The following make targets are provided:
258.Bl -diag
259.It all
260.It clean
261.It distclean
262.It fth-shared
263.It fth-static
264.It install
265.It install-shared
266.It install-static
267.It install-strip
268.It maintainer-clean
269.It test
270.It uninstall
271.El
272.Pp
273Testing with
274.Pp
275.Dl make test
276.Pp
277checks two environment variables:
278.Bl -tag -compact
279.It Dv FTH_TEST_IO
280.It Dv FTH_TEST_FILE
281.El
282If set, the IO and File tests will be executed. These two tests may
283bear problems so they are disabled by default.
284.\"
285.\" AUTOCONF MACRO FTH_CHECK_LIB
286.\"
287.Sh AUTOCONF MACRO FTH_CHECK_LIB
288An application using the Fth package as extension language can detect
289program and library using the autoconf macro FTH_CHECK_LIB which is
290located in fth.m4. This macro tests if the interpreter fth can be
291found in $PATH. If so, it tests if libfth contains complex and
292rational numbers. Eventually it substitutes six variables for
293.Pa configure.ac .
294.Pp
295After including FTH_CHECK_LIB in configure.ac call
296.Pp
297.Dl aclocal && autoconf
298.Pp
299to update aclocal.m4.
300.Bl -tag -width MMM -compact
301.It FTH
302Set to full path of the interpreter or \(dqno\(dq, e.g.
303\(dq/usr/local/bin/fth\(dq.
304.It FTH_VERSION
305Set to version number of the Fth package or \(dqno\(dq, e.g.
306\(dq1.4.0\(dq.
307.It FTH_CFLAGS
308Set to include path or \(dqno\(dq, e.g. \(dq-I/usr/local/include/fth\(dq.
309.It FTH_LIBS
310Set to library path or \(dqno\(dq, e.g. \(dq-L/usr/local/lib -lfth\(dq.
311.It FTH_HAVE_COMPLEX
312Set to \(dqyes\(dq or \(dqno\(dq.
313.It FTH_HAVE_RATIO
314Set to \(dqyes\(dq or \(dqno\(dq.
315.El
316.\"
317.\" Short configure.ac Example
318.\"
319.Ss Short configure.ac Example
320.Bd -literal -compact
321AC_ARG_WITH([forth],
322 [AS_HELP_STRING([--with-forth],
323 [use Forth as the extension language])],
324 [if test \(dq$withval\(dq = yes ; then
325 FTH_CHECK_LIB([AC_DEFINE([HAVE_FORTH])])
326 fi])
327.Ed
328.\"
329.\" Long configure.ac Example
330.\"
331.Ss Long configure.ac Example
332.Bd -literal -compact
333AC_ARG_WITH([forth],
334 [AS_HELP_STRING([--with-forth],
335 [use Forth as the extension language])],
336 [if test \(dq$withval\(dq = yes ; then
337 FTH_CHECK_LIB([AC_DEFINE([HAVE_FORTH])
338 AC_DEFINE([HAVE_EXTENSION_LANGUAGE])
339 if test \(dq$FTH_HAVE_COMPLEX\(dq = yes ; then
340 AC_DEFINE([HAVE_COMPLEX_TRIG])
341 AC_DEFINE([HAVE_MAKE_COMPLEX])
342 AC_DEFINE([HAVE_MAKE_RECTANGULAR])
343 fi
344 if test \(dq$FTH_HAVE_RATIO\(dq = yes ; then
345 AC_DEFINE([HAVE_MAKE_RATIO])
346 fi
347 AC_SUBST(XEN_CFLAGS, $FTH_CFLAGS)
348 AC_SUBST(XEN_LIBS, $FTH_LIBS)
349 LOCAL_LANGUAGE=\(dqForth\(dq
350 ac_snd_have_extension_language=yes])
351 fi])
352.Ed
353.\" README.man ends here
354