automake
[Top][All Lists]
Advanced

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

Re: [RFC v2] new option: object-shortname


From: Gavin Smith
Subject: Re: [RFC v2] new option: object-shortname
Date: Fri, 8 Jan 2016 14:33:11 +0000

On 6 January 2016 at 09:23, Thomas Martitz <address@hidden> wrote:
> This option is intended to be used in conjunction with subdir-objects and
> Automake-time substitutions for included makefile fragments (%C%, %D%). It
> suppresses the generation path components in object filenames.
>
> It should equivalent to setting %C%_foo_SHORTNAME=foo, except it can work if
> the makefile fragment is conditionally included, which improves the modularity
> of Automake-using projects.
>
> Example:
> without object-shortname
>   root/path/to/Makefile.am:
>   bin_PROGRAMS += foo
>   %C%_foo_CFLAGS = $(CFLAGS)
>
> results in objects:
>   root/path/to/root_path_to_foo-foo.o
>
> with object-shortname the object filename is:
>   root/path/to/foo-foo.o
>
> And it allows the following in root/Makefile.am (not possible with 
> foo_SHORTNAME=foo)
>   if ENABLE_FOO
>   include path/too/Makefile.am
>   endif

The conditional could be moved into the Makefile fragment and the
SHORTNAME left outside of it. I don't know if that's desirable for
you.

Failing that, it would be better for conditional SHORTNAME to work,
instead of adding a new option.



reply via email to

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