Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.sources.d Subject: Re: Looking for a make version to better support software versions Message-ID: <2784@auspex.auspex.com> Date: 3 Jan 90 00:35:45 GMT References: <1440@jimi.cs.unlv.edu> <688@caldwr.UUCP> Organization: Auspex Systems, Santa Clara Lines: 31 >The Sun make keeps track of the command used for each target, in a >.make.state file. This will do just what you want, of course it's no >good if you don't have a Sun. (Actually, I've seen ads for what I remember as being a PC version of "make" that claims to be compatible with the Sun version; whether this includes the ".KEEP_STATE" target and corresponding file I don't know.) >But it's so useful that for this one reason I haven't switched to Gnu >make. I think it would be a very useful addition to Gnu make. I certainly like it as well, although it doesn't do exactly what the person wanted, i.e. keep track of which files actually use the #define in question and only rebuild those if the #define changes. Note, though, that it depends on changes to the compiler (preprocessor phase) and linker as well, so that whenever a file is #included or a library is linked in, it's recorded as being a file that the target depends on. You can't *just* change GNU Make, you'd have to change GCC as well. Sun "make" and "cpp"/"ld" use the environment variable SUNPRO_DEPENDENCIES to communicate; a sample run yielded the following environment variables (having a rule that ran "env"): KEEP_STATE= SUNPRO_DEPENDENCIES=/tmp/make.dependency.20693.0 all I don't know what KEEP_STATE is supposed to be; SUNPRO_DEPENDENCIES has what I believe is the pathname of a file into which the program is to dump the dependencies in question (presumably in Makefile form), but I don't know what the second token (the "all") does.