Autotools module and mandatory autogen



Hi,

Projects using the Autotools can all be built with the following
invocations, or similar:

    $ ./autogen.sh
    $ ./configure
    $ make
    $ make install

The autogen step sometimes uses other scripts, or even just requires
running the autoreconf command, and BuildStream tires to handle the
common combinations for it.

In addition, the autogen step is often considered optional when
building from tarballs, and only mandatory when building from Git.

However, BuildStream unconditionally runs the autogen step, even when
building from tarballs.

From a quick chat with Tristan on IRC, I gathered that this was a
conscious decision, and I'm not going to debate this.

However, what I'd like to discuss is that if the autogen step is
considered mandatory, then it should really be always run, whereas
currently some projects seem to fall through and skip straight to the
configure step.

BuildStream currently uses the following:

    if [ -e autogen ]; then ./autogen;
    elif [ -e autogen.sh ]; then ./autogen.sh;
    elif [ -e bootstrap ]; then ./bootstrap;
    elif [ -e bootstrap.sh ]; then ./bootstrap.sh;
    elif [ ! -e ./configure ]; then autoreconf -ivf;
    fi

Python upstream tarballs (and Git as well):

* do not include an {autogen,bootstrap}{,.sh} script
* do include a configure script

As a result, the autogen step is completely skipped when building
Python, moving straight to the configure step.

I originally only had Python in my pipeline as an autotools module, and
it was building fine even though I did not have the autotools available
at build time. When I added a second module, I was surprised to find
that BuildStream insisted on running the autogen step even though the
configure script was present in the tarball.

After diging up I found this was expected, and that the outlier wasn't
that new element I had just added, but the Python one, which skipped
the autogen step.

I have to admit the difference in treatment surprised me a lot, and I
can see it leading to a lot of confusion in the future. IMHO if
BuildStream considers that the autogen step is mandatory, then it
really should always run it no matter what.

A simple (untested) fix would be to use the following conditionals
instead:

    if [ -e autogen ]; then ./autogen;
    elif [ -e autogen.sh ]; then ./autogen.sh;
    elif [ -e bootstrap ]; then ./bootstrap;
    elif [ -e bootstrap.sh ]; then ./bootstrap.sh;
    else autoreconf -ivf;
    fi

What do people here think? Does this seem important? Or am I just
blocked on some unjustified need for absolute consistency? :)

Cheers,


-- 
Mathieu


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