This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Properly quote words in Makefile.in (GTFILES)
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 5 Aug 2008 20:28:30 +0200
- Subject: Re: [patch] Properly quote words in Makefile.in (GTFILES)
- References: <Pine.LNX.4.64.0808051520020.6093@wotan.suse.de>
Hello Michael,
* Michael Matz wrote on Tue, Aug 05, 2008 at 03:28:40PM CEST:
> I happen to have single-character files in my gcc build-directory. This
> inerferes with generation of gtyp-input.list because write_entries_to_file
> doesn't quote the words. These words contain strings like "[ada]", which
> are passes unquoted to the shell 'echo', hence I end up with lines like
Ouch. Sorry about introducing that glitch.
> That of course mean we can't ever use filenames containing leading spaces
> or '\n'. Tough luck.
'make' already disallows that. Of course, an alternative solution to
the second problem would be to pipe the output of tr through sed '/^$/d'.
> I didn't to a full regstrap with this, only compared the gtyp-input.list
> file with one from a clean tree, ensured that all gt-* output files exist
> and that the compiler builds. Okay for trunk anyway?
It looks ok to me, but I cannot approve it.
For the looks, one could also remove consecutive spaces from the
definition of $(GTFILES) (e.g., after basic-block.h), but I guess
you wanted to avoid having to introduce such changes with your
gengtype.c change.
A similar construct is used in libjava/Makefile.am.
AFAICS all words it goes over currently are not globs, so
it should not be a problem (OTOH, the install-data-local
rule quite likely dislikes empty lines).
> * Makefile.in (write_entries_to_file): Quote words.
> * gengtype.c: (read_input_line): Skip over leading white-space.
Cheers, and thanks,
Ralf