Changeset 503 for trunk/src/gmake/rule.c
- Timestamp:
- Sep 15, 2006, 7:09:38 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/rule.c
r281 r503 1 1 /* Pattern and suffix rule internals for GNU Make. 2 Copyright (C) 1988,89,90,91,92,93, 1998 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" … … 206 205 depname[0] = '%'; 207 206 bcopy (source, depname + 1, len + 1); 208 deps = (struct dep *) xmalloc (sizeof (struct dep)); 209 deps->next = 0; 207 deps = alloc_dep (); 210 208 deps->name = depname; 211 deps->ignore_mtime = 0;212 deps->need_2nd_expansion = 0;213 209 } 214 210 … … 432 428 /* We might leak dep->name here, but I'm not sure how to fix this: I 433 429 think that pointer might be shared (e.g., in the file hash?) */ 434 free ((char *) dep); 430 dep->name = 0; /* Make sure free_dep does not free name. */ 431 free_dep (dep); 435 432 dep = t; 436 433 } … … 481 478 struct commands *commands, int override) 482 479 { 483 register struct rule *r = (struct rule *) xmalloc (sizeof (struct rule));484 register unsigned int max_targets, i;480 unsigned int max_targets, i; 481 struct rule *r = (struct rule *) xmalloc (sizeof (struct rule)); 485 482 486 483 r->cmds = commands;
Note:
See TracChangeset
for help on using the changeset viewer.