[Pkg-voip-commits] [dahdi-tools] 228/285: automake: add basic framwork
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:19:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch master
in repository dahdi-tools.
commit fc620819b6d9f42790f4506092e0a7aeb2dfc0cc
Author: Oron Peled <oron.peled at xorcom.com>
Date: Sun Dec 21 15:07:59 2014 -0500
automake: add basic framwork
* Added needed boilerplate to configure.ac
* Wrap original Makefile's with automake:
- Renamed all original Makefile -> Makefile.legacy
- Force automake generated Makefile to call Makefile.legacy:
Currently handle: all, install, clean, distclean, dist, docs, config
- Note: our temporary 'dist' target conflicts with automake 'dist' target.
* Temporarily added extra dist files into build_tools/make_dist
(until we move "make dist" functionality into automake)
* For now, we don't try to compile ppp/ as it wasn't compiled
from the top-level Makefile before.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
---
.gitignore | 4 ++++
Makefile.am | 27 +++++++++++++++++++++++++++
Makefile => Makefile.legacy | 25 +++----------------------
build_tools/make_dist | 15 ++++++++++++---
configure.ac | 19 +++++++++++++++++++
ppp/Makefile.am | 14 ++++++++++++++
ppp/{Makefile => Makefile.legacy} | 0
xpp/Makefile.am | 18 ++++++++++++++++++
xpp/{Makefile => Makefile.legacy} | 0
9 files changed, 97 insertions(+), 25 deletions(-)
diff --git a/.gitignore b/.gitignore
index 37888c6..ad7f4e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,9 @@
.*.lo.d
*.asciidoc
*.html
+Makefile
+Makefile.in
+auxdir/
build_tools/menuselect-deps
aclocal.m4
autom4te.cache/
@@ -36,6 +39,7 @@ patgen
patlooptest
pattest
sethdlc
+stamp-h1
timertest
tonezone.lo
tonezones.txt
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..0f1a852
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,27 @@
+ACLOCAL_AMFLAGS = -I m4
+
+LEGACY_MAKE = \
+ $(MAKE) -f $(srcdir)/Makefile.legacy \
+ top_srcdir=$(top_srcdir) \
+ srcdir=$(srcdir)
+
+SUBDIRS = xpp
+
+all-local:
+ $(LEGACY_MAKE) all
+
+clean-local:
+ $(LEGACY_MAKE) clean
+
+install-exec-hook:
+ $(LEGACY_MAKE) install
+
+dist:
+ $(LEGACY_MAKE) dist
+
+docs config:
+ $(LEGACY_MAKE) $@
+
+DISTCLEANFILES = makeopts config.log config.status .*.d
+
+.PHONY: docs config
diff --git a/Makefile b/Makefile.legacy
similarity index 94%
rename from Makefile
rename to Makefile.legacy
index 994046b..98303c5 100644
--- a/Makefile
+++ b/Makefile.legacy
@@ -14,9 +14,6 @@ ifeq ($(strip $(foreach var,clean distclean dist-clean,$(findstring $(var),$(MAK
endif
endif
-SUBDIRS_UTILS_ALL:= ppp
-SUBDIRS_UTILS := xpp
-
OPTFLAGS=-O2
CFLAGS+=-I. $(OPTFLAGS) -g -fPIC -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
ifneq (,$(findstring ppc,$(UNAME_M)))
@@ -134,14 +131,9 @@ all: prereq programs
libs: $(LTZ_SO) $(LTZ_A)
-utils-subdirs:
- @for dir in $(SUBDIRS_UTILS); do \
- $(MAKE) -C $$dir; \
- done
-
programs: libs utils
-utils: $(BINS) utils-subdirs
+utils: $(BINS)
tests: $(TEST_BINS)
@@ -224,7 +216,7 @@ install: all install-programs
install-programs: install-utils install-libs
-install-utils: utils install-utils-subdirs
+install-utils: utils
ifneq (,$(BINS))
install -d $(DESTDIR)$(BIN_DIR)
install $(BINS) $(DESTDIR)$(BIN_DIR)/
@@ -273,11 +265,6 @@ endif
$(INSTALL) -d -m 755 $(DESTDIR)/$(INC_DIR)
$(INSTALL) -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/
-install-utils-subdirs:
- @for dir in $(SUBDIRS_UTILS); do \
- $(MAKE) -C $$dir install; \
- done
-
install-tests: tests
ifneq (,$(TEST_BINS))
install -d $(DESTDIR)$(BIN_DIR)
@@ -332,12 +319,6 @@ clean:
rm -f $(BINS) $(TEST_BINS)
rm -f *.o dahdi_cfg tzdriver sethdlc
rm -f $(LTZ_SO) $(LTZ_A) *.lo
- @for dir in $(SUBDIRS_UTILS_ALL); do \
- $(MAKE) -C $$dir clean; \
- done
- @for dir in $(SUBDIRS_UTILS); do \
- $(MAKE) -C $$dir clean; \
- done
rm -f libtonezone*
rm -f fxotune
rm -f core
@@ -360,7 +341,7 @@ config.status: configure
@echo "****"
@exit 1
-.PHONY: distclean dist-clean clean all install programs tests devel data config install-programs install-libs install-utils-subdirs utils-subdirs prereq dist
+.PHONY: distclean dist-clean clean all install programs tests devel data config install-programs install-libs prereq dist
FORCE:
diff --git a/build_tools/make_dist b/build_tools/make_dist
index 3dfc4d7..e00e88e 100755
--- a/build_tools/make_dist
+++ b/build_tools/make_dist
@@ -22,9 +22,18 @@ 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
- '
+ autoconfig.h.in
+ configure
+ ppp/Makefile
+ Makefile
+ xpp/Makefile
+ ppp/Makefile.in
+ Makefile.in
+ xpp/Makefile.in
+ auxdir/install-sh
+ auxdir/missing
+ '
+
find $extra_dist | cpio -pudmv "$tmp_version_dir"
tar czf "$output" -C "$tmp_work_dir" "$tarball_prefix"
rm -rf "$tmp_work_dir"
diff --git a/configure.ac b/configure.ac
index 1e61315..3be3861 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,17 @@ AC_INIT([dahdi-tools], short_version, [www.asterisk.org])
# check existence of the package
AC_CONFIG_SRCDIR([dahdi_cfg.c])
+AC_CONFIG_AUX_DIR([auxdir])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+
+build_version=`build_tools/make_version . dahdi/tools`
+AC_SUBST([BUILD_VERSION], "$build_version")
+
+# enable nice build output on automake1.11
+m4_pattern_allow([AM_DEFAULT_VERBOSITY])
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],[AM_DEFAULT_VERBOSITY=1])
+AM_CONDITIONAL([SILENT_RULES], [test "$AM_DEFAULT_VERBOSITY" = '0'])
AC_COPYRIGHT("dahdi-tools")
AC_REVISION($Revision$)
@@ -37,10 +48,15 @@ AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h])
AC_CHECK_TOOL([LD], [ld])
# Checks for programs.
+AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
+AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+AC_PROG_AWK
AST_CHECK_GNU_MAKE
test_obj=conftest.o
@@ -216,6 +232,9 @@ AC_SUBST([TOOLSVERSION], m4_esyscmd([build_tools/make_version . dahdi/tools]))
AC_CONFIG_FILES([
makeopts
version.c
+ Makefile
+ ppp/Makefile
+ xpp/Makefile
])
AC_OUTPUT
diff --git a/ppp/Makefile.am b/ppp/Makefile.am
new file mode 100644
index 0000000..6f8fc04
--- /dev/null
+++ b/ppp/Makefile.am
@@ -0,0 +1,14 @@
+LEGACY_MAKE = \
+ $(MAKE) -f $(srcdir)/Makefile.legacy \
+ top_srcdir=$(top_srcdir) \
+ srcdir=$(srcdir)
+
+all-local:
+ $(LEGACY_MAKE) all
+
+clean-local:
+ $(LEGACY_MAKE) clean
+
+# Cannot allow this yet
+distclean:
+maintainer-clean:
diff --git a/ppp/Makefile b/ppp/Makefile.legacy
similarity index 100%
rename from ppp/Makefile
rename to ppp/Makefile.legacy
diff --git a/xpp/Makefile.am b/xpp/Makefile.am
new file mode 100644
index 0000000..22344f0
--- /dev/null
+++ b/xpp/Makefile.am
@@ -0,0 +1,18 @@
+
+LEGACY_MAKE = \
+ $(MAKE) -f $(srcdir)/Makefile.legacy \
+ top_srcdir=$(top_srcdir) \
+ srcdir=$(srcdir)
+
+all-local:
+ $(LEGACY_MAKE) all
+
+clean-local:
+ $(LEGACY_MAKE) clean
+
+install-exec-hook:
+ $(LEGACY_MAKE) install
+
+# Cannot allow this yet
+distclean:
+maintainer-clean:
diff --git a/xpp/Makefile b/xpp/Makefile.legacy
similarity index 100%
rename from xpp/Makefile
rename to xpp/Makefile.legacy
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git
More information about the Pkg-voip-commits
mailing list