This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libgo patch committed: Add SPARC RTEMS specific file
- From: Ian Lance Taylor <iant at google dot com>
- To: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- Cc: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Sat, 22 Jan 2011 21:23:35 -0800
- Subject: Re: libgo patch committed: Add SPARC RTEMS specific file
- References: <mcrpqrpbssb.fsf@google.com> <20110122081418.GA31840@gmx.de>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
> * Ian Lance Taylor wrote on Sat, Jan 22, 2011 at 03:01:40AM CET:
>> If anybody knows of a simple way to use automake with files
>> that may or may not exist, please let me know. I'd prefer to avoid
>> configure tests since they separate the test and the use in a way that I
>> find hard to maintain over time.
>
> Hmm, you can
>
> if COND
> foo_SOURCES += bar.go
> endif
>
> or you can
>
> foo_SOURCES = $(computed)
> EXTRA_foo_SOURCES = bar1.go bar2.go bar3.go
>
> where $(computed) must come from the second set.
>
> If you want to use only Posix make, then you need to have at least some
> bit of computation at configure time for this.
Thanks, I know about those possibilities, but they aren't what I want,
because they require me to determine whether the files exist in the
configure script and to then use that determination in the Makefile. I
don't want to split things up that way. I want to say something like
foo_SOURCES = `test -f f.c && echo f.c`
Ian