aboutsummaryrefslogtreecommitdiffstats
path: root/doc/Makefile.in
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-07-01 20:13:56 -0700
committerCyrill Gorcunov <gorcunov@gmail.com>2017-07-06 01:28:57 +0300
commita4f6ca5a33d75407bff56f7e65bb8a6bbfd4bf1d (patch)
tree605ffd975a09694b43bf499aa0212f4fadc5761c /doc/Makefile.in
parent6e5318008503909f5728e4ad2c715f327c073f86 (diff)
downloadnasm-daily-a4f6ca5a33d75407bff56f7e65bb8a6bbfd4bf1d.tar.gz
nasm-daily-a4f6ca5a33d75407bff56f7e65bb8a6bbfd4bf1d.tar.xz
nasm-daily-a4f6ca5a33d75407bff56f7e65bb8a6bbfd4bf1d.zip
Make buildsystem respect GNU conventions
* CPPFLAGS is a user variable and should be respected when compiling .c files. Think of -D_FORTIFY_SOURCE=2. * Pass ALL_CFLAGS when linking too. This is recommended for certain edge cases (-flto) * Use DESTDIR instead of INSTALLROOT for staging dir Every other build system (Automake, CMake, Meson) uses DESTDIR. This integrates better into distro and other build systems that have standard hooks for DESTDIR. * $(MAKE) -C <dir> is better than cd'ing into a <dir> * Use Autoconf's ${docdir} and ${htmldir} for installing the documentation. This makes handling documentation easier and respects user choice. Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'doc/Makefile.in')
-rw-r--r--doc/Makefile.in13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 2ddfd1ee..261a791f 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -9,7 +9,8 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
-docdir = $(prefix)/doc/nasm
+docdir = @docdir@
+htmldir = @htmldir@
infodir = @infodir@
datarootdir = @datarootdir@
@@ -21,6 +22,7 @@ PERL = perl -I$(srcdir)
PDFOPT = @PDFOPT@
+MKDIR = mkdir
RM_F = rm -f
RM_RF = rm -rf
CP_F = cp -f
@@ -41,7 +43,7 @@ inslist.src: inslist.pl ../x86/insns.dat
.PHONY: html
html: $(HTMLAUX)
- mkdir -p html
+ $(MKDIR) -p html
for f in $(HTMLAUX); do $(CP_UF) "$(srcdir)/$$f" html/; done
$(MAKE) html/nasmdoc0.html
@@ -81,6 +83,7 @@ spotless: clean
-$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.dvi
install: all
- mkdir -p $(INSTALLROOT)$(docdir)/html
- $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
- $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
+ $(MKDIR) -p $(DESTDIR)$(htmldir)
+ $(INSTALL_DATA) html/* $(DESTDIR)$(htmldir)
+ $(MKDIR) -p $(DESTDIR)$(docdir)
+ $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(DESTDIR)$(docdir)