automake: handle "make dist"

* "make distcheck" still fails

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Oron Peled 2015-05-18 17:19:47 +00:00 committed by Tzafrir Cohen
parent f21b592f68
commit 0090086bce
9 changed files with 246 additions and 138 deletions

View File

@ -17,12 +17,19 @@ CFLAGS += \
#-Wformat=2
endif
SUBDIRS = xpp doc
SUBDIRS = xpp doc hotplug
if PPPD
SUBDIRS += ppp
endif
noinst_HEADERS = \
bittest.h \
dahdi_tools_version.h \
fxotune.h \
wavformat.h \
#
sbin_PROGRAMS = \
dahdi_test \
dahdi_maint \
@ -40,7 +47,7 @@ noinst_PROGRAMS = \
dahdi_diag \
timertest
sbin_SCRIPTS = \
dist_sbin_SCRIPTS = \
dahdi_span_assignments \
dahdi_waitfor_span_assignments \
dahdi_span_types
@ -89,6 +96,9 @@ endif
dahdi_cfg_LDFLAGS = -lm -lpthread
dahdi_cfg_LDADD = libtonezone.la
udevrulesdir = @udevrulesdir@
udevrules_DATA = dahdi.rules
all-local:
$(LEGACY_MAKE) all
@ -100,10 +110,59 @@ install-exec-hook:
@echo "Compatibility symlinks (should be removed in the future)"
ln -s libtonezone.so.2.0.0 $(DESTDIR)$(libdir)/libtonezone.so.2.0
dist:
$(LEGACY_MAKE) dist
bashcompdir = $(sysconfdir)/bash_completion.d
docs config:
install-data-hook:
mkdir -p $(DESTDIR)$(bashcompdir)
install -m 644 $(srcdir)/dahdi-bash-completion $(DESTDIR)$(bashcompdir)/dahdi
# Handle these files specially -- install them only with 'install-config'
special_config_files = \
init.conf.sample \
blacklist.sample \
modprobe.conf.sample \
#
install-config:
mkdir -p $(DESTDIR)$(dahdiconfdir)
mkdir -p $(DESTDIR)$(sysconfdir)/modprobe.d
install -m644 xpp/genconf_parameters $(DESTDIR)$(dahdiconfdir)/genconf_parameters
install -m644 init.conf.sample $(DESTDIR)$(dahdiconfdir)/init.conf
install -m644 blacklist.sample $(DESTDIR)$(sysconfdir)/modprobe.d/dahdi-blacklist.conf
install -m644 modprobe.conf.sample $(DESTDIR)$(sysconfdir)/modprobe.d/dahdi.conf
$(LEGACY_MAKE) config
dahdiconfdir = @sysconfdir@/dahdi
dahdiconf_DATA = \
system.conf.sample \
assigned-spans.conf.sample \
span-types.conf.sample \
modules.sample \
#
build_scripts = \
build_tools/dahdi_svn_tarball \
build_tools/dahdi_sysfs_copy \
build_tools/dump_sys_state \
build_tools/make_firmware_object.in \
build_tools/make_tree \
build_tools/make_version \
build_tools/test_kernel_git \
build_tools/uninstall-modules \
#
.version:
if ./build_tools/make_version . dahdi/tools > $@.tmp; then \
mv "$@.tmp" "$@"; \
fi
uninstall-hook:
$(RM) $(DESTDIR)$(sysconfdir)/dahdi/span-types.conf.sample
$(RM) $(DESTDIR)$(sysconfdir)/dahdi/assigned-spans.conf.sample
$(RM) $(DESTDIR)$(sysconfdir)/dahdi/system.conf
$(RM) $(DESTDIR)$(bashcompdir)/dahdi
docs:
$(LEGACY_MAKE) $@
DISTCLEANFILES = makeopts config.log config.status .*.d
@ -116,4 +175,22 @@ MAINTAINERCLEANFILES = \
m4/lt~obsolete.m4 \
#
EXTRA_DIST = \
.version \
LICENSE \
LICENSE.LGPL \
UPGRADE.txt \
bootstrap.sh \
Makefile.legacy \
dahdi.init \
dahdi.xml \
dahdi_pcap.c \
ifup-hdlc \
dahdi-bash-completion \
$(special_config_files) \
$(dahdiconf_DATA) \
$(udevrules_DATA) \
$(build_scripts) \
#
.PHONY: docs config

View File

@ -46,42 +46,15 @@ ifneq (,$(INITRD_DIR))
COPY_INITD := install -D dahdi.init $(INIT_TARGET)
endif
RCCONF_FILE = /etc/dahdi/init.conf
MODULES_FILE = /etc/dahdi/modules
GENCONF_FILE = /etc/dahdi/genconf_parameters
MODPROBE_FILE = /etc/modprobe.d/dahdi.conf
BLACKLIST_FILE = /etc/modprobe.d/dahdi.blacklist.conf
BASH_COMP_DIR = /etc/bash_completion.d
BASH_COMP_FILE = $(BASH_COMP_DIR)/dahdi
NETSCR_DIR := $(firstword $(wildcard $(DESTDIR)/etc/sysconfig/network-scripts ))
ifneq (,$(NETSCR_DIR))
NETSCR_TARGET := $(NETSCR_DIR)/ifup-hdlc
COPY_NETSCR := install -D ifup-hdlc $(NETSCR_TARGET)
endif
TOOLSVERSION=$(shell build_tools/make_version . dahdi/tools)
# sbindir, libdir, includedir and mandir are defined in makeopts
# (from configure).
LIB_DIR:=$(libdir)
DATA_DIR:=${datadir}/dahdi
CONFIG_DIR:=$(sysconfdir)/dahdi
CONFIG_FILE:=$(CONFIG_DIR)/system.conf
UDEVRULES_DIR:=$(sysconfdir)/udev/rules.d
ASSIGNED_DATA_SCRIPTS:=\
dahdi_handle_device \
dahdi_span_config \
dahdi_auto_assign_compat \
span_config.d/10-dahdi-cfg \
span_config.d/20-fxotune \
span_config.d/50-asterisk \
handle_device.d/10-span-types \
handle_device.d/20-span-assignments
ASSIGNED_CONF:=assigned-spans.conf.sample span-types.conf.sample
# All the man pages. Not just installed ones:
GROFF_PAGES := $(wildcard doc/*.8 xpp/*.8)
@ -131,18 +104,7 @@ install: all install-programs
@echo "###"
@echo "###################################################"
install-programs: install-utils install-libs
install-utils:
ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
$(INSTALL) -d $(DESTDIR)$(CONFIG_DIR)
$(INSTALL) -m 644 system.conf.sample $(DESTDIR)$(CONFIG_FILE)
endif
install -d $(DESTDIR)$(DATA_DIR)
tar cf - -C hotplug $(ASSIGNED_DATA_SCRIPTS) | tar xf - -C $(DESTDIR)$(DATA_DIR)/
install -m 644 $(ASSIGNED_CONF) $(DESTDIR)/$(CONFIG_DIR)/
install -d $(DESTDIR)$(BASH_COMP_DIR)
install -m 644 dahdi-bash-completion $(DESTDIR)$(BASH_COMP_FILE)
install-programs: install-libs
install-libs:
ifneq (no,$(USE_SELINUX))
@ -155,23 +117,6 @@ config:
ifneq (,$(COPY_INITD))
$(COPY_INITD)
endif
ifeq (,$(wildcard $(DESTDIR)$(RCCONF_FILE)))
$(INSTALL) -D -m 644 init.conf.sample $(DESTDIR)$(RCCONF_FILE)
endif
ifeq (,$(wildcard $(DESTDIR)$(MODULES_FILE)))
$(INSTALL) -D -m 644 modules.sample $(DESTDIR)$(MODULES_FILE)
endif
ifeq (,$(wildcard $(DESTDIR)$(GENCONF_FILE)))
$(INSTALL) -D -m 644 xpp/genconf_parameters $(DESTDIR)$(GENCONF_FILE)
endif
ifeq (,$(wildcard $(DESTDIR)$(MODPROBE_FILE)))
$(INSTALL) -D -m 644 modprobe.conf.sample $(DESTDIR)$(MODPROBE_FILE)
endif
ifeq (,$(wildcard $(DESTDIR)$(BLACKLIST_FILE)))
$(INSTALL) -D -m 644 blacklist.sample $(DESTDIR)$(BLACKLIST_FILE)
endif
$(INSTALL) -d $(DESTDIR)$(UDEVRULES_DIR)
$(INSTALL) -D -m 644 dahdi.rules $(DESTDIR)$(UDEVRULES_DIR)/
ifneq (,$(COPY_NETSCR))
$(COPY_NETSCR)
endif
@ -192,18 +137,11 @@ endif
echo "DAHDI start. "; \
fi
dist:
@./build_tools/make_dist "dahdi-tools" "$(TOOLSVERSION)"
clean:
rm -f *.o tzdriver
rm -f core
rm -rf $(GENERATED_DOCS) *.asciidoc tonezones.txt
.PHONY: clean all install devel data config install-programs install-libs dist
.PHONY: clean all install devel data config install-programs install-libs
FORCE:
ifneq ($(wildcard .*.d),)
include .*.d
endif

View File

@ -1,55 +0,0 @@
#! /bin/sh
if [ "$#" -ne 2 ]; then
echo >&2 "Usage: $0 <package> <version>"
exit 1
fi
package="$1"
version="$2"
tarball_prefix="$package-$version"
echo "I: Making dist tarball for $tarball_prefix"
tarball_name="$tarball_prefix.tar.gz"
tmp_work_dir=".tmp"
tmp_version_dir="$tmp_work_dir/$tarball_prefix"
if [ "$DESTDIR" != '' ]; then
destdir="$DESTDIR/"
fi
output="$destdir$tarball_name"
mkdir -p "$tmp_version_dir"
git archive --format tar HEAD | tar xf - -C "$tmp_version_dir"
echo "$version" > "$tmp_version_dir/.version"
extra_dist='
autoconfig.h.in
configure
doc/Makefile
ppp/Makefile
Makefile
xpp/Makefile
xpp/oct612x/Makefile
xpp/perl_modules/Makefile
doc/Makefile.in
ppp/Makefile.in
Makefile.in
xpp/Makefile.in
xpp/oct612x/Makefile.in
xpp/perl_modules/Makefile.in
auxdir/compile
auxdir/config.guess
auxdir/config.sub
auxdir/depcomp
auxdir/install-sh
auxdir/ltmain.sh
auxdir/missing
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
'
find $extra_dist | cpio -pudmv "$tmp_version_dir"
tar czf "$output" -C "$tmp_work_dir" "$tarball_prefix"
rm -rf "$tmp_work_dir"
echo "I: tarball is ready: '$output'"

View File

@ -269,6 +269,7 @@ AC_CONFIG_FILES([
version.c
Makefile
doc/Makefile
hotplug/Makefile
ppp/Makefile
xpp/Makefile
xpp/oct612x/Makefile

View File

@ -15,3 +15,5 @@ noinst_MANS = \
fxstest.8 \
patgen.8 \
pattest.8
EXTRA_DIST = $(man_MANS) $(noinst_MANS)

11
hotplug/Makefile.am Normal file
View File

@ -0,0 +1,11 @@
nobase_dist_pkgdata_SCRIPTS = \
dahdi_handle_device \
dahdi_span_config \
dahdi_auto_assign_compat \
span_config.d/10-dahdi-cfg \
span_config.d/20-fxotune \
span_config.d/50-asterisk \
handle_device.d/10-span-types \
handle_device.d/20-span-assignments \
#

View File

@ -52,8 +52,7 @@ perl_mans = $(perl_scripts:%=%.8)
endif
pkgdatadir = @datadir@/dahdi
pkgdata_SCRIPTS = xpp_fxloader astribank_hook waitfor_xpds
dist_pkgdata_SCRIPTS = xpp_fxloader astribank_hook waitfor_xpds
udevrulesdir = @udevrulesdir@
udevrules_DATA = xpp.rules
@ -65,42 +64,79 @@ if PBX_USB
SUBDIRS += oct612x
noinst_LTLIBRARIES = libastribank.la libecholoader.la
noinst_LTLIBRARIES = libastribank.la libecholoader.la libhexfile.la
libastribank_la_SOURCES = \
xtalk/xusb.c \
xtalk/xlist.c \
xtalk/debug.c \
xtalk/xtalk.c \
mpptalk.c \
astribank_usb.c
astribank_usb.c \
astribank_usb.h \
mpptalk.c \
mpptalk.h \
mpp.h \
mpptalk_defs.h \
xtalk/debug.c \
xtalk/debug.h \
xtalk/xlist.c \
xtalk/xlist.h \
xtalk/xtalk.c \
xtalk/xtalk.h \
xtalk/xtalk_defs.h \
xtalk/xusb.c \
xtalk/xusb.h \
#
libastribank_la_CFLAGS = $(GLOBAL_CFLAGS)
if USE_OCTASIC
libecholoader_la_SOURCES = \
parse_span_specs.c \
echo_loader.c
parse_span_specs.h \
echo_loader.c \
echo_loader.h \
#
libecholoader_la_CFLAGS = $(GLOBAL_CFLAGS) $(OCTASIC_CFLAGS)
endif
libhexfile_la_SOURCES = \
hexfile.c \
hexfile.h \
#
sbin_PROGRAMS = \
astribank_tool \
astribank_hexload \
astribank_allow \
astribank_is_starting
check_PROGRAMS = test_parse
check_PROGRAMS = test_parse
test_parse_LDADD = libhexfile.la
astribank_tool_SOURCES = astribank_tool.c
astribank_tool_CFLAGS = $(GLOBAL_CFLAGS)
astribank_tool_LDFLAGS = $(USB_LIB)
astribank_tool_LDADD = libastribank.la
astribank_hexload_SOURCES = astribank_hexload.c hexfile.c pic_loader.c
astribank_hexload_SOURCES = \
astribank_hexload.c \
pic_loader.c \
pic_loader.h \
#
astribank_hexload_CFLAGS = $(GLOBAL_CFLAGS) $(OCTASIC_CFLAGS)
astribank_hexload_LDFLAGS = $(USB_LIB)
astribank_hexload_LDADD = libastribank.la libecholoader.la oct612x/liboctasic.la
astribank_hexload_LDADD = \
libhexfile.la \
libastribank.la \
libecholoader.la \
oct612x/liboctasic.la \
#
astribank_allow_SOURCES = \
astribank_allow.c \
astribank_license.c \
astribank_license.h \
#
astribank_allow_SOURCES = astribank_allow.c astribank_license.c
astribank_allow_CFLAGS = $(GLOBAL_CFLAGS)
astribank_allow_LDFLAGS = $(USB_LIB)
astribank_allow_LDADD = libastribank.la
@ -113,3 +149,18 @@ man_pages = \
man_MANS += $(man_pages)
endif
EXTRA_DIST = \
$(man_pages) \
$(udevrules_DATA) \
README.Astribank \
astribank_upgrade \
dahdi.cgi \
dahdi_drivers \
genconf_parameters \
twinstar_hook \
twinstar_setup \
xpp_modprobe \
xpp_timing \
#

View File

@ -30,6 +30,87 @@ liboctasic_la_SOURCES = \
apilib/largmath/octapi_largmath.c \
apilib/llman/octapi_llman.c
noinst_HEADERS = \
apilib/bt/octapi_bt0_private.h \
apilib/llman/octapi_llman_private.h \
include/apilib/octapi_bt0.h \
include/apilib/octapi_largmath.h \
include/apilib/octapi_llman.h \
include/digium_unused.h \
include/oct6100api/oct6100_adpcm_chan_inst.h \
include/oct6100api/oct6100_adpcm_chan_pub.h \
include/oct6100api/oct6100_api.h \
include/oct6100api/oct6100_api_inst.h \
include/oct6100api/oct6100_apimi.h \
include/oct6100api/oct6100_apiud.h \
include/oct6100api/oct6100_channel_inst.h \
include/oct6100api/oct6100_channel_pub.h \
include/oct6100api/oct6100_chip_open_inst.h \
include/oct6100api/oct6100_chip_open_pub.h \
include/oct6100api/oct6100_chip_stats_inst.h \
include/oct6100api/oct6100_chip_stats_pub.h \
include/oct6100api/oct6100_conf_bridge_inst.h \
include/oct6100api/oct6100_conf_bridge_pub.h \
include/oct6100api/oct6100_debug_inst.h \
include/oct6100api/oct6100_debug_pub.h \
include/oct6100api/oct6100_defines.h \
include/oct6100api/oct6100_errors.h \
include/oct6100api/oct6100_events_inst.h \
include/oct6100api/oct6100_events_pub.h \
include/oct6100api/oct6100_interrupts_inst.h \
include/oct6100api/oct6100_interrupts_pub.h \
include/oct6100api/oct6100_mixer_inst.h \
include/oct6100api/oct6100_mixer_pub.h \
include/oct6100api/oct6100_phasing_tsst_inst.h \
include/oct6100api/oct6100_phasing_tsst_pub.h \
include/oct6100api/oct6100_playout_buf_inst.h \
include/oct6100api/oct6100_playout_buf_pub.h \
include/oct6100api/oct6100_remote_debug_inst.h \
include/oct6100api/oct6100_remote_debug_pub.h \
include/oct6100api/oct6100_tlv_inst.h \
include/oct6100api/oct6100_tone_detection_inst.h \
include/oct6100api/oct6100_tone_detection_pub.h \
include/oct6100api/oct6100_tsi_cnct_inst.h \
include/oct6100api/oct6100_tsi_cnct_pub.h \
include/oct6100api/oct6100_tsst_inst.h \
include/octdef.h \
include/octmac.h \
include/octosdependant.h \
include/octrpc/oct6100_rpc_protocol.h \
include/octrpc/rpc_protocol.h \
include/octtype.h \
include/octtypevx.h \
include/octtypewin.h \
#
liboctasic_la_CFLAGS = \
$(OCTASIC_DEFINES) \
$(OCTASIC_CFLAGS)
EXTRA_DIST = \
get_discards \
octasic-helper \
octdeviceapi/oct6100api/oct6100_adpcm_chan_priv.h \
octdeviceapi/oct6100api/oct6100_api/oct6100_user.c \
octdeviceapi/oct6100api/oct6100_apimi/oct6100_mask_interrupts.c \
octdeviceapi/oct6100api/oct6100_channel_priv.h \
octdeviceapi/oct6100api/oct6100_chip_open_priv.h \
octdeviceapi/oct6100api/oct6100_chip_stats_priv.h \
octdeviceapi/oct6100api/oct6100_conf_bridge_priv.h \
octdeviceapi/oct6100api/oct6100_debug_priv.h \
octdeviceapi/oct6100api/oct6100_events_priv.h \
octdeviceapi/oct6100api/oct6100_interrupts_priv.h \
octdeviceapi/oct6100api/oct6100_memory_priv.h \
octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h \
octdeviceapi/oct6100api/oct6100_mixer_priv.h \
octdeviceapi/oct6100api/oct6100_phasing_tsst_priv.h \
octdeviceapi/oct6100api/oct6100_playout_buf_priv.h \
octdeviceapi/oct6100api/oct6100_remote_debug_priv.h \
octdeviceapi/oct6100api/oct6100_tlv_priv.h \
octdeviceapi/oct6100api/oct6100_tone_detection_priv.h \
octdeviceapi/oct6100api/oct6100_tsi_cnct_priv.h \
octdeviceapi/oct6100api/oct6100_tsst_priv.h \
octdeviceapi/oct6100api/oct6100_version.h \
test.c \
#

View File

@ -22,3 +22,5 @@ nobase_perllib_DATA = \
Dahdi/Config/Gen.pm \
Dahdi/Hardware/USB.pm \
Dahdi/Hardware/PCI.pm
EXTRA_DIST = $(nobase_perllib_DATA)