Makefile: Use standard variables and locations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

There are a few points I think we should fix in the Makefile:

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

- Use standard targets:
	* separate html into html and install-html
	* installdirs (instead of having 'mkdir -p'/'install -d' embedded in
targets)
	(see
<https://www.gnu.org/software/make/manual/html_node/Standard-Targets.html#Standard-Targets>)

- '?=' is not needed, I think.  When a user defines a variable in the
command line, that overwrites any definition in the Makefile.

- Is '|| exit $$?' really needed?  AFAIK, make exits on error.  Maybe
there's a corner case that make doesn't handle well and exit does,
though.  I don't know.

- Use $(INSTALL_DATA) instead of using install directly.

- Specify SHELL = /bin/sh


Any thoughts?

Cheers,

Alex

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux