Changeset 503 for trunk/src/gmake/vpath.c
- Timestamp:
- Sep 15, 2006, 7:09:38 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/vpath.c
r154 r503 1 1 /* Implementation of pattern-matching file search paths for GNU Make. 2 Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. 2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software 4 Foundation, Inc. 3 5 This file is part of GNU Make. 4 6 5 GNU Make is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2, or (at your option) 8 any later version. 9 10 GNU Make is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with GNU Make; see the file COPYING. If not, write to 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 Boston, MA 02111-1307, USA. */ 7 GNU Make is free software; you can redistribute it and/or modify it under the 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. 10 11 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY 12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 13 A PARTICULAR PURPOSE. See the GNU General Public License for more details. 14 15 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. */ 19 18 20 19 #include "make.h" … … 471 470 In December 1993 I loosened this restriction to allow a file 472 471 to be chosen if it is mentioned as a target in a makefile. This 473 seem logical. */ 472 seem logical. 473 474 Special handling for -W / -o: make sure we preserve the special 475 values here. Actually this whole thing is a little bogus: I think 476 we should ditch the name/hname thing and look into the renamed 477 capability that already exists for files: that is, have a new struct 478 file* entry for the VPATH-found file, and set the renamed field if 479 we use it. 480 */ 474 481 { 475 482 struct file *f = lookup_file (name); 476 483 if (f != 0) 477 exists = not_target || f->is_target; 484 { 485 exists = not_target || f->is_target; 486 if (exists && mtime_ptr 487 && (f->last_mtime == OLD_MTIME || f->last_mtime == NEW_MTIME)) 488 { 489 *mtime_ptr = f->last_mtime; 490 mtime_ptr = 0; 491 } 492 } 478 493 } 479 494 … … 522 537 continue; 523 538 } 539 540 /* Store the modtime into *MTIME_PTR for the caller. */ 541 if (mtime_ptr != 0) 542 { 543 *mtime_ptr = FILE_TIMESTAMP_STAT_MODTIME (name, st); 544 mtime_ptr = 0; 545 } 524 546 } 525 547 … … 529 551 *file = savestring (name, (n + 1 - name) + flen); 530 552 553 /* If we get here and mtime_ptr hasn't been set, record 554 UNKNOWN_MTIME to indicate this. */ 531 555 if (mtime_ptr != 0) 532 /* Store the modtime into *MTIME_PTR for the caller. 533 If we have had no need to stat the file here, 534 we record UNKNOWN_MTIME to indicate this. */ 535 *mtime_ptr = (exists_in_cache 536 ? FILE_TIMESTAMP_STAT_MODTIME (name, st) 537 : UNKNOWN_MTIME); 556 *mtime_ptr = UNKNOWN_MTIME; 538 557 539 558 free (name);
Note:
See TracChangeset
for help on using the changeset viewer.