xref: /freebsd/contrib/less/README (revision 396c556d77189a5c474d35cec6f44a762e310b7d)
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 529
11
12    This is the distribution of less, version 529, released 13 Nov 2017.
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=======================================================================
37INSTALLATION (Unix systems only):
38
391. Move the distributed source to its own directory and unpack it,
40   if you have not already done so.
41
422. Type "sh configure".
43   This will generate a Makefile and a defines.h.
44   Warning: if you have a GNU sed, make sure it is version 2.05 or later.
45
46   The file INSTALL describes the usage of the configure program in
47   general.  In addition, these options to configure are supported:
48
49   --with-editor=program
50     Specifies the default editor program used by the "v" command.
51     The default is "vi".
52
53   --with-regex=lib
54     Specifies the regular expression library used by less for pattern
55     matching.  The default is "auto", which means the configure program
56     finds a regular expression library automatically.  Other values are:
57        gnu            Use the GNU regex library.
58        pcre           Use the PCRE library.
59        posix          Use the POSIX-compatible regcomp.
60        regcmp         Use the regcmp library.
61        re_comp        Use the re_comp library.
62        regcomp        Use the V8-compatible regcomp.
63        regcomp-local  Use Henry Spencer's V8-compatible regcomp
64                       (source is supplied with less).
65        none           No regular expressions, only simple string matching.
66   --with-secure
67     Builds a "secure" version of less, with some features disabled
68     to prevent users from viewing other files, accessing shell
69     commands, etc.
70
71
723. It is a good idea to look over the generated Makefile and defines.h
73   and make sure they look ok.  If you know of any peculiarities of
74   your system that configure might not have detected, you may fix the
75   Makefile now.  Take particular notice of the list of "terminal"
76   libraries in the LIBS definition in the Makefile; these may need
77   to be edited.  The terminal libraries will be some subset of
78       -lncurses  -lcurses  -ltermcap  -ltermlib
79
80   If you wish, you may edit defines.h to remove some optional features.
81   If you choose not to include some features in your version, you may
82   wish to edit the manual page "less.nro" and the help page "less.hlp"
83   to remove the descriptions of the features which you are removing.
84   If you edit less.hlp, you should run "make -f Makefile.aut help.c".
85
864. Type "make" and watch the fun.
87
885. If the make succeeds, it will generate the programs "less",
89   "lesskey" and "lessecho" in your current directory.  Test the
90   generated programs.
91
926. When satisfied that it works, if you wish to install it
93   in a public place, type "make install".
94
95   The default install destinations are:
96        Executables (less, lesskey, lessecho) in /usr/local/bin
97        Documentation (less.nro, lesskey.nro) in /usr/local/man/man1
98   If you want to install any of these files elsewhere, define
99   bindir and/or mandir to the appropriate directories.
100
101If you have any problems building or running "less", suggestions,
102complaints, etc., you may mail to bug-less@gnu.org.
103
104Note to hackers: comments noting possible improvements are enclosed
105in double curly brackets {{ like this }}.
106
107(Note that the above note was originally written at a time when
108"hackers" most commonly meant "enthusiastic and dedicated computer
109programmers", not "persons who attempt to circumvent computer security".)
110
111
112
113=======================================================================
114INSTALLATION (MS-DOS systems only,
115              with Microsoft C, Borland C, or DJGPP)
116
1171. Move the distributed source to its own directory.
118   Depending on your compiler, you may need to convert the source
119   to have CR-LF rather than LF as line terminators.
120
1212. If you are using Microsoft C, rename MAKEFILE.DSU to MAKEFILE.
122   If you are using Borland C, rename MAKEFILE.DSB to MAKEFILE.
123   If you are using DJGPP, rename MAKEFILE.DSG to MAKEFILE.
124
1253. Look at MAKEFILE to make sure that the definitions for CC and LIBDIR
126   are correct.  CC should be the name of your C compiler and
127   LIBDIR should be the directory where the C libraries reside (for
128   Microsoft C only).  If these definitions need to be changed, you can
129   either modify the definitions directly in MAKEFILE, or set your
130   environment variables CC and/or LIBDIR to override the definitions
131   in MAKEFILE.
132
1334. If you wish, you may edit DEFINES.DS to remove some optional features.
134   If you choose not to include some features in your version, you may
135   wish to edit the manual page LESS.MAN and the help page HELP.C
136   to remove the descriptions of the features which you are removing.
137
1385. Run your "make" program and watch the fun.
139   If your "make" requires a flag to import environment variables,
140   you should use that flag.
141   If your compiler runs out of memory, try running "make -n >cmds.bat"
142   and then run cmds.bat.
143
1446. If the make succeeds, it will generate the programs "LESS.EXE" and
145   "LESSKEY.EXE" in your current directory.  Test the generated programs.
146
1477. When satisfied that it works, you may wish to install LESS.EXE and
148   LESSKEY.EXE in a directory which is included in your PATH.
149
150
151
152=======================================================================
153INSTALLATION (Windows-95, Windows-98 and Windows-NT systems only,
154              with Borland C or Microsoft Visual C++)
155
1561. Move the distributed source to its own directory.
157
1582. If you are using Borland C, rename Makefile.wnb to Makefile.
159   If you are using Microsoft Visual C++, rename Makefile.wnm to Makefile.
160
1613. Check the Makefile to make sure the definitions look ok.
162
1634. If you wish, you may edit defines.wn to remove some optional features.
164   If you choose not to include some features in your version, you may
165   wish to edit the manual page less.man and the help page help.c
166   to remove the descriptions of the features which you are removing.
167
1685. Type "make" and watch the fun.
169
1706. If the make succeeds, it will generate the programs "less.exe" and
171   "lesskey.exe" in your current directory.  Test the generated programs.
172
1737. When satisfied that it works, if you wish to install it
174   in a public place, type "make install".
175   See step 6 of the Unix installation instructions for details
176   on how to change the default installation directories.
177
178
179
180=======================================================================
181INSTALLATION (OS/2 systems only,
182              with EMX C)
183
1841. Move the distributed source to its own directory.
185
1862. Rename Makefile.o2e to Makefile.
187
1883. Check the Makefile to make sure the definitions look ok.
189
1904. If you wish, you may edit defines.o2 to remove some optional features.
191   If you choose not to include some features in your version, you may
192   wish to edit the manual page less.man and the help page help.c
193   to remove the descriptions of the features which you are removing.
194
1955. Type "make" and watch the fun.
196
1976. If the make succeeds, it will generate the programs "less.exe" and
198   "lesskey.exe" in your current directory.  Test the generated programs.
199
2007. Make sure you have the emx runtime installed. You need the emx DLLs
201   emx.dll and emxlibcs.dll and also the termcap database, termcap.dat.
202   Make sure you have termcap.dat either in the default location or
203   somewhere in a directory listed in the PATH or INIT environment
204   variables.
205
2068. When satisfied that it works, you may wish to install less.exe,
207   lesskey.exe and scrsize.exe in a directory which is included in
208   your PATH.  scrsize.exe is required only if you use a terminal
209   emulator such as xterm or rxvt.
210
211
212
213=======================================================================
214INSTALLATION (OS-9 systems only,
215              with Microware C or Ultra C)
216
2171. Move the distributed source to its own directory.
218
2192. If you are using Microware C, rename Makefile.o9c to Makefile.
220   If you are using Ultra C, rename Makefile.o9u to Makefile.
221
2223. Check the Makefile to make sure the definitions look ok.
223
2244. If you wish, you may edit defines.o9 to remove some optional features.
225   If you choose not to include some features in your version, you may
226   wish to edit the manual page less.man and the help page help.c
227   to remove the descriptions of the features which you are removing.
228
2295. Type "dmake" and watch the fun.
230   The standard OS-9 "make" will probably not work.  If you don't
231   have dmake, you can get a copy from os9archive.rtsi.com.
232
2336. If the make succeeds, it will generate the programs "less" and
234   "lesskey" in your current directory.  Test the generated programs.
235
2367. When satisfied that it works, if you wish to install it
237   in a public place, type "dmake install".
238   See step 6 of the Unix installation instructions for details
239   on how to change the default installation directories.
240
241=======================================================================
242ACKNOWLEDGMENTS:
243  Some versions of the less distribution are packaged using
244  Info-ZIP's compression utility.
245  Info-ZIP's software is free and can be obtained as source
246  code or executables from various anonymous-ftp sites,
247  including ftp.uu.net:/pub/archiving/zip.
248