Skip to content

Autobuild3 Tips and Tricks

Mingcong Bai edited this page Jan 1, 2017 · 3 revisions

Tips and Tricks

Some basic tips, neat or dirty, are shown in this section. Feel free to skip around to find what you need.

Make the best out of your build Types

It sucks to write build scripts in autobuild/build, but in many cases you may find yourself not able to use any of the build types because nothing matches the scenario. But in some edge cases you will still be able to use the pre-defined build types.

Here below are some classic cases when using some tricks can save you some work.

Case 1

You have a source code that needs the following procedure to build.

./bootstrap
make
make install DESTDIR="$PKGDIR"

Note: "$PKGDIR" is Autobuild3's internal definition for "packaging directory", which is usually abdist in the source root.

While the plainmake build type would not be able to run the ./bootstrap command for you. No worries, put that command in your autobuild/prepare file.

./bootstrap

And append the following line to autobuild/defines.

ABTYPE=plainmake

And there you go.

Case 2

You have a source code with a configure script in its source root, however this is not a true GNU autotools-generated configure, therefore default configure argument defined by Autobuild3 will not apply, leading to error or mis-configuration.

You may resolve this issue by overriding $AUTOTOOLS_DEF in autobuild/prepare. Change the line below to suit your case.

AUTOTOOLS_DEF="-prefix /usr"

P.S. Usually when a non-GNU autotools configure is provided, it does not support shadow build. Append this line to autobuild/defines.

ABSHADOW=no