[libdvdnav-devel] [PATCH 3/8] build: rewrite build system to not be recursive.

Jean-Baptiste Kempf jb at videolan.org
Wed Nov 6 15:19:39 CET 2013


From: Diego Elio Pettenò <flameeyes at flameeyes.eu>

This also removes a bunch of useless rules

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
---
 Makefile.am          | 90 ++++++++++++++++++++++++++++------------------------
 autogen.sh           | 27 ----------------
 configure.ac         | 10 ------
 m4/Makefile.am       |  7 ----
 misc/Makefile.am     |  8 -----
 misc/Makefile.common | 10 ------
 src/Makefile.am      | 19 -----------
 7 files changed, 48 insertions(+), 123 deletions(-)
 delete mode 100755 autogen.sh
 delete mode 100644 m4/Makefile.am
 delete mode 100644 misc/Makefile.am
 delete mode 100644 misc/Makefile.common
 delete mode 100644 src/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index 84adcee..d98a193 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,42 +1,48 @@
-include $(top_srcdir)/misc/Makefile.common
-
-
-SUBDIRS = src misc m4
-
-EXTRA_DIST = autogen.sh \
-	     AUTHORS \
-	     ChangeLog \
-	     configure \
-	     config.guess \
-	     config.sub \
-	     COPYING \
-	     INSTALL \
-	     install-sh \
-	     libtool \
-	     ltmain.sh \
-	     missing \
-	     mkinstalldirs \
-	     README \
-	     TODO
-
-MOSTLYCLEANFILES += $(PACKAGE)_$(VERSION).tar.gz \
-	$(distdir).tar.gz $(PACKAGE).tgz package_descriptions
-
-MAINTAINERCLEANFILES += configure $(ACLOCAL_M4) config.h.in \
-	ltmain.sh config.guess config.sub install-sh missing \
-	mkinstalldirs
-
-world:
-	@$(MAKE) clean all install 2> warnings.log
-	test -s warnings.log || rm warnings.log
-
-prune-cache:
-	-rm -f config.cache
-
-release-check:
-	@./config.status misc/relchk.sh
-	@./autogen.sh noconfig && $(SHELL) misc/relchk.sh
-
-dist-hook:
-	cp -r $(srcdir)/msvc $(distdir)/msvc
-	rm -rf `find $(distdir)/msvc -name CVS`
+AM_CPPFLAGS = -I$(top_srcdir)/src
+
+EXTRA_DIST = \
+	README \
+	TODO \
+	msvc/
+
+lib_LTLIBRARIES = libdvdread.la
+
+libdvdread_la_SOURCES = \
+	src/bitreader.c \
+	src/bswap.h \
+	src/dvd_input.c \
+	src/dvd_input.h \
+	src/dvd_reader.c \
+	src/dvd_udf.c \
+	src/dvdread_internal.h \
+	src/ifo_print.c \
+	src/ifo_read.c \
+	src/md5.c \
+	src/md5.h \
+	src/nav_print.c \
+	src/nav_read.c
+
+libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS) $(CSS_LIBS)
+
+libdvdread_la_LDFLAGS = -version-info $(DVDREAD_LT_CURRENT):$(DVDREAD_LT_REVISION):$(DVDREAD_LT_AGE) \
+	-export-symbols-regex "(^dvd.*|^nav.*|^ifo.*|^DVD.*|^UDF.*)"
+
+pkgincludedir = $(includedir)/dvdread
+pkginclude_HEADERS = \
+	src/dvdread/bitreader.h \
+	src/dvdread/dvd_reader.h \
+	src/dvdread/dvd_udf.h \
+	src/dvdread/ifo_print.h \
+	src/dvdread/ifo_read.h \
+	src/dvdread/ifo_types.h \
+	src/dvdread/nav_print.h \
+	src/dvdread/nav_read.h \
+	src/dvdread/nav_types.h
+
+bin_SCRIPTS = misc/dvdread-config
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = misc/dvdread.pc
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = m4/dvdread.m4
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 077b682..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname "$0"`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd "$srcdir"
-
-AUTORECONF=${AUTORECONF-autoreconf}
-
-if ! type $AUTORECONF >/dev/null 2>&1; then
-  echo "**Error**: Missing \`autoreconf' program." >&2
-  echo "You will need the autoconf and automake packages." >&2
-  echo "You can download them from ftp://ftp.gnu.org/pub/gnu/." >&2
-  exit 1
-fi
-
-$AUTORECONF -v --install || exit $?
-cd "$ORIGDIR" || exit $?
-
-test "$1" = noconfig && NOCONFIGURE=1
-
-if test -z "$NOCONFIGURE"; then
-  "$srcdir"/configure "$@"
-fi
diff --git a/configure.ac b/configure.ac
index 2875050..f134294 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,21 +197,11 @@ dnl ---------------------------------------------
 AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, no)
 
 dnl ---------------------------------------------
-dnl Some include paths ( !!! DO NOT REMOVE !!! )
-dnl ---------------------------------------------
-INCLUDES='-I$(top_srcdir) $(DVDREAD_CFLAGS)'
-AC_SUBST(INCLUDES)
-
-dnl ---------------------------------------------
 dnl Output configuration files
 dnl ---------------------------------------------
 AC_OUTPUT([
 Makefile
-src/Makefile
-misc/Makefile
 misc/dvdread-config
 misc/dvdread.pc
 misc/libdvdread.spec
-misc/relchk.sh
-m4/Makefile
 ])
diff --git a/m4/Makefile.am b/m4/Makefile.am
deleted file mode 100644
index 0c42212..0000000
--- a/m4/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(top_srcdir)/misc/Makefile.common
-
-EXTRA_DIST = dvdread.m4
-
-m4datadir = $(datadir)/aclocal
-
-m4data_DATA = dvdread.m4
diff --git a/misc/Makefile.am b/misc/Makefile.am
deleted file mode 100644
index efe6503..0000000
--- a/misc/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-include $(top_srcdir)/misc/Makefile.common
-
-EXTRA_DIST = libdvdread.spec.in libdvdread.spec Makefile.common relchk.sh relchk.sh.in
-
-bin_SCRIPTS = dvdread-config
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = dvdread.pc
diff --git a/misc/Makefile.common b/misc/Makefile.common
deleted file mode 100644
index 6faa23f..0000000
--- a/misc/Makefile.common
+++ /dev/null
@@ -1,10 +0,0 @@
-MOSTLYCLEANFILES     = *~ \\\#* .*~ .\\\#*
-MAINTAINERCLEANFILES = Makefile.in
-
-debug:
-	@$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"
-
-debug-install: install-debug
-
-install-debug:
-	@$(MAKE) CFLAGS="$(DEBUG_CFLAGS)" install
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 1153744..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-include $(top_srcdir)/misc/Makefile.common
-
-includedir = ${prefix}/include/dvdread
-
-AM_CPPFLAGS = -I$(top_srcdir)/src
-
-lib_LTLIBRARIES = libdvdread.la
-
-libdvdread_la_SOURCES = dvd_reader.c nav_read.c ifo_read.c \
-	dvd_input.c dvd_udf.c md5.c nav_print.c ifo_print.c bitreader.c \
-	bswap.h dvd_input.h dvdread_internal.h md5.h
-
-libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS) @CSS_LIBS@
-
-libdvdread_la_LDFLAGS = -version-info $(DVDREAD_LT_CURRENT):$(DVDREAD_LT_REVISION):$(DVDREAD_LT_AGE) \
-	-export-symbols-regex "(^dvd.*|^nav.*|^ifo.*|^DVD.*|^UDF.*)"
-
-include_HEADERS = dvdread/dvd_reader.h dvdread/nav_read.h dvdread/ifo_read.h \
-	dvdread/nav_print.h dvdread/ifo_print.h dvdread/ifo_types.h dvdread/nav_types.h dvdread/dvd_udf.h dvdread/bitreader.h
-- 
1.8.4.2



More information about the libdvdnav-devel mailing list