[Gambas-devel] gbmake. A drop-in replacement to automake

Sebastian Kulesz sebikul at ...176...
Wed Sep 5 05:02:17 CEST 2012


Hi all !!

I really think Gambas is a great language to work with, but lets face
it, from the point of view of a beginner, distributing an application
is a pain in the a**. There is no *standard* way to build a project
(other than executing gbc3/gba3 directly if we let the IDE aside),
this makes it difficult to create debian packages, PPAs, etc. as they
all require some sort of autoconf script to manage the process.
Without the IDE, an user can do much. And with it, this implies
installing every component it depends on (a total of 15).

To create a PPA of a gambas application, for example, the user has 2
choices. He can either write a Makefile (more bugs, no portability,
etc) or create a dummy autoconf package, skim the files and replace
what is needed (package name, version, etc), and merge it with his
project.

These are really just a few examples of the problems i faced not so
long ago. With this in mind, i created this little tool to automate
the building of gambas apps. It works as a *drop in* replacement for
make (*seriously*, you can run "make", "make clean", and "sudo make
install" without a single script, autoconf, automake, m4 macro).

I also wrote the app with Quickly [0] in mind. For example, if you
want to debianize a project, you can run "gbmake debianize" or just
"make debianize" and that is it. It will automatically create a
skeleton debian/ folder which should work out-of-the-box. Maybe a
"make source" to create a source archive?

I just started it today, so only the building process is really
implemented (build, clean, install) but I really see a lot of
potential here. Once it's completed, the autotools package may be
dropped (it will be completely replaced and the user will have to do
nothing). Uploading packages to a PPA will be much easier. Users won't
depend on the IDE to perform administrative tasks, such as building a
package or a source archive.

I will need some help to port the packaging code in the IDE to work in
headless mode. I'm trying to make this tool to only depend on the
interpreter, so no single component has to be installed for it to
work. This means implementing a custom option parser, and settings
parser. I have zero knowledge of Slackware, OpenSUSE, Mandriva, Mageia
and Fedora (and it's derivatives), so i will only be able to port the
code, but i can't test for any bugs or regressions.

How does it works? It's really simple actually. You will see 2
Makefiles included. the one named Makefile.1 should be used to install
the app in the first place.

sudo make -f Makefile.1 install

This command will build the project and install it (/usr/bin/gbmake).
The second Makefile only wraps the commands sent to "make" to
"gbmake". It's really the same, but we are all used to type make *,
aren't we? ;-)

In this case, only adding this Makefile to a project will let "make"
work out of the box, otherwise, "gbmake" will work just fine.

I will try to have the Debian part finished by the end of the week so
i can provide a working example, this is just a *proof of concept*,
and a call for everybody who would like to help. I'm a little skeptic
about merging this to trunk (even as a branch), as it's a work in
progress, and it will just confuse the users. Besides, 3.3 is around
the corner and this will only bring more bugs. Maybe 3.4 if we hurry.

I'm really anxious to hear your comments!

Thanks!

[0] https://wiki.ubuntu.com/Quickly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gbmake-0.0.1.tar.gz
Type: application/x-gzip
Size: 9818 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20120905/406f3235/attachment.bin>


More information about the Devel mailing list