]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: install only relevant and existing documentation
authorVincent Bernat <vincent@bernat.im>
Tue, 13 Oct 2015 20:20:55 +0000 (22:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 13 Oct 2015 21:40:22 +0000 (23:40 +0200)
doc/haproxy-{en,fr}.txt have been removed recently but they were still
referenced in the Makefile. Many other documents have also been
added. Instead of hard-coding a list of documents to install, install
all those in doc/ with some exceptions:

 - coding-style.txt is more for developers
 - gpl.txt and lgpl.txt are usually present at other places (and I would
   have to remove them in the Debian packaging, less work for me)

The documentation in the subdirectories is not installed as it is more
targeted to developers.

Makefile

index a7da80b56fa068fda3e4950b87ee6f9edab645e3..4f0aa8af705b05bd60e66f27982caa0799ab549c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -796,9 +796,12 @@ install-man:
        install -d "$(DESTDIR)$(MANDIR)"/man1
        install -m 644 doc/haproxy.1 "$(DESTDIR)$(MANDIR)"/man1
 
+EXCLUDE_DOCUMENTATION = lgpl gpl coding-style
+DOCUMENTATION = $(filter-out $(EXCLUDE_DOCUMENTATION),$(patsubst doc/%.txt,%,$(wildcard doc/*.txt)))
+
 install-doc:
        install -d "$(DESTDIR)$(DOCDIR)"
-       for x in configuration architecture haproxy-en haproxy-fr; do \
+       for x in $(DOCUMENTATION); do \
                install -m 644 doc/$$x.txt "$(DESTDIR)$(DOCDIR)" ; \
        done
 
@@ -811,7 +814,7 @@ install: install-bin install-man install-doc
 
 uninstall:
        rm -f "$(DESTDIR)$(MANDIR)"/man1/haproxy.1
-       for x in configuration architecture haproxy-en haproxy-fr; do \
+       for x in $(DOCUMENTATION); do \
                rm -f "$(DESTDIR)$(DOCDIR)"/$$x.txt ; \
        done
        -rmdir "$(DESTDIR)$(DOCDIR)"