]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] Added 'install-man' make target for installing the man page
authorChristian Wiese <morfoh@opensde.org>
Wed, 12 Mar 2008 13:57:54 +0000 (15:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 17 Mar 2008 07:59:06 +0000 (08:59 +0100)
This change is also introducing a new variable in the Makefile called
MANDIR, which is set to "$PREFIX/share/man" by default.

Makefile

index f74f8f85be7268bfd069239bc4906a761c4fc2fa..a9a4d4139417fc377271efe2ac9d04b1bf56ec14 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,8 @@
 #   PREFIX  is set to "/usr/local" by default and is used for installation only.
 #   SBINDIR is set to "$(PREFIX)/sbin" by default and is used for installation
 #           only.
+#   MANDIR  is set to "$(PREFIX)/share/man" by default and is used for
+#           installation only.
 #
 # Other variables :
 #   DLMALLOC_SRC   : build with dlmalloc, indicate the location of dlmalloc.c.
@@ -58,6 +60,7 @@
 DESTDIR =
 PREFIX = /usr/local
 SBINDIR = $(PREFIX)/sbin
+MANDIR = $(PREFIX)/man
 
 #### TARGET system
 # Use TARGET=<target_name> to optimize for a specifc target OS among the
@@ -472,7 +475,11 @@ src/haproxy.o:     src/haproxy.c
 src/dlmalloc.o: $(DLMALLOC_SRC)
        $(CC) $(COPTS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
 
-install: all
+install-man:
+       install -d $(DESTDIR)/$(MANDIR)/man1
+       install -m 644 doc/haproxy.1 $(DESTDIR)/$(MANDIR)/man1
+
+install: install-man all
        install -d $(DESTDIR)/$(SBINDIR)
        install haproxy $(DESTDIR)/$(SBINDIR)