home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 2 / Geek_Gadgets_2_2352.bin / makefile < prev    next >
Makefile  |  1997-04-29  |  2KB  |  74 lines

  1. # These things will probably change for each CD release.
  2.  
  3. CDNAME =    ADE-2
  4.  
  5. # These things will probably remain constant across CD releases.
  6.  
  7. PUBLISHER =    "Cronus - (520) 680-6300"
  8. PREPARER =    "Fred Fish"
  9. VOLNAME =    $(CDNAME)
  10. IMAGE =        ISO:$(CDNAME).iso
  11. MKISOFS =    Work:useful/Sys/C/mkisofs
  12.  
  13. # The default thing to do is nothing, except to suggest things that
  14. # can be done.        
  15.  
  16. all:
  17.     @echo "rerun make with one of:"
  18.     @echo "  [iso, rebuild, DirList, FileList, CRCList]"
  19.  
  20. # This target will rebuild all the machine generated files, after doing
  21. # a "make clobber".
  22.  
  23. rebuild: DirList FileList CRCList
  24.  
  25. # -a    Include all files
  26. # -A    Map filenames to ISO compliant file names.
  27. # -c    Do not convert filenames
  28. # -e    Sort file extents by common extensions.
  29. # -r    Inhibit relocation of directories.
  30. # -R    Enable RockRidge extensions.
  31. # -T    Generate a file TRANS.TBL to make ISO names to original names.
  32.  
  33. iso:    CRCList
  34.     $(MKISOFS) -a -c -e -r -o $(IMAGE) -P $(PUBLISHER) -p $(PREPARER) \
  35.       -V $(VOLNAME) $(VOLNAME):
  36.  
  37. # Build the DirList, FileList and CRCList files.  Note that we ensure
  38. # that a FileList and CRCList file exist by touching them before building
  39. # the updated FileList, and then removing the CRCList file (even a
  40. # previously existing one) after building the new FileList, since the
  41. # CRCList needs to be rebuilt anyway if the FileList is touched.  However
  42. # since we can't compute a CRC for the CRC file itself without major
  43. # trickery, the CRCList is generated using a copy of FileList that has
  44. # had the CRCList line removed.  All these gyrations ensure that the
  45. # FileList file includes entries for both itself and the CRCList file,
  46. # while the CRCList file contains no entry for itself.
  47. #
  48. # Also note that the output is stored in a temporary file on a different
  49. # volume, so as to avoid problems on the Amiga with "find" trying to
  50. # lock CRCList while it is open for write.
  51.  
  52. DirList:
  53.     find . -type d -print | sort | sed -e "s:^./::" -e "/^\.$$/d" >/tmp/DirList
  54.     cp /tmp/DirList $@
  55.     rm -f /tmp/DirList
  56.  
  57. FileList: DirList
  58.     touch $@ CRCList
  59.     find . -type f -print | sort | sed "s:^./::" >/tmp/FileList
  60.     cp /tmp/FileList $@
  61.     rm -f /tmp/FileList CRCList
  62.  
  63. CRCList: FileList
  64.     sed "/^CRCList$$/d" <FileList >/tmp/FileList
  65.     brik -Gvbf /tmp/FileList >$@
  66.  
  67. # Clean out the machine generated files in preparation for rebuilding them.
  68.  
  69. clobber: clean
  70.     rm -f DirList FileList CRCList
  71.     
  72. clean:
  73.     rm -f *! *~
  74.