Source code
Please report any problems at See for the latest info. Source repository is at You should build from a clone of a git repository ONLY IF you are doing development on the less source itself. If you are merely using less as a tool, you should download a release from and NOT from github. The formatted manual page is in less.man. The manual page nroff source is in less.nro. Major changes made since the last posted version are in NEWS. 2. If you are building from a clone of a git repository, type "make -f Makefile.aut distfiles". If you are building from a numbered release package (a tar or zip file with a name like less-999.tar.gz or less-999.zip downloaded from greenwoodsoftware.com, not from github), you should skip this step. The file INSTALL describes the usage of the configure program in general. In addition, these options to configure are supported: --with-regex=lib Specifies the regular expression library used by less for pattern matching. The default is "auto", which means the configure program finds a regular expression library automatically. Other values are: gnu Use the GNU regex library. pcre Use the PCRE library. pcre2 Use the PCRE2 library. posix Use the POSIX-compatible regcomp. regcmp Use the regcmp library. re comp Use the re comp library. regcomp Use the V8-compatible regcomp. regcomp-local Use Henry Spencer's V8-compatible regcomp (source is supplied with less). none No regular expressions, only simple string matching. --with-secure Builds a "secure" version of less, with some features disabled to prevent users from viewing other files, accessing shell commands, etc. 4. It is a good idea to look over the generated Makefile and defines.h and make sure they look ok. If you know of any peculiarities of your system that configure might not have detected, you may fix the Makefile now. Take particular notice of the list of "terminal" libraries in the LIBS definition in the Makefile; these may need to be edited. The terminal libraries will be some subset of -ltinfo -ltinfow -lxcurses -lncursesw -lncurses -lcurses -ltermcap -ltermlib If you wish, you may edit defines.h to remove some optional features. If you choose not to include some features in your version, you may wish to edit the manual page "less.nro" and the help page "less.hlp" to remove the descriptions of the features which you are removing. If you edit less.hlp, you should run "make -f Makefile.aut help.c". 6. If the make succeeds, it will generate the programs "less", "lesskey" and "lessecho" in your current directory. Test the generated programs. The default install destinations are: Executables (less, lesskey, lessecho) in /usr/local/bin Documentation (less.nro, lesskey.nro) in /usr/local/man/man1 If you want to install any of these files elsewhere, define bindir and/or mandir to the appropriate directories. 2. If you wish, you may edit defines.wn to remove some optional features. If you choose not to include some features in your version, you may wish to edit the manual page less.man and the help page help.c to remove the descriptions of the features which you are removing. 4. If the make succeeds, it will generate the programs "less.exe" and "lesskey.exe" in your current directory. Test the generated programs. 1. Move the distributed source to its own directory. Depending on your compiler, you may need to convert the source to have CR-LF rather than LF as line terminators. 4. If you wish, you may edit DEFINES.DS to remove some optional features. If you choose not to include some features in your version, you may wish to edit the manual page LESS.MAN and the help page HELP.C to remove the descriptions of the features which you are removing. 5. Run your "make" program and watch the fun. If your "make" requires a flag to import environment variables, you should use that flag. If your compiler runs out of memory, try running "make -n cmds.bat" and then run cmds.bat. 6. If the make succeeds, it will generate the programs "LESS.EXE" and "LESSK
Excerpt from the source-code README · 9,726 chars · not written by Vinony
Wikidata facts
- Official website
- gnu.org/software/less
- Image
- Less.jpg
Show 6 more facts
- source code repository URL
- git://github.com/gwsw/less.git
- software version identifier
- 692
- Commons category
- Less (Unix)
- inception
- 1983-00-00
- issue tracker URL
- github.com/gwsw/less/issues
Sources (9)
via Wikidata · CC0