|
|
0890d3 |
From feaadda185a25290f98e5c09b859b2000818cf87 Mon Sep 17 00:00:00 2001
|
|
|
0890d3 |
From: Jesper Dangaard Brouer <brouer@redhat.com>
|
|
|
0890d3 |
Date: Sun, 2 Mar 2014 22:08:02 +0100
|
|
|
0890d3 |
Subject: [PATCH] arptables: install man pages
|
|
|
0890d3 |
|
|
|
0890d3 |
(cherry picked from commit 36daba3cd378cabf915fa6ef882ad3dc7add4282)
|
|
|
0890d3 |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
0890d3 |
---
|
|
|
0890d3 |
Makefile | 14 +++++++++-----
|
|
|
0890d3 |
1 file changed, 9 insertions(+), 5 deletions(-)
|
|
|
0890d3 |
|
|
|
0890d3 |
diff --git a/Makefile b/Makefile
|
|
|
0890d3 |
index 38158d9e98ab4..7bead0d9134f3 100644
|
|
|
0890d3 |
--- a/Makefile
|
|
|
0890d3 |
+++ b/Makefile
|
|
|
0890d3 |
@@ -6,10 +6,13 @@ PREFIX:=/usr/local
|
|
|
0890d3 |
LIBDIR:=$(PREFIX)/lib
|
|
|
0890d3 |
BINDIR:=$(PREFIX)/sbin
|
|
|
0890d3 |
MANDIR:=$(PREFIX)/man
|
|
|
0890d3 |
+man8dir=$(MANDIR)/man8
|
|
|
0890d3 |
INITDIR:=/etc/rc.d/init.d
|
|
|
0890d3 |
SYSCONFIGDIR:=/etc/sysconfig
|
|
|
0890d3 |
DESTDIR:=
|
|
|
0890d3 |
|
|
|
0890d3 |
+MANS = arptables.8 arptables-save.8 arptables-restore.8
|
|
|
0890d3 |
+
|
|
|
0890d3 |
COPT_FLAGS:=-O2
|
|
|
0890d3 |
CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
|
|
|
0890d3 |
|
|
|
0890d3 |
@@ -36,10 +39,6 @@ libarptc/libarptc.a: libarptc/libarptc.o
|
|
|
0890d3 |
arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
|
|
|
0890d3 |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
|
|
0890d3 |
|
|
|
0890d3 |
-$(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8
|
|
|
0890d3 |
- mkdir -p $(@D)
|
|
|
0890d3 |
- install -m 0644 $< $@
|
|
|
0890d3 |
-
|
|
|
0890d3 |
$(DESTDIR)$(BINDIR)/arptables: arptables
|
|
|
0890d3 |
mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
0890d3 |
install -m 0755 $< $@
|
|
|
0890d3 |
@@ -57,8 +56,13 @@ scripts: arptables-save arptables-restore arptables.sysv
|
|
|
0890d3 |
if test -d $(DESTDIR)$(INITDIR); then install -m 0755 arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi
|
|
|
0890d3 |
rm -f arptables-save_ arptables-restore_ arptables.sysv_
|
|
|
0890d3 |
|
|
|
0890d3 |
+.PHONY: install-man
|
|
|
0890d3 |
+install-man: $(MANS)
|
|
|
0890d3 |
+ [ -d "$(DESTDIR)$(man8dir)" ] || mkdir -p "$(DESTDIR)$(man8dir)"
|
|
|
0890d3 |
+ install -m 0644 $^ $(DESTDIR)$(man8dir)/
|
|
|
0890d3 |
+
|
|
|
0890d3 |
.PHONY: install
|
|
|
0890d3 |
-install: $(DESTDIR)$(MANDIR)/man8/arptables.8 $(DESTDIR)$(BINDIR)/arptables scripts
|
|
|
0890d3 |
+install: install-man $(DESTDIR)$(BINDIR)/arptables scripts
|
|
|
0890d3 |
|
|
|
0890d3 |
.PHONY: clean
|
|
|
0890d3 |
clean:
|
|
|
0890d3 |
--
|
|
|
0890d3 |
2.21.0
|
|
|
0890d3 |
|