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

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