automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AM_DEFAULT_SOURCE_EXT (was: Parallel tests execution [0/4])


From: Akim Demaille
Subject: Re: AM_DEFAULT_SOURCE_EXT (was: Parallel tests execution [0/4])
Date: Sun, 19 Oct 2008 17:56:23 -0500


Le 18 oct. 08 à 03:02, Ralf Wildenhues a écrit :

* Akim Demaille wrote on Thu, Oct 16, 2008 at 04:11:22PM CEST:

I wish I could define

 AM_DEFAULT_SOURCE_EXT = .cc

or whatever, so that I wouldn't have to define all the foo_SOURCES.

I agree "extension" is better than "suffix".  (Even if Automake itself
is inconsistent here and uses both.)

Hum, actually I meant to use extensions without the dot :( Trying to find a distinctive meaning to extension and suffix… Of course you should add a period before an extension to get a suffix only when the extension is non-empty :)

I also agree that using *_EXT is better than *_EXTENSION (too long, also
there is precedent in EXEEXT and OBJEXT).

I am wondering whether DEFAULT_SOURCE_EXT would be preferable to
AM_DEFAULT_SOURCE_EXT?

I made it AM_ to avoid infringing on the user name space, but I'm fine with just any name.

WDYT about the simplistic patch below?
(yes, allowing conditional definition would be the next step.)

Never thought about that :)  Yuck, yuck.

Cheers, and good idea BTW!

Bah, it's easy to have good ideas when you have the need. What's harder is what you did: to come up with a solution. And documentation. And tests. And NEWS :)


+ (my $default_source = $unxformed) =~ s,(\.[^./\\]*)?$, $default_source_ext,;

So Automake cannot leave with using "$(AM_DEFAULT_SOURCE_EXT)" as a symbolic value? It really needs to perform the substitution statically? Otherwise all the rest comes for free (conditionals, possibility to change the extension on the command line (not that I think of a particular use here, but...)).


@example
check_PROGRAMS = test1 test2 test3
+AM_DEFAULT_SOURCE_EXT = .cpp
@end example

Just my 0.02 French Francs (yeah, I know, today the currency is €, but in the context of criticism/critique, the French currency definitely seems more appropriate): .cpp reminds me too me about CPP, I prefer .cc/.cxx :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]