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