[patch 08/15] libgc: dist fixes

[email protected] Mon, 12 Feb 2007 08:15:48 +0100
Newsgroups gmane.comp.gnu.dotgnu.developer
Message-ID <[email protected]>
Add a proper MAINTAINERCLEANFILES line to toplevel Makefile.am.
Additionally, this patch adds an autogen.sh script.

Signed-off-by: Robert Schwebel <[email protected]>

 libgc/Makefile.am |   24 ++++++++++++++++++++----
 libgc/autogen.sh  |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 4 deletions(-)

Index: libgc/Makefile.am
===================================================================
--- libgc/Makefile.am.orig
+++ libgc/Makefile.am
@@ -179,12 +179,28 @@ EXTRA_DIST += cord/cordbscs.c cord/cordt
 #
 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
 
-# :FIXME: why do we distribute this one???
-#
-EXTRA_DIST += libtool.m4
-
 #
 # :GOTCHA: GNU make rule for making .s out of .S is flawed, 
 # it will not remove dest if building fails
 .S.s:
 	if $(CPP) $< >$@ ; then :; else rm -f $@; fi
+
+MAINTAINERCLEANFILES = \
+	Makefile.in \
+	configure \
+	aclocal.m4 \
+	compile \
+	config.guess \
+	config.sub \
+	depcomp \
+	install-sh \
+	ltmain.sh \
+	mdate-sh \
+	missing \
+	libtool.m4 \
+	ltoptions.m4 \
+	ltsugar.m4 \
+	ltversion.m4 \
+	mkinstalldirs \
+	ltconfig
+
Index: libgc/autogen.sh
===================================================================
--- /dev/null
+++ libgc/autogen.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+#
+# usage:
+#
+# banner <target name>
+#
+banner() {
+	echo
+	TG=`echo $1 | sed -e "s,/.*/,,g"`
+	LINE=`echo $TG |sed -e "s/./-/g"`
+	echo $LINE
+	echo $TG
+	echo $LINE
+	echo
+}
+
+
+ACLOCAL=${ACLOCAL:=aclocal}
+AUTOHEADER=${AUTOHEADER:=autoheader}
+AUTOMAKE=${AUTOMAKE:=automake}
+AUTOCONF=${AUTOCONF:=autoconf}
+
+#$ACLOCAL --version | \
+#   awk -vPROG="aclocal" -vVERS=1.7\
+#   '{if ($1 == PROG) {gsub ("-.*","",$4); if ($4 < VERS) print PROG" < version "VERS"\nThis may result in errors\n"}}'
+
+#$AUTOMAKE --version | \
+#   awk -vPROG="automake" -vVERS=1.7\
+#   '{if ($1 == PROG) {gsub ("-.*","",$4); if ($4 < VERS) print PROG" < version "VERS"\nThis may result in errors\n"}}'
+
+
+banner "running libtoolize"
+libtoolize --force || exit
+
+banner "running aclocal"
+$ACLOCAL -I config/m4 || exit
+
+banner "running autoheader"
+$AUTOHEADER || exit
+
+banner "running automake"
+$AUTOMAKE --gnu --add-missing -Wall || exit
+
+banner "running autoconf"
+$AUTOCONF -Wall || exit
+
+banner "Finished"

--
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9