home *** CD-ROM | disk | FTP | other *** search
/ Da Capo / da_capo_vol1.bin / als / amigalib.mk next >
Makefile  |  1995-05-09  |  3KB  |  87 lines

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