diff options
author | rwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-27 21:42:23 +0000 |
---|---|---|
committer | rwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-27 21:42:23 +0000 |
commit | 0c62b06e77167b616341518025850b0fb0080884 (patch) | |
tree | 35dad4fd2aae81aa7b422ea771fe21b0da12aad5 /libcpp | |
parent | 499ea14abbec3c57c8d848568b3c8cf0dd365cdd (diff) | |
download | gcc-0c62b06e77167b616341518025850b0fb0080884.tar.gz |
libcpp:
PR preprocessor/35379
* mkdeps.c (deps_write): Ensure the first target always appears
in the first column, without leading backslash newline. Avoid
some more extra whitespace.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 9 | ||||
-rw-r--r-- | libcpp/mkdeps.c | 24 |
2 files changed, 21 insertions, 12 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 5a959c3791e..5b2258e4b1d 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,6 +1,13 @@ +2008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR preprocessor/35379 + * mkdeps.c (deps_write): Ensure the first target always appears + in the first column, without leading backslash newline. Avoid + some more extra whitespace. + 2008-02-25 Thiemo Seufer <ths@mips.com> - Makefile.in ($(srcdir)/config.in): Depend on configure.ac. + * Makefile.in ($(srcdir)/config.in): Depend on configure.ac. 2008-02-19 Tom Tromey <tromey@redhat.com> diff --git a/libcpp/mkdeps.c b/libcpp/mkdeps.c index 8aa96c529e3..11488ce908f 100644 --- a/libcpp/mkdeps.c +++ b/libcpp/mkdeps.c @@ -1,5 +1,5 @@ /* Dependency generator for Makefile fragments. - Copyright (C) 2000, 2001, 2003, 2007 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003, 2007, 2008 Free Software Foundation, Inc. Contributed by Zack Weinberg, Mar 2000 This program is free software; you can redistribute it and/or modify it @@ -298,22 +298,24 @@ deps_write (const struct deps *d, FILE *fp, unsigned int colmax) { size = strlen (d->targetv[i]); column += size; - if (colmax && column > colmax) - { - fputs (" \\\n ", fp); - column = 1 + size; - } if (i) { - putc (' ', fp); - column++; + if (colmax && column > colmax) + { + fputs (" \\\n ", fp); + column = 1 + size; + } + else + { + putc (' ', fp); + column++; + } } fputs (d->targetv[i], fp); } putc (':', fp); - putc (' ', fp); - column += 2; + column++; for (i = 0; i < d->ndeps; i++) { @@ -324,7 +326,7 @@ deps_write (const struct deps *d, FILE *fp, unsigned int colmax) fputs (" \\\n ", fp); column = 1 + size; } - if (i) + else { putc (' ', fp); column++; |