/*
 *      MakeDMake v0.15 -- automatically construct a makefile for DMake
 *
 *      Basically it's Tim McGrath's 'MakeMake' from Fish 74,
 *      -----------------------------------------------------
 *
 *      but it has been slightly hacked, so that it got much more
 *      enterprising and workaholic, so to say.
 *
 *
 *      HOW TO:
 *
 *      You give it the names of all the C-files that are to produce your
 *      executable (but NOT #include'd .c or .h files!), and it will
 *      automatically scan them to find all dependencies, and produce a
 *      ready to use (in many cases) DMakeFile calling DCC with options
 *      you will need for normal compilation and linking. Other things
 *      can be added if needed by editing that file. In most cases it
 *      should be enough to give MakeDMake '#? or '*' on command-line.
 *
 *      For exemple, if you call it with the command-line like this:
 *
 *      MakeDMake file1.c file2.c file3.c ... filen.c
 *
 *      you will get something like that in your DMakeFile:
 *
 *      OPT1 =
 *      OPT2 =
 *
 *      ex_file         : file1.o file2.o file3.o ... filen.o
 *          dcc $(OPT1) -o ex_file  file1.o file2.o file3.o ... filen.o
 *
 *      filex.o :   filex.c ... header file list ...
 *          dcc $(OPT1) filex.c
 *
 *      where the header file list is the transitive closure of all
 *      files #included in filex.c (i.e. if filex.c #includes "header.h",
 *      and "header.h" #includes "subheader.h", both "header.h" and
 *      "subheader.h" appear in the list of header files). MakeDMake only
 *      examines header files delimited by double quotes ("). System header
 *      files enclosed in angle brackets (< and >) are not examined.
 *      (That last bit of beautiful native-speaker English was almost
 *      literally taken from Tim's original comment. Now, back to my own
 *      personal variant...)
 *
 *      As you probably know, if you have all properly set, 'dmake'
 *      typed in the CLI with no mparameters, will look for the
 *      file called 'DMakeFile' in current directory and use its information
 *      to update/recompile etc. your files. And it can be made even easier
 *      with aliases. With two Csh aliases like that:
 *
 *          alias mdm "MakeDMake *.c"   ## for all C files in current dir
 *          alias go "DMake"            ## not so much really
 *          ## or "alias go DMake -f *make" if you can have the makefile
 *          ## name in the form <something>.make
 *
 *      I can compile most of the C programs with no effort whatsoever,
 *      as most of the DCC I need use are already set in the ENV:DCCOPTS.
 *      You can, however, recompile with your own standard set of options.
 *      Many other things here can be easilly changed, adjusted and
 *      then recompiled; also for other compilers than DICE. Try to do
 *      that changing the #defines first!
 *
 *      The original 'MakeMake' was in Public Domain, and this stuff here
 *      also is.
 *
 *                                  Piotr Obminski, November 1992
 */
