libtool updates
Alexander Sack
asac at ubuntu.com
Wed Dec 3 12:40:49 GMT 2008
On Tue, Dec 02, 2008 at 12:11:21PM -0800, Steve Langasek wrote:
> On Tue, Dec 02, 2008 at 12:08:00PM +0000, James Westby wrote:
> > On Mon, 2008-11-17 at 10:13 +0000, Scott James Remnant wrote:
> > > I notice a lot of packages updating libtool in a variety of ways, so I'd
> > > like to make the following notes:
>
> > > The one, and only, proper and correct way to do this is:
>
> > > autoreconf -f -i
>
> > > That will update all of the tools to the current version, in the right
> > > order.
>
> > Hi Scott,
>
> > Thanks for this information. I would like to clarify about what this
> > call should replace. I assume it replaces calling autoreconf with any
> > other arguments, and indeed calling all the scripts individually, is
> > that right? Should we do this instead of just calling libtoolize
> > without auto*? What about automake but none of the others?
>
> Calling libtoolize on its own is always wrong because this can result in
> version skew between ltmain.sh and (aclocal.m4/configure).
>
> Calling automake on its own is always wrong because this can result in
> version skew between **/Makefile.in and (aclocal.m4/configure).
>
> Both of these issues can be addressed by calling "autoreconf" instead.
>
> There are other combinations that are "safe" (libtoolize+aclocal+autoconf
> w/o automake; automake+aclocal+autoconf w/o libtoolize), but distinguishing
> the safe cases from the unsafe ones requires finer knowledge of autotools
> workings than we can probably expect most developers to retain, so as a
> general rule, using "autoreconf" is probably best.
So I guess cdbs should get a DEB_AUTO_UPDATE_AUTORECONF hint.
Patch for discussion:
diff -Nru cdbs-0.4.52ubuntu7/1/class/autotools-files.mk.in cdbs-0.4.52ubuntu8/1/class/autotools-files.mk.in
--- cdbs-0.4.52ubuntu7/1/class/autotools-files.mk.in 2008-08-29 15:07:49.000000000 +0200
+++ cdbs-0.4.52ubuntu8/1/class/autotools-files.mk.in 2008-12-03 13:30:10.000000000 +0100
@@ -44,6 +44,24 @@
endif
endif
+ifneq ($(DEB_AUTO_UPDATE_AUTORECONF), )
+ifneq ($(DEB_AUTO_UPDATE_ACLOCAL), )
+$(warning WARNING: DEB_AUTO_UPDATE_AUTORECONF conflicts with DEB_AUTO_UPDATE_ACLOCAL)
+endif
+ifneq ($(DEB_AUTO_UPDATE_AUTOCONF), )
+$(warning WARNING: DEB_AUTO_UPDATE_AUTORECONF conflicts with DEB_AUTO_UPDATE_AUTOCONF)
+endif
+ifneq ($(DEB_AUTO_UPDATE_AUTOHEADERS), )
+$(warning WARNING: DEB_AUTO_UPDATE_AUTORECONF conflicts with DEB_AUTO_UPDATE_AUTOHEADERS)
+endif
+ifneq ($(DEB_AUTO_UPDATE_AUTOMAKE), )
+$(warning WARNING: DEB_AUTO_UPDATE_AUTORECONF conflicts with DEB_AUTO_UPDATE_LIBTOOL)
+endif
+ifneq ($(DEB_AUTO_UPDATE_LIBTOOL), )
+$(warning WARNING: DEB_AUTO_UPDATE_AUTORECONF conflicts with DEB_AUTO_UPDATE_LIBTOOL)
+endif
+endif
+
common-configure-arch common-configure-indep:: debian/stamp-autotools-files
debian/stamp-autotools-files:
$(if $(filter pre,$(DEB_AUTO_UPDATE_LIBTOOL)),cd $(DEB_SRCDIR) && libtoolize -c -f -i)
@@ -51,6 +69,7 @@
$(if $(DEB_AUTO_UPDATE_AUTOCONF),if [ -e $(DEB_SRCDIR)/configure.ac ] || [ -e $(DEB_SRCDIR)/configure.in ]; then cd $(DEB_SRCDIR) && `which autoconf$(DEB_AUTO_UPDATE_AUTOCONF) || which autoconf`; fi)
$(if $(DEB_AUTO_UPDATE_AUTOHEADER),if [ -e $(DEB_SRCDIR)/configure.ac ] || [ -e $(DEB_SRCDIR)/configure.in ]; then cd $(DEB_SRCDIR) && `which autoheader$(DEB_AUTO_UPDATE_AUTOHEADER) || which autoheader` ; fi)
$(if $(DEB_AUTO_UPDATE_AUTOMAKE),if [ -e $(DEB_SRCDIR)/Makefile.am ]; then cd $(DEB_SRCDIR) && automake-$(DEB_AUTO_UPDATE_AUTOMAKE) $(DEB_AUTOMAKE_ARGS) ; fi)
+ $(if $(DEB_AUTO_UPDATE_AUTORECONF),cd $(DEB_SRCDIR) && autoreconf -f -i; fi)
touch debian/stamp-autotools-files
clean::
diff -Nru cdbs-0.4.52ubuntu7/1/class/autotools-vars.mk.in cdbs-0.4.52ubuntu8/1/class/autotools-vars.mk.in
--- cdbs-0.4.52ubuntu7/1/class/autotools-vars.mk.in 2008-08-29 15:07:49.000000000 +0200
+++ cdbs-0.4.52ubuntu8/1/class/autotools-vars.mk.in 2008-12-03 13:32:31.000000000 +0100
@@ -80,7 +80,7 @@
endif
endif
-ifneq (:, $(DEB_AUTO_UPDATE_AUTOCONF):$(DEB_AUTO_UPDATE_AUTOHEADER))
+ifneq (::, $(DEB_AUTO_UPDATE_AUTOCONF):$(DEB_AUTO_UPDATE_AUTOHEADER):$(DEB_AUTO_UPDATE_AUTORECONF))
ifeq ($(DEB_AUTO_UPDATE_AUTOCONF), $(DEB_AUTO_UPDATE_AUTOHEADER))
# avoid duped build-dependencies
ifeq ($(DEB_AUTO_UPDATE_AUTOCONF), 2.13)
@@ -104,6 +104,13 @@
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf
endif
endif
+ifneq (, $(DEB_AUTO_UPDATE_AUTORECONF))
+ifeq ($(DEB_AUTO_UPDATE_AUTORECONF), 2.13)
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf2.13
+else
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf
+endif
+endif
endif
endif
diff -Nru cdbs-0.4.52ubuntu7/debian/changelog cdbs-0.4.52ubuntu8/debian/changelog
--- cdbs-0.4.52ubuntu7/debian/changelog 2008-08-29 15:07:49.000000000 +0200
+++ cdbs-0.4.52ubuntu8/debian/changelog 2008-12-03 13:36:35.000000000 +0100
@@ -1,3 +1,10 @@
+cdbs (0.4.52ubuntu8) UNRELEASED; urgency=low
+
+ * 1/class/autotools-files.mk.in, 1/class/autotools-vars.mk.in:
+ first attempt on _AUTORECONF support
+
+ -- Alexander Sack <asac at ubuntu.com> Wed, 03 Dec 2008 12:30:28 +0100
+
cdbs (0.4.52ubuntu7) intrepid; urgency=low
* Remove need for THIS_SHOULD_GO_TO_UNSTABLE from kde4.m
- Alexander
More information about the ubuntu-devel
mailing list