xref: /freebsd/contrib/less/README (revision 72143e89bb430c3b1406b399b810806904f6c882)
1**************************************************************************
2**************************************************************************
3**                                                                      **
4** The FreeBSD Project has chosen to redistribute and modify Less under **
5** the 'Less License' (as described in the 'LICENSE' file).             **
6**                                                                      **
7**************************************************************************
8**************************************************************************
9
10                            Less, version 563
11
12    This is the distribution of less, version 563, released 13 Jun 2020.
13    This program is part of the GNU project (http://www.gnu.org).
14
15    This program is free software.  You may redistribute it and/or
16    modify it under the terms of either:
17
18    1. The GNU General Public License, as published by the Free
19       Software Foundation; either version 3, or (at your option) any
20       later version.  A copy of this license is in the file COPYING.
21    or
22    2. The Less License, in the file LICENSE.
23
24    Please report any problems to bug-less@gnu.org.
25    See http://www.greenwoodsoftware.com/less for the latest info.
26    Source repository is at https://github.com/gwsw/less.git.
27
28=========================================================================
29
30This is the distribution of "less", a paginator similar to "more" or "pg".
31
32The formatted manual page is in less.man.
33The manual page nroff source is in less.nro.
34Major changes made since the last posted version are in NEWS.
35
36=======================================================================
37PRE-INSTALLATION (when using git)
38
39If you are building from a clone of a git repository,
40type "make -f Makefile.aut".
41If you are building from a numbered release package (a tar or zip file
42with a name like less-999.tar.gz or less-999.zip), you should skip this step.
43
44=======================================================================
45INSTALLATION (Unix systems only):
46
471. Move the distributed source to its own directory and unpack it,
48   if you have not already done so.
49
502. Type "sh configure".
51   This will generate a Makefile and a defines.h.
52   Warning: if you have a GNU sed, make sure it is version 2.05 or later.
53
54   The file INSTALL describes the usage of the configure program in
55   general.  In addition, these options to configure are supported:
56
57   --with-editor=program
58     Specifies the default editor program used by the "v" command.
59     The default is "vi".
60
61   --with-regex=lib
62     Specifies the regular expression library used by less for pattern
63     matching.  The default is "auto", which means the configure program
64     finds a regular expression library automatically.  Other values are:
65        gnu            Use the GNU regex library.
66        pcre           Use the PCRE library.
67        pcre2          Use the PCRE2 library.
68        posix          Use the POSIX-compatible regcomp.
69        regcmp         Use the regcmp library.
70        re_comp        Use the re_comp library.
71        regcomp        Use the V8-compatible regcomp.
72        regcomp-local  Use Henry Spencer's V8-compatible regcomp
73                       (source is supplied with less).
74        none           No regular expressions, only simple string matching.
75
76   --with-secure
77     Builds a "secure" version of less, with some features disabled
78     to prevent users from viewing other files, accessing shell
79     commands, etc.
80
81
823. It is a good idea to look over the generated Makefile and defines.h
83   and make sure they look ok.  If you know of any peculiarities of
84   your system that configure might not have detected, you may fix the
85   Makefile now.  Take particular notice of the list of "terminal"
86   libraries in the LIBS definition in the Makefile; these may need
87   to be edited.  The terminal libraries will be some subset of
88       -lncurses  -lcurses  -ltermcap  -ltermlib
89
90   If you wish, you may edit defines.h to remove some optional features.
91   If you choose not to include some features in your version, you may
92   wish to edit the manual page "less.nro" and the help page "less.hlp"
93   to remove the descriptions of the features which you are removing.
94   If you edit less.hlp, you should run "make -f Makefile.aut help.c".
95
964. Type "make" and watch the fun.
97
985. If the make succeeds, it will generate the programs "less",
99   "lesskey" and "lessecho" in your current directory.  Test the
100   generated programs.
101
1026. When satisfied that it works, if you wish to install it
103   in a public place, type "make install".
104
105   The default install destinations are:
106        Executables (less, lesskey, lessecho) in /usr/local/bin
107        Documentation (less.nro, lesskey.nro) in /usr/local/man/man1
108   If you want to install any of these files elsewhere, define
109   bindir and/or mandir to the appropriate directories.
110
111If you have any problems building or running "less", suggestions,
112complaints, etc., you may mail to bug-less@gnu.org.
113
114Note to hackers: comments noting possible improvements are enclosed
115in double curly brackets {{ like this }}.
116
117(Note that the above note was originally written at a time when
118"hackers" most commonly meant "enthusiastic and dedicated computer
119programmers", not "persons who attempt to circumvent computer security".)
120
121
122
123=======================================================================
124INSTALLATION (MS-DOS systems only,
125              with Microsoft C, Borland C, or DJGPP)
126
1271. Move the distributed source to its own directory.
128   Depending on your compiler, you may need to convert the source
129   to have CR-LF rather than LF as line terminators.
130
1312. If you are using Microsoft C, rename MAKEFILE.DSU to MAKEFILE.
132   If you are using Borland C, rename MAKEFILE.DSB to MAKEFILE.
133   If you are using DJGPP, rename MAKEFILE.DSG to MAKEFILE.
134
1353. Look at MAKEFILE to make sure that the definitions for CC and LIBDIR
136   are correct.  CC should be the name of your C compiler and
137   LIBDIR should be the directory where the C libraries reside (for
138   Microsoft C only).  If these definitions need to be changed, you can
139   either modify the definitions directly in MAKEFILE, or set your
140   environment variables CC and/or LIBDIR to override the definitions
141   in MAKEFILE.
142
1434. If you wish, you may edit DEFINES.DS to remove some optional features.
144   If you choose not to include some features in your version, you may
145   wish to edit the manual page LESS.MAN and the help page HELP.C
146   to remove the descriptions of the features which you are removing.
147
1485. Run your "make" program and watch the fun.
149   If your "make" requires a flag to import environment variables,
150   you should use that flag.
151   If your compiler runs out of memory, try running "make -n >cmds.bat"
152   and then run cmds.bat.
153
1546. If the make succeeds, it will generate the programs "LESS.EXE" and
155   "LESSKEY.EXE" in your current directory.  Test the generated programs.
156
1577. When satisfied that it works, you may wish to install LESS.EXE and
158   LESSKEY.EXE in a directory which is included in your PATH.
159
160
161
162=======================================================================
163INSTALLATION (Windows-95, Windows-98 and Windows-NT systems only,
164              with Borland C or Microsoft Visual C++)
165
1661. Move the distributed source to its own directory.
167
1682. If you are using Borland C, rename Makefile.wnb to Makefile.
169   If you are using Microsoft Visual C++, rename Makefile.wnm to Makefile.
170
1713. Check the Makefile to make sure the definitions look ok.
172
1734. If you wish, you may edit defines.wn to remove some optional features.
174   If you choose not to include some features in your version, you may
175   wish to edit the manual page less.man and the help page help.c
176   to remove the descriptions of the features which you are removing.
177
1785. Type "make" and watch the fun.
179
1806. If the make succeeds, it will generate the programs "less.exe" and
181   "lesskey.exe" in your current directory.  Test the generated programs.
182
1837. When satisfied that it works, if you wish to install it
184   in a public place, type "make install".
185   See step 6 of the Unix installation instructions for details
186   on how to change the default installation directories.
187
188
189
190=======================================================================
191INSTALLATION (OS/2 systems only,
192              with EMX C)
193
1941. Move the distributed source to its own directory.
195
1962. Rename Makefile.o2e to Makefile.
197
1983. Check the Makefile to make sure the definitions look ok.
199
2004. If you wish, you may edit defines.o2 to remove some optional features.
201   If you choose not to include some features in your version, you may
202   wish to edit the manual page less.man and the help page help.c
203   to remove the descriptions of the features which you are removing.
204
2055. Type "make" and watch the fun.
206
2076. If the make succeeds, it will generate the programs "less.exe" and
208   "lesskey.exe" in your current directory.  Test the generated programs.
209
2107. Make sure you have the emx runtime installed. You need the emx DLLs
211   emx.dll and emxlibcs.dll and also the termcap database, termcap.dat.
212   Make sure you have termcap.dat either in the default location or
213   somewhere in a directory listed in the PATH or INIT environment
214   variables.
215
2168. When satisfied that it works, you may wish to install less.exe,
217   lesskey.exe and scrsize.exe in a directory which is included in
218   your PATH.  scrsize.exe is required only if you use a terminal
219   emulator such as xterm or rxvt.
220
221
222
223=======================================================================
224INSTALLATION (OS-9 systems only,
225              with Microware C or Ultra C)
226
2271. Move the distributed source to its own directory.
228
2292. If you are using Microware C, rename Makefile.o9c to Makefile.
230   If you are using Ultra C, rename Makefile.o9u to Makefile.
231
2323. Check the Makefile to make sure the definitions look ok.
233
2344. If you wish, you may edit defines.o9 to remove some optional features.
235   If you choose not to include some features in your version, you may
236   wish to edit the manual page less.man and the help page help.c
237   to remove the descriptions of the features which you are removing.
238
2395. Type "dmake" and watch the fun.
240   The standard OS-9 "make" will probably not work.  If you don't
241   have dmake, you can get a copy from os9archive.rtsi.com.
242
2436. If the make succeeds, it will generate the programs "less" and
244   "lesskey" in your current directory.  Test the generated programs.
245
2467. When satisfied that it works, if you wish to install it
247   in a public place, type "dmake install".
248   See step 6 of the Unix installation instructions for details
249   on how to change the default installation directories.
250
251=======================================================================
252ACKNOWLEDGMENTS:
253  Some versions of the less distribution are packaged using
254  Info-ZIP's compression utility.
255  Info-ZIP's software is free and can be obtained as source
256  code or executables from various anonymous-ftp sites,
257  including ftp.uu.net:/pub/archiving/zip.
258