Changeset 1993 for trunk/src/kmk/file.c
- Timestamp:
- Oct 29, 2008, 1:37:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/file.c
r1980 r1993 1 1 /* Target file management for GNU Make. 2 2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software 4 4 Foundation, Inc. 5 5 This file is part of GNU Make. … … 7 7 GNU Make is free software; you can redistribute it and/or modify it under the 8 8 terms of the GNU General Public License as published by the Free Software 9 Foundation; either version 2, or (at your option) any later version. 9 Foundation; either version 3 of the License, or (at your option) any later 10 version. 10 11 11 12 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY … … 14 15 15 16 You should have received a copy of the GNU General Public License along with 16 GNU Make; see the file COPYING. If not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ 17 this program. If not, see <http://www.gnu.org/licenses/>. */ 18 18 19 19 #include "make.h" … … 337 337 if (to_file->cmds->fileinfo.filenm != 0) 338 338 error (&from_file->cmds->fileinfo, 339 _(" Commands werespecified for file `%s' at %s:%lu,"),339 _("Recipe was specified for file `%s' at %s:%lu,"), 340 340 from_file->name, to_file->cmds->fileinfo.filenm, 341 341 to_file->cmds->fileinfo.lineno); 342 342 else 343 343 error (&from_file->cmds->fileinfo, 344 _(" Commands for file `%s' werefound by implicit rule search,"),344 _("Recipe for file `%s' was found by implicit rule search,"), 345 345 from_file->name); 346 346 error (&from_file->cmds->fileinfo, … … 348 348 from_file->name, to_hname); 349 349 error (&from_file->cmds->fileinfo, 350 _(" Commands for `%s' will be ignored in favor of those for `%s'."),350 _("Recipe for `%s' will be ignored in favor of the one for `%s'."), 351 351 to_hname, from_file->name); 352 352 } … … 458 458 /* Is this file eligible for automatic deletion? 459 459 Yes, IFF: it's marked intermediate, it's not secondary, it wasn't 460 given on the command -line, and it's either a -include makefile or460 given on the command line, and it's either a -include makefile or 461 461 it's not precious. */ 462 462 if (f->intermediate && (f->dontcare || !f->precious) … … 580 580 for (d = old; d != 0; d = d->next) 581 581 { 582 size_t buffer_offset; /* bird */583 582 struct dep *new, *d1; 584 583 char *p; … … 628 627 { 629 628 p = variable_expand (""); 630 buffer_offset = p - variable_buffer;631 629 #ifndef CONFIG_WITH_STRCACHE2 632 630 variable_buffer_output (p, d->name, strlen (d->name) + 1); … … 635 633 variable_buffer_output (p, d->name, len + 1); 636 634 #endif 637 p = variable_buffer + buffer_offset; /* bird - variable_buffer may have been reallocated. (observed it) */635 p = variable_buffer; 638 636 } 639 637 else … … 645 643 char *o; 646 644 char *buffer = variable_expand (""); 647 buffer_offset = buffer - variable_buffer; /* bird */648 645 649 646 o = subst_expand (buffer, d->name, "%", "$*", 1, 2, 0); 650 buffer = variable_buffer + buffer_offset; /* bird - variable_buffer may have been reallocated. */ 651 652 d->name = strcache_add_len (buffer, o - buffer); 647 buffer = variable_buffer; /* bird - variable_buffer may have been reallocated. */ 648 649 d->name = strcache_add_len (variable_buffer, 650 o - variable_buffer); 653 651 d->staticpattern = 0; /* Clear staticpattern so that we don't 654 652 re-expand %s below. */ … … 691 689 const char *pattern = "%"; 692 690 char *buffer = variable_expand (""); 693 const size_t buffer_offset = buffer - variable_buffer; /* bird */694 691 struct dep *dp = new, *dl = 0; 695 692 … … 732 729 the if case does and strcache would appreciate it. */ 733 730 } 734 buffer = variable_buffer + buffer_offset; /* bird fix - variable_buffer may have been reallocated. */731 buffer = variable_buffer; /* bird fix - variable_buffer may have been reallocated. */ 735 732 736 733 … … 1193 1190 puts (_("# Phony target (prerequisite of .PHONY).")); 1194 1191 if (f->cmd_target) 1195 puts (_("# Command -line target."));1192 puts (_("# Command line target.")); 1196 1193 if (f->dontcare) 1197 1194 puts (_("# A default, MAKEFILES, or -include/sinclude makefile.")); … … 1227 1224 { 1228 1225 case cs_running: 1229 puts (_("# Commandscurrently running (THIS IS A BUG)."));1226 puts (_("# Recipe currently running (THIS IS A BUG).")); 1230 1227 break; 1231 1228 case cs_deps_running: 1232 puts (_("# Dependencies commandsrunning (THIS IS A BUG)."));1229 puts (_("# Dependencies recipe running (THIS IS A BUG).")); 1233 1230 break; 1234 1231 case cs_not_started:
Note:
See TracChangeset
for help on using the changeset viewer.