1 From 3c16d0b7bf809a56affd6e1a4c0998027968b91a Mon Sep 17 00:00:00 2001
2 From: Ulf Samuelsson <ulf.samuelsson@atmel.com>
3 Date: Mon, 8 Feb 2016 23:03:48 +0100
4 Subject: [PATCH] Makefile: provide an option to not build manpages
6 The process of generating the vpnc.8 man page consists in running the
7 vpnc tool itself, and parse its --long-help output. While this is
8 perfectly fine when building natively, it fails completely when
9 cross-compiling: the vpnc binary that was built cannot be executed on
12 In order to support such situations with minimal changes, this patch
13 adjusts the Makefile to make it understand a MANS variable. By
14 default, it's defined to "vpnc.8", which means the manpage continues
15 to be built as usual. However, if it's overriden to be empty, then no
18 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
22 1 file changed, 4 insertions(+), 1 deletion(-)
24 diff --git a/Makefile b/Makefile
25 index 7ac225a..ea2cd41 100644
28 @@ -54,6 +54,7 @@ endif
29 SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c crypto.c $(CRYPTO_SRCS)
30 BINS = vpnc cisco-decrypt test-crypto
31 OBJS = $(addsuffix .o,$(basename $(SRCS)))
33 CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS)))
34 BINOBJS = $(addsuffix .o,$(BINS))
35 BINSRCS = $(addsuffix .c,$(BINS))
36 @@ -76,7 +77,7 @@ ifneq (,$(findstring Apple,$(shell $(CC) --version)))
37 override CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock
41 +all : $(BINS) $(MANS)
44 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
45 @@ -136,7 +137,9 @@ install-common: all
46 install -m600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf
47 install -m755 vpnc-disconnect $(DESTDIR)$(SBINDIR)
48 install -m755 pcf2vpnc $(DESTDIR)$(BINDIR)
50 install -m644 vpnc.8 $(DESTDIR)$(MANDIR)/man8
52 install -m644 pcf2vpnc.1 $(DESTDIR)$(MANDIR)/man1
53 install -m644 cisco-decrypt.1 $(DESTDIR)$(MANDIR)/man1
54 install -m644 COPYING $(DESTDIR)$(DOCDIR)