[the-board] [build] Fix several issues in autotools to make distcheck nicely



commit be9a4d172206290c1b6a0af0b759e9a1d3c678af
Author: Lucas Rocha <lucasr gnome org>
Date:   Sat Nov 13 00:26:37 2010 +0000

    [build] Fix several issues in autotools to make distcheck nicely

 Makefile.am            |   34 +++-----
 configure.ac           |   31 ++------
 data/fonts/Makefile.am |    6 ++
 git.mk                 |  196 ------------------------------------------------
 src/Makefile-js.am     |    3 +
 src/Makefile.am        |    3 +-
 6 files changed, 33 insertions(+), 240 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f5b24cb..af847ae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,31 +2,23 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 SUBDIRS = data po src
 
--include $(top_srcdir)/git.mk
-
 EXTRA_DIST = \
     autogen.sh
 
-# These are files checked into Git that we don't want to distribute
-DIST_EXCLUDE = \
-    .gitignore \
-    board.doap
-
-DISTCLEANFILES =
-
 stale-files-clean-local:
 	-$(RM) $(abs_top_builddir)/*.la $(abs_top_builddir)/*.gir $(abs_top_builddir)/*.typelib
 
-distcheck-hook:
-	@echo "Checking disted files against files in git"
-	@failed=false; \
-	exclude=`(for p in $(DIST_EXCLUDE) ; do echo --exclude=$$p ; done)`; \
-	for f in `cd $(srcdir) && git ls-files $$exclude` ; do \
-	    if ! test -e $(distdir)/$$f ; then \
-       	        echo File missing from distribution: $$f ; \
-       	        failed=true ; \
-       	    fi \
-	done ; \
-	if $$failed ; then \
-	 exit 1 ; \
+dist-hook:
+	@if test -d "$(srcdir)/.git"; \
+	then \
+		echo Creating ChangeLog && \
+		( cd "$(top_srcdir)" && \
+		  echo '# Generated by Makefile. Do not edit.'; echo; \
+		  $(top_srcdir)/config/missing --run git log -M -C --stat) \
+		  > ChangeLog.tmp \
+		&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
+		|| ( rm -f ChangeLog.tmp ; \
+		     echo Failed to generate ChangeLog >&2 ); \
+	else \
+		echo A git clone is required to generate a ChangeLog >&2; \
 	fi
diff --git a/configure.ac b/configure.ac
index 89d59e1..3709548 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,38 +1,29 @@
 dnl -*- mode: m4 -*-
-AC_PREREQ(2.59)
+AC_PREREQ(2.63)
+AC_INIT([the-board],[0.1.0],[https://bugzilla.gnome.org/enter_bug.cgi?product=the-board],[the-board])
 
-AC_INIT(the-board, 0.1.0)
-AC_CONFIG_SRCDIR(src/tb/tb-box.c)
-AC_CONFIG_AUX_DIR(config)
+AM_CONFIG_HEADER(config/config.h)
+AC_CONFIG_SRCDIR([src/tb/tb-box.c])
 AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([config])
 
-# Support silencing the build output if supported (automake-1.11+)
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
 AC_CANONICAL_TARGET
 
-# require automake 1.9
-AM_INIT_AUTOMAKE(1.9)
-
-AM_CONFIG_HEADER(config/config.h)
-
-# using ACLOCAL_AMFLAGS would be better, but autoreconf can't handle
-# variables in ACLOCAL_AMFLAGS, so we have to do this. This approach
-# results in adding ACLOCAL_FLAGS multiple times as we reconfigure,
-# unfortunately.
-ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+# require automake 1.10
+AM_INIT_AUTOMAKE([1.10 dist-bzip2 no-dist-gzip foreign])
+AM_MAINTAINER_MODE
 
 GETTEXT_PACKAGE=AC_PACKAGE_NAME
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
 IT_PROG_INTLTOOL(0.40.0)
+PKG_PROG_PKG_CONFIG([0.22])
 
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION([0.17])
 
- ## must come before we use the $USE_MAINTAINER_MODE variable later
-AM_MAINTAINER_MODE
-
 ## don't rerun to this point if we abort
 AC_CACHE_SAVE
 
@@ -100,9 +91,5 @@ echo "
         prefix:                     ${prefix}
         compiler:                   ${CC}
 
-        THE_BOARD_CFLAGS:           ${THE_BOARD_CFLAGS}
-
-        THE_BOARD_LIBS:             ${THE_BOARD_LIBS}
-
         Now type 'make' to build $PACKAGE
 "
diff --git a/data/fonts/Makefile.am b/data/fonts/Makefile.am
index 6ff12fe..5445cfa 100644
--- a/data/fonts/Makefile.am
+++ b/data/fonts/Makefile.am
@@ -17,3 +17,9 @@ nodist_fontconfig_DATA = \
     uninstalled-fonts.conf
 
 dist_fonts_DATA =
+
+CLEANFILES = uninstalled-fonts.conf
+
+EXTRA_DIST = \
+    fonts.conf.in \
+    uninstalled-fonts.conf.in
diff --git a/src/Makefile-js.am b/src/Makefile-js.am
index 27d453e..c7e00a9 100644
--- a/src/Makefile-js.am
+++ b/src/Makefile-js.am
@@ -46,3 +46,6 @@ dist_jsutil_DATA = \
     js/util/json.js \
     js/util/mathUtil.js \
     js/util/path.js
+
+EXTRA_DIST += \
+    js/util/path.js.in
diff --git a/src/Makefile.am b/src/Makefile.am
index f4eb31a..71ee950 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,6 +60,7 @@ the-board: the-board.in
 	chmod +x $@
 
 CLEANFILES += the-board
+EXTRA_DIST += the-board.in
 
 noinst_SCRIPTS += the-board-uninstalled
 
@@ -68,4 +69,4 @@ the-board-uninstalled: the-board-uninstalled.in
 	chmod +x $@
 
 CLEANFILES += the-board-uninstalled
-EXTRA_DIST += the-board-uninstalled
+EXTRA_DIST += the-board-uninstalled.in



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]