[Gambas-user] autotools base installer for gambas2 projects

Benoit Minisini gambas at ...1...
Sat Jul 14 23:04:03 CEST 2007


On vendredi 13 juillet 2007, Laurent Carlier wrote:
> I've done some work with autotools for a personnal project, here is some
> results.
>
> Theses files allow you to build your gambas project with the
> classic ./configure, make, make install, make dist, make uninstall. The
> currents limitations are :
> - doesn't support gambas component building (not really hard to add)
> - support only one project.
>
> The scripts will add automaticly project name and version to the package
> created with make dist. Components needed for the build are detected
> (perhaps not perfectly). Gambas2 utilities are detected too (gba2 and gbc2)
>
> this simple configure.ac do the trick :
> dnl ---- Initialization
>
> AC_INIT(configure.ac)
> GB_INIT_PROJECT(myproject)
>
> dnl ---- Create makefiles
>
> AC_OUTPUT( \
> Makefile \
> )
>
> the output  :
> lordh at ...1728...:~/gbSVN/gameonlinuxHome/trunk$ ./reconf
> /usr/share/aclocal/smpeg.m4:13: warning: underquoted definition of
> AM_PATH_SMPEG
>   run info '(automake)Extending aclocal'
>   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
> lordh at ...1728...:~/gbSVN/gameonlinuxHome/trunk$ ./configure
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking for gambas2 binaries... Ok
> checking for gb.qt component... Ok
> checking for gb.net component... Ok
> checking for gb.net.curl component... Ok
> configure: creating ./config.status
> config.status: creating Makefile
> lordh at ...1728...:~/gbSVN/gameonlinuxHome/trunk$ make
> Compiling GameOnLinux...
> OK
> lordh at ...1728...:~/gbSVN/gameonlinuxHome/trunk$ sudo make install
> make[1]: entrant dans le
> répertoire « /home/lordh/gbSVN/gameonlinuxHome/trunk »
> Installing GameOnLinux.gambas file in /usr/local/bin...
> make[1]: Rien à faire pour « install-data-am ».
> make[1]: quittant le répertoire « /home/lordh/gbSVN/gameonlinuxHome/trunk »
> lordh at ...1728...:~/gbSVN/gameonlinuxHome/trunk$ sudo make uninstall
> Removing GameOnLinux.gambas file...
> lordh at ...1728...:~/gbSVN/gameonlinuxHome/trunk$ make dist
> { test ! -d GameOnLinux-0.0.1 || { find GameOnLinux-0.0.1 -type
> d ! -perm -200 -exec chmod u+w {} ';' && rm -fr GameOnLinux-0.0.1; }; }
> mkdir GameOnLinux-0.0.1
> make  \
>           top_distdir="GameOnLinux-0.0.1" distdir="GameOnLinux-0.0.1" \
>           dist-hook
> make[1]: entrant dans le
> répertoire « /home/lordh/gbSVN/gameonlinuxHome/trunk »
> make[1]: quittant le répertoire « /home/lordh/gbSVN/gameonlinuxHome/trunk »
> find GameOnLinux-0.0.1 -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
>           ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
>           ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
>           ! -type
> d ! -perm -444 -exec /bin/bash
> /home/lordh/gbSVN/gameonlinuxHome/trunk/install-sh -c -m a+r {} {} \; \
>
>         || chmod -R a+r GameOnLinux-0.0.1
>
> tardir=GameOnLinux-0.0.1
> && /bin/bash /home/lordh/gbSVN/gameonlinuxHome/trunk/missing --run tar
> chof - "$tardir" | GZIP=--best gzip -c >GameOnLinux-0.0.1.tar.gz
> { test ! -d GameOnLinux-0.0.1 || { find GameOnLinux-0.0.1 -type
> d ! -perm -200 -exec chmod u+w {} ';' && rm -fr GameOnLinux-0.0.1; }; }
>
>
>
> Have fun !

Is it possible that you put that inside the IDE? In a clean way of course :-)

-- 
Benoit Minisini




More information about the User mailing list