home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d895 / makedmake.lha / MakeDMake / ReadMe < prev    next >
Text File  |  1993-07-04  |  3KB  |  78 lines

  1. ReadMe for MakeDMake v0.22
  2.  
  3. I guess that in 70 percent it is still Tim McGrath's 'MakeMake' from Fish 74.
  4. But MakeDMake is much more enterprising at the price of being DICE-specific.
  5. And from time to time I still get ideas of how to make it more useful,
  6. without not losing its (charming) simplicity, as well as the quick'n'dirty
  7. appeal...
  8.  
  9.  
  10. USAGE:
  11.  
  12. You give it the names of all the C-files that are to produce your executable
  13. (but NOT #include'd .c or .h files!), and it will automatically scan them to
  14. find all dependencies, and produce a ready to use (in many cases) DMakeFile
  15. calling DCC with options you will need for normal compilation and linking.
  16. Other things can be added if needed by editing that file. In most cases it
  17. should be enough to give MakeDMake '#? or '*' on command-line.  You will be
  18. than asked about the name of the executable, if you just press RETURN -- you
  19. will get the default name, being either the NAME of the input file with no
  20. extension (if it was the only name MakeDMake got), or 'main' (without
  21. quotes).  Since version 0.21 you will be asked to input the compilation and
  22. linking OPTIONS; if you just press <RETURN>, there will be no options
  23. generated -- you can always put them there afterwards
  24.  with your editor.
  25.  
  26. For exemple, if you call it with the command-line like this:
  27.  
  28. MakeDMake file1.c file2.c file3.c ... filen.c
  29.  
  30. choose 'ex_file' as the name for the executable, and ignore the
  31. options, you will get something like that in your DMakeFile:
  32.  
  33. OPT1 =
  34. OPT2 =
  35.  
  36. ex_file         : file1.o file2.o file3.o ... filen.o
  37.     dcc $(OPT1) -o ex_file  file1.o file2.o file3.o ... filen.o
  38.  
  39. filex.o :   filex.c ... header file list ...
  40.     dcc $(OPT1) filex.c
  41.  
  42. where the header file list is the transitive closure of all files #included
  43. in filex.c (i.e. if filex.c #includes "header.h", and "header.h" #includes
  44. "subheader.h", both "header.h" and "subheader.h" appear in the list of header
  45. files). MakeDMake only examines header files delimited by double quotes (").
  46. System header files enclosed in angle brackets (< and >) are not examined.
  47. (That last bit of beautiful native-speaker English was almost literally taken
  48. from Tim's original comment. Now, back to my own personal variant...)
  49.  
  50. As you probably know, the dmake program called with no parameters, will look
  51. for the file called 'DMakeFile' in current directory and use its information
  52. to update/recompile etc. your files.  And it can be made even easier with
  53. aliases. I use, for instance, two csh aliases like that:
  54.  
  55.      alias mdm "MakeDMake *.c"   ## for all C files in current dir
  56.     alias go "DMake"            ## not so much, but...
  57.  
  58.     ## alternatively -- if you may have 'unique' makefile names
  59.     ## in the form <something>.make, you may use:
  60.  
  61.     alias go DMake -f *make
  62.  
  63. whith which I can compile most of the C programs with no effort whatsoever.
  64. The DCC options I need use are already set in the ENV:DCCOPTS anyway. The
  65. beauty of this stuff is that it only takes a few minutes to recompile it with
  66. your own standard set of options.  You kan even have different MakeDMake's
  67. with different hardwired set of options and names! You may try to do adjust
  68. the #defines first.
  69.  
  70. The original 'MakeMake' was in Public Domain, and this stuff here also is.
  71.  
  72.  
  73.                                         Piotr Obminski
  74.  
  75.                                         Flogstav. 43C
  76.                                         752 63 Uppsala/Sweden
  77.  
  78.