home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / amigalib.mk next >
Makefile  |  1994-10-21  |  2KB  |  56 lines

  1. # Amiga Library Services - CD Administration Makefile
  2. #
  3. # This Makefile goes in the root directory of the BBS 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.  
  11. all:    Contents QuickRef FILES.BBS
  12.  
  13. # Generate a summary file called "Contents".
  14.  
  15. Contents:
  16.     echo "This file is generated automatically from the product info files" >Contents
  17.     echo "included in this tree." >>Contents
  18.     echo "" >>Contents
  19.     find . \( -name Product-Info -o -name '*.pi' \) -print \
  20.       | sort -f \
  21.       | sed "s:^./::" \
  22.       | pitool -f - -b -F "==========\n\n%N    %V    %S\n\n%d\n\nAuthor: %a\nPath: %P\n\n" - >>Contents
  23.  
  24. # Generate a quick reference file, which contains the name of the product,
  25. # the version number, and the short description; one product per line.
  26.  
  27. QuickRef:
  28.     echo "This file is generated automatically from the product info files" >QuickRef
  29.     echo "included in this tree.  See the 'Contents' file for additional" >>QuickRef
  30.     echo "information about each item." >>QuickRef
  31.     echo "" >>QuickRef
  32.     pitool -b -F "%-16.16N  %8.8V   %-S\n" -f - . | sort -f | uniq >>QuickRef
  33.  
  34. # Build default FILES.BBS files in all the directories that have 
  35. # product info files.  First we find and delete existing files, since
  36. # the default is to append to the file.  Note we have to sort the files
  37. # after creating them.
  38.  
  39. FILES.BBS:
  40.     find . -name files.bbs -print -exec rm {} \;
  41.     pitool -b .
  42.     for i in `find . -name files.bbs -print`; \
  43.     do \
  44.         sort -f <$$i >/tmp/files.bbs; \
  45.         cp /tmp/files.bbs $$i; \
  46.     done
  47.  
  48. clean:
  49.     rm -f *! *~
  50.  
  51. # Remove all automatically generated files.
  52.  
  53. clobber: clean
  54.     rm -f Contents QuickRef
  55.     find . -name files.bbs -print -exec rm {} \;
  56.