Xref: utzoo comp.sources.wanted:2768 comp.lang.c:5628 Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!fxgrp!ljz From: ljz@fxgrp.UUCP (Lloyd Zusman, Master Byte Software) Newsgroups: comp.sources.wanted,comp.lang.c Subject: Re: Desperately Seeking Makefile Maker Keywords: makefile Message-ID: <178@fxgrp.UUCP> Date: 17 Dec 87 20:30:59 GMT References: <1034@cpocd2.UUCP> <538@silver.bacs.indiana.edu> Reply-To: fxgrp!ljz@ames.arpa (Lloyd Zusman, Master Byte Software) Followup-To: <538@silver.bacs.indiana.edu> creps@silver.UUCP (Steve Creps) Organization: FX Development Group, Inc., Mountain View, CA Lines: 54 In article <538@silver.bacs.indiana.edu> creps@silver.UUCP (Steve Creps) writes: >In article <1034@cpocd2.UUCP> nate@cpocd2.UUCP (Nathan Hess) writes: >> Is there a program available that creates makefiles, preferrably >> written in C? > ... > This problem sounds like something that could be easily done using the >standard Unix utilities. ... > ... >You could say something like this: >fgrep #include *.c *.h | awk -f makefile.awk >makefile > ... This sort of thing is fine as far as it goes, but what about nested includes? What about the differences between #includes that use double quotes and those that use angle brackets? There is something much better called 'mkmf' that makes makefiles. It handles the above cases just fine and produces a useful makefile. As far as I know, it's "netware", which means it's public domain and is distributed over the net. We have it here at my installation, and as soon as I can determine if it truly *is* netware, I could shar it up and email it to whomever is interested, source and all. Contact me at the address below if you want this, but *PLEASE* check here on the net first to see if it's in one of the source archives, as it would be better to get it from there. In addition, I have a program I developed for the IBM PC that also generates makefiles. Its advantage is that it uses regular expression syntax to define the format of an include statement, and each file suffix can have such a regular expression (or group thereof) associated with it. This allows the utility also to be used for programs written in languages other than C, most notably assembly language and Pascal on the IBM PC. This program handles nested includes, but right now doesn't do anything special to distinguish angle-bracket and double-quote includes. This is because the various C compilers on the IBM PC don't handle these in a uniform manner. An added feature of this program is for it to produce an include map for all the source files processed by it. This is particularly useful for figuring out what's going on with nested includes. This program of mine is not quite ready for distribution, as I have not yet tried to port it to unix and because it is not fully tested. I would distribute it as is to anyone who might want it, but I refuse to support it until I've done more work on it. Anyone who is interested in this program please contact me at the address below. Be sure to give a nice, long, accurate uucp return address in your posting, as I have extremely limited access to network maps. The only way to access my site is via 'ames' in California. ------------------------------------------------------------------------- Lloyd Zusman Master Byte Software Los Gatos, California Internet: fxgrp!ljz@ames.arpa "We take things well in hand." UUCP: ...!ames!fxgrp!ljz