comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: CPAN style Ada repository
Date: Thu, 12 Dec 2013 10:12:52 -0600
Date: 2013-12-12T10:12:52-06:00	[thread overview]
Message-ID: <85r49iyrnf.fsf@stephe-leake.org> (raw)
In-Reply-To: 20131211214934.690d2601@hactar.xn--rombobjrn-67a.se

Björn Persson <bjorn@xn--rombobjrn-67a.se> writes:

> CPAN has it easy by comparison. There is only one Perl interpreter
> (probably because the language is such a hideous mess that it's
> impossible to write a compatible second implementation), so they don't
> need to worry about different compilers.

excellent point.

> One thing that would help considerably, and that would be surmountable,
> would be if developers of free Ada software could agree on some
> conventions for how makefiles should be written. Free projects usually
> have build systems made of makefiles and Gnat project files, but most of
> them are too inflexible to adapt to different filesystem layouts,
> support staging or allow compiler options to be customized. Packaging
> is slow when packagers have to figure out how each makefile works and
> often patch makefiles to get them to meet packaging standards. We could
> get much more libraries and programs packaged if developers would follow
> some conventions. Such conventions would need to work for mixed-language
> projects as well as pure Ada projects, and for both Gnatmake and
> GPRbuild.

This is a reasonable idea; I would participate in discussions around
this. 

There's a related but orthogonal topic of Ada modes for various IDE's;
the upstream packages could contain appropriate project files for at
least some IDEs.

I'm maintaining Emacs Ada mode, and looking into improving AdaCore's GPS
to get some of the features (and vice versa). So my packages will have
Emacs Ada mode project files, and GNAT gpr files.

There is also Eclipse; are there any other reasonably popular IDEs that
Ada people use?

> I recommend using the Make variable names from the GNU Coding Standards
> (https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html) 
> and extending that with Ada-specific variables in the same style.

I'll have to study that.

> Developers, please support LDFLAGS for linker options, and support
> CFLAGS if there is C code in your project. Stick to this naming scheme
> and use "ADAFLAGS" for Ada compiler options, "GNATBINDFLAGS" for
> Gnatbind options, and so on.

Sounds reasonable

> Support the GNU standard directory variables so that your software can
> be installed in different systems with different filesystem layouts:
> prefix, exec_prefix, bindir, libdir, libexecdir and all the others as
> appropriate for the types of files that your project installs. 

I would leave "install" to the packagers; upstream Makefiles should just
build in place.

> Writing such a flexible makefile is of course nontrivial work that you
> don't want to do over and over. You can avoid most of the work by using
> Comfignat (https://www.rombobjörn.se/Comfignat/). Comfignat gives you
> all of the above, except that limitations in Gnatmake's and GPRbuild's
> command line syntax prevent it from automatically supporting LDFLAGS
> and GNATBINDFLAGS when libraries are built.

I haven't looked at this yet. But it sounds like an Ada-style
alternative to automake, which is very welcome.

-- 
-- Stephe


  reply	other threads:[~2013-12-12 16:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28 15:41 CPAN style Ada repository banjo
2013-11-29  7:04 ` Thomas Løcke
2013-12-12 10:17   ` Lucretia
2013-12-13  6:54     ` J Kimball
2013-12-13  9:58       ` Lucretia
2013-11-29 19:22 ` Felix Krause
2013-11-29 20:17   ` Simon Wright
2013-11-29 22:53     ` Dennis Lee Bieber
2013-12-09 23:45       ` Yannick Duchêne (Hibou57)
2013-11-29 22:13   ` Jeffrey Carter
2013-11-29 22:15   ` Georg Bauhaus
2013-12-03 18:12     ` Martin
2013-12-03 19:03     ` Randy Brukardt
2013-11-30  1:20   ` Shark8
2013-11-30 13:46   ` gautier_niouzes
2013-11-29 22:07 ` Stephen Leake
2013-11-30 13:12   ` Jacob Sparre Andersen
2013-12-02 17:10     ` Tero Koskinen
2013-12-01  6:36 ` johannes falcone
2013-12-01  7:08   ` Simon Wright
2013-12-01 11:18     ` Brian Drummond
2013-12-01 11:19     ` Brian Drummond
2013-12-01 12:18       ` Jacob Sparre Andersen
2013-12-01  8:24   ` Jacob Sparre Andersen
2013-12-11 20:49 ` Björn Persson
2013-12-12 16:12   ` Stephen Leake [this message]
2013-12-13 11:52     ` darkestkhan
2013-12-13 18:38     ` Björn Persson
2013-12-15  5:40       ` Stephen Leake
2013-12-12  8:23 ` Jacob Sparre Andersen
2013-12-12  9:55   ` Yannick Duchêne (Hibou57)
2013-12-12 10:26     ` Jacob Sparre Andersen
2013-12-12 10:37       ` Brian Drummond
2013-12-12 11:39       ` G.B.
2013-12-12 22:20         ` Jacob Sparre Andersen
2013-12-13  5:43           ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox