[Geany] Automated makefile

Nicolas Hillegeer nicolashillegeer at xxxxx
Fri May 29 21:29:50 UTC 2009


Hi Andrew!

You're completely right about that, although Dev-C++ seems to have its own
makefile generator (and then calls the MingW or MSYS make, not sure), it
wouldn't
be necessary to reinvent the wheel. So the sensible solution would indeed be
to make a plugin that is kind off like a front-end for a tool that makes
makefiles (I'm actually baffled by the amount
of indirection here ;) ). Even though currently I'm preparing for my exams,
I can't quite keep my mind off more interesting things like this.

That being said, I think a direct SCons file generator would be pretty easy
to make, since everyone is saying how simple it really is. Then I'd need to
make some kind of dialog where you
can select all kinds of options (probably per language then, in the
beginning only C would be supported), like the optimisation level, or to
strip the executable afterwards, or even to make a debug version et cetera.
The plugin could also be made to be buildtool-backend agnostic, with several
modules providing support for each (plugins for a plugin?!). So you could
choose in the plugin dialog for your project whether you want SCons or Make
or something else. You'd probably also need a general setup to point to the
paths where the buildtools are located (SCons directory, ...).

So basically in the beginning it could be:

tool | language
--------------------
SCons | C

But later there could be:

-------------------
Ant | Java
Ant | C
Ant | C++

Or some other crazy stuff :)

Some languages also don't need buildtools I presume, but the plugin wouldn't
interfere unless activated. Maybe it could store options in the project
.geany file, or maybe it would use a .geany-buildopt file.

Well, enough ranting out of me, need to get back to studying (which is to
say this plugin isn't for tomorrow, or even next month).

Thanks for the files Andrew, now I can at least try if they work when I'm
taking a break.

Cheers, Nicolas

On Fri, May 29, 2009 at 1:50 AM, Andrew Janke <a.janke at gmail.com> wrote:

> Hi Nicolas,
>
> On Thu, May 28, 2009 at 18:49, Nicolas Hillegeer
> <nicolashillegeer at gmail.com> wrote:
> > I've been searching the web for some time (including these lists), and
> I'm
> > sorry if I've missed it, but is there any feature?
>
>
> I haven't been following this thread much but surely it would be daft
> to re-invent the wheel inside geany for this when there is already
> cmake, genmake, and of course my favourite automake/autoconf the
> venerable old dinosaurs that they are. Surely such a thing in geany
> would just call an external script (of some description, perl? python?
> bash?) that created the Makefile.am and configure.ac and then called
> the appropriate things.
>
> ie:   (replace all the things in <>)
>
> For Makefile.am:
>
> -----
> AUTOMAKE_OPTIONS = check-news
> ACLOCAL_AMFLAGS = -I m4
>
> bin_PROGRAMS = <program_name>
> dist_man1_MANS = <man pages>
>
> <program_name>_SOURCES = <headers.h sourcefiles.c sourcefiles.cxx>
> -----
>
> for configure.ac
>
> ----
> # Require autoconf 2.57 or newer.
> AC_PREREQ([2.57])
>
> AC_INIT([<program_name>],[<version>],[<username>])
> AC_CONFIG_SRCDIR([<first source file.c>])
>
> AM_INIT_AUTOMAKE
>
> # The argument is the name of the generated header file.
> # It is recommended to leave it as "config.h".
> AC_CONFIG_HEADERS([config.h])
>
> # Checks for programs.
> AC_PROG_CC
> AC_PROG_INSTALL
>
> # Finish up by writing output files.
> AC_CONFIG_FILES([Makefile])
> ----
>
> Then all you have to do is call these:
>
>   aclocal -I m4
>   autoheader
>   automake --add-missing --copy
>   autoreconf
>
> and from there:
>
>   configure
>   make
>
> I am sure there are (simpler) recipes for doing this with cmake and
> the likes, but this is what I do for GNU style projects that I want to
> have build cross-platform.
>
>
>
> --
> Andrew Janke
> (a.janke at gmail.com || http://a.janke.googlepages.com/)
> Canberra->Australia    +61 (402) 700 883
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20090529/a9a07153/attachment.html>


More information about the Users mailing list