]> git.ipfire.org Git - thirdparty/man-pages.git/commit
Makefile: Use standard features (IMPORTANT: default prefix changed)
authorAlejandro Colomar <alx.manpages@gmail.com>
Sun, 9 May 2021 21:39:27 +0000 (23:39 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 10 May 2021 01:05:36 +0000 (13:05 +1200)
commite4b890cdb89a69125dcaf89f230a95ae4febf7ef
tree822ac28d2cb938929b02332f7d6e39fad4ee2b37
parent5f9596780c5ece8bcbc1fd322c54e77bdc7526b5
Makefile: Use standard features (IMPORTANT: default prefix changed)

IMPORTANT for distributions:
This changes prefix to be '/usr/local' as is expected by default,
instead of the old '/usr' value.

- Use standard variables:
    - prefix should be '/usr/local'
    - mandir (instead of MANDIR)
    - htmldir (instead of HTDIR)
    - ...
    see <https://www.gnu.org/software/make/manual/html_node/Directory-Variables.html>

- Use standard targets:
    - html (build html files; don't install them)
    - install-html (instead of html)
    - installdirs (instead of 'mkdir -p'/'install -d' inside other targets)
    - ...
    see <https://www.gnu.org/software/make/manual/html_node/Standard-Targets.html#Standard-Targets>

- Use .PHONY

- ?= is not needed.  User input overrides any assignment.  Use =

- Use standard command variables, instead of directly calling commands.
    - $(INSTALL_DATA) (instead of install -m 644)
    - $(INSTALL_DIR) (instead of install -d -m 755 or mkdir -p)
    see <https://www.gnu.org/software/make/manual/html_node/Command-Variables.html#Command-Variables>

- Specify SHELL = /bin/bash

- Specify shebang

- Allow variable html extension (or no extension at all)

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Makefile