Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site CSL-Vax.ARPA Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!decwrl!CSL-Vax!mann From: mann@CSL-Vax.ARPA (Tim Mann) Newsgroups: net.sources Subject: Re: makedep: construct dependency lines for makefiles Message-ID: <1108@CSL-Vax.ARPA> Date: Fri, 26-Oct-84 00:36:11 EDT Article-I.D.: CSL-Vax.1108 Posted: Fri Oct 26 00:36:11 1984 Date-Received: Mon, 22-Oct-84 06:48:23 EDT References: <109@Navajo.ARPA> <1548@wateng.UUCP> Organization: Stanford University Lines: 92 > I think there is something wrong with the distribution. Where is "makedep.h" > and why does the buildfile (/* you need buildmake */) include a non-existent > file called "dependencies". > > David Hawley > University of Waterloo The missing "dependencies" is due to a circularity: makedep's buildfile uses makedep to build its own dependencies. You can start out with an empty "dependencies" file to make the initial makefile. I'm sorry if makedep.h got left out. I don't have the original shar archive anymore so I have no way of guessing what went wrong. At any rate, here it is: /* * Primary include file for makedep */ #include#include #define FALSE 0 #define TRUE 1 extern int errno; int Debug; char *MyName; /* name by which makedep was invoked */ /* * List definitions */ /* StringList record states. */ #define HEADER 1 #define UNPROCESSED 2 #define PROCESSED 3 #define START_MARK_VALUE 4 typedef struct StringListType { char *str; int state; struct DepListType *dep; struct StringListType *next; } StringList; typedef struct DepListType { struct StringListType *inclFile; struct DepListType *next; } DepList; extern StringList *MakeList(); /* * Various string objects and their default defns. */ /* Extensions for object. */ #define DefaultObjExt "o" #define DefaultVObjExt "b" char ObjExt[16]; /* Source file list. */ StringList *SrcFiles; /* Search lists for include files. */ #define DefaultVInclDirs "/usr/sun/include /usr/local/include /usr/include" #define DefaultXVInclDirs "/usr/sun/xinclude /usr/sun/include /usr/local/include /usr/include" #define DefaultUnixInclDirs "/usr/include" StringList *InclDirs; StringList *UserInclDirs; /* Output file name. */ #define DefaultOutputFileName "dependencies" char OutputFileName[128]; /* Command line option flags */ int NFlag, UFlag, VFlag, xVFlag, eFlag; /* List of include files that have been encountered. */ StringList *IList; #define Equal(a,b) (strcmp(a,b) == 0)