Merge branch 'makefile-improved'
This commit is contained in:
commit
d1eefcb37e
13
Makefile
13
Makefile
@ -16,9 +16,12 @@
|
|||||||
DESTDIR ?= dist
|
DESTDIR ?= dist
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
MANDIR != [ $(PREFIX) = / ] && printf '/usr/share/man\n' \
|
# normalized prefix
|
||||||
|
PREFIX_N != (test -d $(PREFIX) && [ '-' != $(PREFIX) ] \
|
||||||
|
&& CDPATH= cd -P -- $(PREFIX) && pwd -P)
|
||||||
|
MANDIR != [ $(PREFIX_N) = / ] && printf '/usr/share/man\n' \
|
||||||
|| printf '/share/man\n'
|
|| printf '/share/man\n'
|
||||||
SYSEXITS != printf '\043include <sysexits.h>\n' | cpp -M - | sed 's/ /\n/g' \
|
SYSEXITS != printf '\043include <sysexits.h>\n' | cpp -M - | tr ' ' '\n' \
|
||||||
| sed -n 's/sysexits\.h//p' || printf 'include\n'
|
| sed -n 's/sysexits\.h//p' || printf 'include\n'
|
||||||
|
|
||||||
CC ?= cc
|
CC ?= cc
|
||||||