Blame SOURCES/open-lldp-v1.0.1-17-lldp-automake-fixes-for-dist-distcheck.patch

436175
From c986aa5bc5f509f3cbc033212e0808a992ec48bf Mon Sep 17 00:00:00 2001
436175
From: John Fastabend <john.r.fastabend@intel.com>
436175
Date: Fri, 30 Jan 2015 08:32:07 -0800
436175
Subject: [PATCH] lldp: automake fixes for dist/distcheck
436175
436175
This fixes the dist and distcheck automake targets for making release
436175
archives.
436175
436175
All missing header files that have been added to git are listed in
436175
noinst_HEADERS, so they get added to the release archive but are not
436175
installed.  Some of these ( qgb_vdp22_(cmds|clif).h ) may be part of the
436175
client API and need to be moved to lldpad_include_HEADERS?
436175
436175
The srcdir prefix was removed from references to liblldp_clif.la, it's
436175
not needed and breaks builds where the output dir is different from the
436175
source dir as this is a generated file.
436175
436175
The liblldp_clid-vdp22.3 man page was added.
436175
436175
The qbg22sim and vdptest man pages were added to the release archive,
436175
but still should only be installed if debug is configured.
436175
436175
lldpad.init was added to dist_noinst_DATA to add to the release
436175
436175
The custom systemd unit file install rule was replaced with a dist_DATA
436175
definition, letting automake build the rules to handle them.  Before
436175
they were being left out of the release archive.
436175
436175
Same thing with the bash completion files, just tell automake where they
436175
go.
436175
436175
Compared to git-archive, make dist now gets almost everything.
436175
I left the test data files out for now, even though the binaries and
436175
man pages are being included.
436175
436175
Signed-off-by: Chris Leech <cleech@redhat.com>
436175
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
436175
---
436175
 Makefile.am | 42 ++++++++++++++++++------------------------
436175
 1 file changed, 18 insertions(+), 24 deletions(-)
436175
436175
diff --git a/Makefile.am b/Makefile.am
436175
index 27dffc2..69deda2 100644
436175
--- a/Makefile.am
436175
+++ b/Makefile.am
436175
@@ -43,7 +43,10 @@ include/lldp_8023_clif.h include/lldp_dcbx_clif.h include/lldp_evb_clif.h \
436175
 include/lldp_evb22_clif.h include/qbg_vdp_clif.h include/qbg_vdpnl.h \
436175
 include/qbg_vdp22_clif.h include/lldp_8021qaz_clif.h \
436175
 include/lldp_orgspec_clif.h include/lldp_cisco_clif.h \
436175
-include/lldptool.h include/lldp_rtnl.h include/dcbtool.h include/lldp_dcbx_cfg.h
436175
+include/lldptool.h include/lldp_rtnl.h include/dcbtool.h include/lldp_dcbx_cfg.h \
436175
+include/qbg_vdp22_cmds.h include/qbg_vdp22_clif.h \
436175
+include/linux/ethtool.h include/linux/if_bonding.h include/linux/if_bridge.h \
436175
+include/linux/if.h include/linux/if_link.h include/linux/if_vlan.h
436175
 
436175
 lldpad_SOURCES = lldpad.c config.c lldp_dcbx_nl.c ctrl_iface.c \
436175
 event_iface.c eloop.c lldp_dcbx_cmds.c log.c lldpad_shm.c \
436175
@@ -84,7 +87,7 @@ vdptool_LDFLAGS = -llldp_clif $(LIBNL_LIBS)
436175
 
436175
 dcbtool_SOURCES = dcbtool.c dcbtool_cmds.c parse_cli.l \
436175
 weak_readline.c $(lldpad_include_HEADERS) $(noinst_HEADERS)
436175
-dcbtool_LDADD = ${srcdir}/liblldp_clif.la
436175
+dcbtool_LDADD = liblldp_clif.la
436175
 dcbtool_LDFLAGS = -ldl -llldp_clif
436175
 
436175
 lldptool_SOURCES = lldptool.c lldptool_cmds.c lldp_rtnl.c \
436175
@@ -93,7 +96,7 @@ lldptool_SOURCES = lldptool.c lldptool_cmds.c lldp_rtnl.c \
436175
 		   lldp_8021qaz_clif.c lldp_evb_clif.c qbg/vdp_clif.c \
436175
 		   lldp_orgspec_clif.c lldp_cisco_clif.c lldp_evb22_clif.c \
436175
 		   weak_readline.c $(lldpad_include_HEADERS) $(noinst_HEADERS)
436175
-lldptool_LDADD = ${srcdir}/liblldp_clif.la
436175
+lldptool_LDADD = liblldp_clif.la
436175
 lldptool_LDFLAGS = -ldl -llldp_clif $(LIBNL_LIBS)
436175
 
436175
 if BUILD_DEBUG
436175
@@ -104,14 +107,20 @@ qbg22sim_SOURCES = test/qbg22sim.c
436175
 qbg22sim_LDFLAGS = -lrt
436175
 endif
436175
 
436175
+## put a spec file and documentation in the distribution archive
436175
+dist_noinst_DATA = lldpad.spec README COPYING ChangeLog lldpad.init
436175
+
436175
 ## man pages
436175
 dist_man_MANS = docs/lldpad.8 docs/dcbtool.8 docs/lldptool.8 \
436175
 		docs/lldptool-ets.8 docs/lldptool-pfc.8 docs/lldptool-app.8 \
436175
 		docs/lldptool-evb.8 docs/lldptool-vdp.8 docs/lldptool-med.8 \
436175
 		docs/lldptool-dcbx.8 \
436175
-		docs/lldptool-evb22.8 docs/vdptool.8
436175
+		docs/lldptool-evb22.8 docs/vdptool.8 \
436175
+		docs/liblldp_clif-vdp22.3
436175
 if BUILD_DEBUG
436175
-nodist_man_MANS = test/qbg22sim.1 test/vdptest.1
436175
+dist_man_MANS += test/qbg22sim.1 test/vdptest.1
436175
+else
436175
+dist_noinst_DATA += test/qbg22sim.1 test/vdptest.1
436175
 endif
436175
 
436175
 ## force the creation of an empty configuration directory at install time
436175
@@ -124,24 +133,9 @@ install-data-hook:	installdirs-local
436175
 pkgconfigdir = ${libdir}/pkgconfig
436175
 pkgconfig_DATA = lldpad.pc liblldp_clif.pc
436175
 
436175
-## put a spec file and documentation in the distribution archive
436175
-dist_noinst_DATA = lldpad.spec README COPYING ChangeLog
436175
+systemdsystemunitdir = $(prefix)/lib/systemd/system
436175
+dist_systemdsystemunit_DATA = lldpad.service lldpad.socket
436175
 
436175
-## special hooks to handle the init script
436175
-install-data-local: lldpad.service lldpad.socket
436175
-	$(MKDIR_P) $(DESTDIR)/usr/lib/systemd/system
436175
-	$(INSTALL_DATA) lldpad.service $(DESTDIR)/usr/lib/systemd/system/lldpad.service
436175
-	$(INSTALL_DATA) lldpad.socket $(DESTDIR)/usr/lib/systemd/system/lldpad.socket
436175
-
436175
-BASH_COMPLETION_DIR=/etc/bash_completion.d/
436175
-
436175
-install-data-hook:
436175
-	## provide support for bash completion
436175
-	$(MKDIR_P) $(DESTDIR)/$(BASH_COMPLETION_DIR)
436175
-	$(INSTALL_DATA) ${srcdir}/contrib/bash_completion/* $(DESTDIR)/$(BASH_COMPLETION_DIR)
436175
-
436175
-uninstall-local:
436175
-	rm -f '$(DESTDIR)/usr/lib/systemd/system/lldpad.*'
436175
-	rm -f '$(includedir)/dcbd/clif_cmds.h'
436175
-	rm -f '$(includedir)/dcbd'
436175
+bashcompletiondir = $(sysconfdir)/bash_completion.d
436175
+dist_bashcompletion_DATA = contrib/bash_completion/lldpad contrib/bash_completion/lldptool
436175
 
436175
-- 
436175
2.1.0
436175