home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / useful / amigalib.mk next >
Makefile  |  1994-09-08  |  2KB  |  57 lines

  1. # Amiga Library Services - CD Administration Makefile
  2. #
  3. # This Makefile goes in the root directory of the "Useful Material" tree, and
  4. # is responsible for doing such things as:
  5. #
  6. # (1)    Build an accumulated "Contents" file for all material in this tree.
  7. #
  8. # (2)    Build a "Quick Reference" file for all material in this tree.
  9. #
  10. # (3)    Build archives for the material in this tree on a "per submission"
  11. #    basis, and install them in the BBS tree on this CD, along with
  12. #    appropriate product info files.
  13. #
  14.  
  15. CONTENTS_FORMAT = "==========\n\n%N    %V    %S\n\n%d\n\nAuthor: %a\nPath: %P\n\n"
  16. QUICKREF_FORMAT = "%-16.16N  %8.8V   %-S\n"
  17.  
  18.  
  19. # This is the default thing to do.
  20.  
  21. all:    Contents QuickRef
  22.  
  23.  
  24. # Generate a summary file called "Contents".  Note that the entries in the
  25. # contents are generated in pathname sorted, case independent, order.
  26.  
  27. Contents:
  28.     echo >>$@ "This file is generated automatically from the product info files"
  29.     echo >>$@ "included in this tree."
  30.     echo >>$@ ""
  31.     find . \( -name Product-Info -o -name '*.pi' \) -print \
  32.       | sort -f \
  33.       | sed "s:^./::" \
  34.       | pitool -f - -b -F $(CONTENTS_FORMAT) - >>$@
  35.     if test  -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
  36.  
  37.  
  38. # Generate a quick reference file, which contains the name of the product,
  39. # the version number, and the short description; one product per line.
  40.  
  41. QuickRef:
  42.     echo >>$@ "This file is generated automatically from the product info files"
  43.     echo >>$@ "included in this tree.  See the 'Contents' file for additional"
  44.     echo >>$@ "information about each item."
  45.     echo >>$@ ""
  46.     pitool -b -F $(QUICKREF_FORMAT) -f - . | sort -f | uniq >>$@
  47.     if test -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
  48.  
  49. clean:
  50.     rm -f *! *~
  51.  
  52. # Remove all automatically generated files.
  53.  
  54. clobber: clean
  55.     rm -f Contents QuickRef
  56.  
  57.