guy@rlgvax.UUCP (Guy Harris) (05/30/84)
A Makefile generator (the most common use of an include follower) was posted to "net.sources" by somebody a while ago. It used "cpp" to follow the include files - this has the advantage that it even understands "ifdef"s and the like. An example of this advantage, which crops up here a fair bit, is Makefiles for programs which provide a full-screen user interface. Such programs need an "#ifdef" for the V7/BSD tty driver vs. the USG tty driver; depending on the define, it will include <sgtty.h> or <termio.h>. That Makefile generator was one of the cleverer uses of "cpp" I've seen - all you do is "cc -E" the source and grab "# <linenum> <filename>" lines as they go by. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy