dir.c (241146) | dir.c (249033) |
---|---|
1/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */ | 1/* $NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $ */ |
2 3/* 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Adam de Boor. 9 * --- 55 unchanged lines hidden (view full) --- 65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 69 * SUCH DAMAGE. 70 */ 71 72#ifndef MAKE_NATIVE | 2 3/* 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Adam de Boor. 9 * --- 55 unchanged lines hidden (view full) --- 65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 69 * SUCH DAMAGE. 70 */ 71 72#ifndef MAKE_NATIVE |
73static char rcsid[] = "$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"; | 73static char rcsid[] = "$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"; |
74#else 75#include <sys/cdefs.h> 76#ifndef lint 77#if 0 78static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; 79#else | 74#else 75#include <sys/cdefs.h> 76#ifndef lint 77#if 0 78static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; 79#else |
80__RCSID("$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"); | 80__RCSID("$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"); |
81#endif 82#endif /* not lint */ 83#endif 84 85/*- 86 * dir.c -- 87 * Directory searching using wildcards and/or normal names... 88 * Used both for source wildcarding in the Makefile and for finding --- 51 unchanged lines hidden (view full) --- 140 141#include <dirent.h> 142#include <errno.h> 143#include <stdio.h> 144 145#include "make.h" 146#include "hash.h" 147#include "dir.h" | 81#endif 82#endif /* not lint */ 83#endif 84 85/*- 86 * dir.c -- 87 * Directory searching using wildcards and/or normal names... 88 * Used both for source wildcarding in the Makefile and for finding --- 51 unchanged lines hidden (view full) --- 140 141#include <dirent.h> 142#include <errno.h> 143#include <stdio.h> 144 145#include "make.h" 146#include "hash.h" 147#include "dir.h" |
148#include "job.h" |
|
148 149/* 150 * A search path consists of a Lst of Path structures. A Path structure 151 * has in it the name of the directory and a hash table of all the files 152 * in the directory. This is used to cut down on the number of system 153 * calls necessary to find implicit dependents and their like. Since 154 * these searches are made before any actions are taken, we need not 155 * worry about the directory changing due to creation commands. If this --- 1302 unchanged lines hidden (view full) --- 1458 1459 fullName = Dir_FindFile(cp, Suff_FindPath(gn)); 1460 if (fullName) { 1461 /* 1462 * Put the found file in gn->path 1463 * so that we give that to the compiler. 1464 */ 1465 gn->path = bmake_strdup(fullName); | 149 150/* 151 * A search path consists of a Lst of Path structures. A Path structure 152 * has in it the name of the directory and a hash table of all the files 153 * in the directory. This is used to cut down on the number of system 154 * calls necessary to find implicit dependents and their like. Since 155 * these searches are made before any actions are taken, we need not 156 * worry about the directory changing due to creation commands. If this --- 1302 unchanged lines hidden (view full) --- 1459 1460 fullName = Dir_FindFile(cp, Suff_FindPath(gn)); 1461 if (fullName) { 1462 /* 1463 * Put the found file in gn->path 1464 * so that we give that to the compiler. 1465 */ 1466 gn->path = bmake_strdup(fullName); |
1466 fprintf(stdout, 1467 "%s: ignoring stale %s for %s, found %s\n", 1468 progname, makeDependfile, gn->name, fullName); | 1467 if (!Job_RunTarget(".STALE", gn->fname)) 1468 fprintf(stdout, 1469 "%s: %s, %d: ignoring stale %s for %s, " 1470 "found %s\n", progname, gn->fname, gn->lineno, 1471 makeDependfile, gn->name, fullName); |
1469 } 1470 } 1471 } 1472 if (DEBUG(DIR)) 1473 fprintf(debug_file, "Found '%s' as '%s'\n", 1474 gn->name, fullName ? fullName : "(not found)" ); 1475 } 1476 } else { --- 326 unchanged lines hidden --- | 1472 } 1473 } 1474 } 1475 if (DEBUG(DIR)) 1476 fprintf(debug_file, "Found '%s' as '%s'\n", 1477 gn->name, fullName ? fullName : "(not found)" ); 1478 } 1479 } else { --- 326 unchanged lines hidden --- |