version 1.4, 1996/09/02 16:04:20 |
version 1.5, 1996/11/30 21:09:05 |
|
|
/* $OpenBSD$ */ |
/* $OpenBSD$ */ |
/* $NetBSD: targ.c,v 1.9 1996/08/30 17:59:43 thorpej Exp $ */ |
/* $NetBSD: targ.c,v 1.10 1996/11/06 17:59:27 christos Exp $ */ |
|
|
/* |
/* |
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California. |
* Copyright (c) 1988, 1989, 1990, 1993 |
* Copyright (c) 1988, 1989 by Adam de Boor |
* The Regents of the University of California. All rights reserved. |
* Copyright (c) 1989 by Berkeley Softworks |
* Copyright (c) 1989 by Berkeley Softworks |
* All rights reserved. |
* All rights reserved. |
* |
* |
|
|
*/ |
*/ |
|
|
#ifndef lint |
#ifndef lint |
/* from: static char sccsid[] = "@(#)targ.c 5.9 (Berkeley) 3/1/91"; */ |
#if 0 |
static char *rcsid = "$Id$"; |
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94"; |
|
#else |
|
static char *rcsid = "$OpenBSD$"; |
|
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
/*- |
/*- |
|
|
/*- |
/*- |
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
* Targ_FindList -- |
* Targ_FindList -- |
* Make a complete list of GNodes from the given list of names |
* Make a complete list of GNodes from the given list of names |
* |
* |
* Results: |
* Results: |
* A complete list of graph nodes corresponding to all instances of all |
* A complete list of graph nodes corresponding to all instances of all |
* the names in names. |
* the names in names. |
* |
* |
* Side Effects: |
* Side Effects: |
* If flags is TARG_CREATE, nodes will be created for all names in |
* If flags is TARG_CREATE, nodes will be created for all names in |
|
|
/******************* DEBUG INFO PRINTING ****************/ |
/******************* DEBUG INFO PRINTING ****************/ |
|
|
static GNode *mainTarg; /* the main target, as set by Targ_SetMain */ |
static GNode *mainTarg; /* the main target, as set by Targ_SetMain */ |
/*- |
/*- |
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
* Targ_SetMain -- |
* Targ_SetMain -- |
* Set our idea of the main target we'll be creating. Used for |
* Set our idea of the main target we'll be creating. Used for |
|
|
months[parts->tm_mon], parts->tm_mday, 1900 + parts->tm_year); |
months[parts->tm_mon], parts->tm_mday, 1900 + parts->tm_year); |
return(buf); |
return(buf); |
} |
} |
|
|
/*- |
/*- |
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
* Targ_PrintType -- |
* Targ_PrintType -- |
|
|
register int type; |
register int type; |
{ |
{ |
register int tbit; |
register int tbit; |
|
|
#ifdef __STDC__ |
#ifdef __STDC__ |
#define PRINTBIT(attr) case CONCAT(OP_,attr): printf("." #attr " "); break |
#define PRINTBIT(attr) case CONCAT(OP_,attr): printf("." #attr " "); break |
#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG)) printf("." #attr " "); break |
#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG)) printf("." #attr " "); break |
|
|
Lst_ForEach (gn->parents, TargPrintName, (ClientData)0); |
Lst_ForEach (gn->parents, TargPrintName, (ClientData)0); |
fputc ('\n', stdout); |
fputc ('\n', stdout); |
} |
} |
|
|
printf("%-16s", gn->name); |
printf("%-16s", gn->name); |
switch (gn->type & OP_OPMASK) { |
switch (gn->type & OP_OPMASK) { |
case OP_DEPENDS: |
case OP_DEPENDS: |