[Build-common-hackers] Bug#217131: new patch, add libtool-update facility

Robert Millan Robert Millan <zeratul2@wanadoo.es>, 217131@bugs.debian.org
Mon, 3 Nov 2003 13:54:00 +0100


--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

retitle 195531 cdbs: auto-updating libtool (for GNU/KFreeBSD)
tag 195531 - moreinfo
merge 195531 217131
thanks

Hi!

I updated the autotools-update patch to update libtool also. It can be
made to update libtool properly using "libtoolize" when
DEB_AUTO_UPDATE_LIBTOOL="pre", or it can also update libtool after it
is generated (discouraged, but it might be useful on some situations)
when DEB_AUTO_UPDATE_LIBTOOL="post".

Attached.

-- 
Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T, Ainulindale (Silmarillion)

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="cdbs.diff"

diff -ur cdbs-0.4.13.old/1/class/autotools.mk.in cdbs-0.4.13/1/class/autotools.mk.in
--- cdbs-0.4.13.old/1/class/autotools.mk.in	2003-10-05 22:51:31.000000000 +0200
+++ cdbs-0.4.13/1/class/autotools.mk.in	2003-11-03 13:49:19.000000000 +0100
@@ -34,8 +34,25 @@
 common-configure-arch common-configure-indep:: common-configure-impl
 common-configure-impl:: $(DEB_BUILDDIR)/config.status
 $(DEB_BUILDDIR)/config.status:
+	if test "$(DEB_AUTO_UPDATE_LIBTOOL)" = "pre" ; then \
+		cd $(DEB_SRCDIR) && libtoolize -c -f ; \
+	fi
+	if test -n "$(DEB_AUTO_UPDATE_AUTOMAKE)" ; then \
+		if test -d $(DEB_SRCDIR)/m4 ; then m4="-I m4" ; fi ; \
+		if test -e $(DEB_SRCDIR)/aclocal.m4 ; then cd $(DEB_SRCDIR) && aclocal-$(DEB_AUTO_UPDATE_AUTOMAKE) $(m4) ; fi ; \
+	fi
+	if test -n "$(DEB_AUTO_UPDATE_AUTOCONF)" ; then \
+		if test "$(DEB_AUTO_UPDATE_AUTOCONF)" = "2.50" ; then ac_suffix="" ; else ac_suffix="$(DEB_AUTO_UPDATE_AUTOCONF)" ; fi ; \
+		if test -e $(DEB_SRCDIR)/configure.ac || test -e $(DEB_SRCDIR)/configure.in ; then cd $(DEB_SRCDIR) && autoconf$(ac_suffix) ; fi \
+	fi
+	if test -n "$(DEB_AUTO_UPDATE_AUTOMAKE)" ; then \
+		if test -e $(DEB_SRCDIR)/Makefile.am ; then cd $(DEB_SRCDIR) && automake-$(DEB_AUTO_UPDATE_AUTOMAKE) ; fi ; \
+	fi
 	chmod a+x $(DEB_CONFIGURE_SCRIPT)
 	$(DEB_CONFIGURE_INVOKE) $(cdbs_configure_flags) $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_CONFIGURE_USER_FLAGS)
+	if test "$(DEB_AUTO_UPDATE_LIBTOOL)" = "post" ; then \
+		if test -e $(DEB_SRCDIR)/libtool ; then cp -f /usr/bin/libtool $(DEB_SRCDIR)/libtool ; fi ; \
+	fi
 
 clean::
 	if test -f $(DEB_BUILDDIR)/config.status && grep -i -q 'Generated.*by configure.' $(DEB_BUILDDIR)/config.status; then rm -f $(DEB_BUILDDIR)/config.status; fi

--YiEDa0DAkWCtVeE4--