You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

130 lines
5.2 KiB

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