home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / amigalib.mk < prev    next >
Makefile  |  1995-01-31  |  4KB  |  108 lines

  1. # Amiga Library Services - CD Administration Makefile
  2. #
  3. # This Makefile goes in the root directory of the GNU tree.
  4.  
  5. CONTENTS_FORMAT = "==========\n\n%N    %V    %S\n\n%d\n\nAuthor: %a\nPath: %P\n\n"
  6. INDEX_FORMAT =    "%-16.16N  %8.8V   %-S\n"
  7. LOCATE_FORMAT =    "%-16.16N  %8.8V   %P\n"
  8.  
  9. SHELL =        /bin/sh
  10. MAKE =        make
  11. MAKEFILE =    AmigaLib.mk
  12.  
  13. # The "base name" of this CD set.  Supply a default value here that is
  14. # typically overridden by an upper level make, or else passed as a command
  15. # line arg.
  16.  
  17. CDNAME =    FreshFish-Vol8
  18.  
  19. # This is the root directory for the BBS tree.  Typically it is assigned
  20. # a value like "FreshFish-Vol8-2:BBS" via a command line arg to Make, or
  21. # else is passed in by an upper level make.
  22.  
  23. BBSROOT =    $(CDNAME)-2:BBS
  24.  
  25. SCRATCHDIR =    /tmp
  26.  
  27. FLAGS_TO_PASS = \
  28.         "MAKE=$(MAKE)" \
  29.         "MAKEFILE=$(MAKEFILE)" \
  30.         "CDNAME=$(CDNAME)" \
  31.         "BBSROOT=$(BBSROOT)" \
  32.         "SCRATCHDIR=$(SCRATCHDIR)"
  33.  
  34. all:    CONTENTS.guide CONTENTS INDEX LOCATE AllList
  35.  
  36. release:
  37.  
  38. # Generate a summary file called "CONTENTS".  Note that the entries in the
  39. # contents are generated in pathname sorted, case independent, order.
  40.  
  41. CONTENTS: AllList
  42.     @echo >$@ "This file is generated automatically from the product info files"
  43.     @echo >>$@ "included in this tree."
  44.     @echo >>$@ ""
  45.     egrep "/Product-Info$$|\.pi$$" <AllList | \
  46.         pitool -f - -b -F $(CONTENTS_FORMAT) - >>$@
  47.     @if test  -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
  48.  
  49.  
  50. # Generate an AmigaGuide format summary file called "CONTENTS.guide".
  51.  
  52. CONTENTS.guide: AllList CONTENTS-header
  53.     $(SHELL) GenCONTENTS.sh AllList >$@
  54.     @if test  -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
  55.  
  56.  
  57. # Generate a quick reference file, which contains the name of the product,
  58. # the version number, and the short description; one product per line.
  59.  
  60. INDEX: AllList
  61.     @echo >$@ "This file is generated automatically from the product info files"
  62.     @echo >>$@ "included in this tree.  See the 'CONTENTS' file for additional"
  63.     @echo >>$@ "information about each item."
  64.     @echo >>$@ ""
  65.     egrep "/Product-Info$$|\.pi$$" <AllList | \
  66.         pitool -b -F $(INDEX_FORMAT) -f - - | sort -f | uniq >>$@
  67.     @if test -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
  68.  
  69. # Generate a quick reference file, which contains the name of the product,
  70. # the version number, and the short description; one product per line.
  71.  
  72. LOCATE:    AllList
  73.     @echo >$@ "This file is generated automatically from the product info files"
  74.     @echo >>$@ "included in this tree.  See the 'CONTENTS' file for additional"
  75.     @echo >>$@ "information about each item."
  76.     @echo >>$@ ""
  77.     egrep "/Product-Info$$|\.pi$$" <AllList | \
  78.         pitool -b -F $(LOCATE_FORMAT) -f - - | sort -f | uniq >>$@
  79.     @if test -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
  80.  
  81. # Generate a list of all files and directories rooted at this point in the
  82. # file tree.  This target is only rebuilt when it does not exist, so the only
  83. # way to get rid of it is to either make "clobber" or manually delete it.
  84.  
  85. AllList:
  86.     find . -print | sort -f | sed "s:^./::" >/tmp/all.tmp
  87.     cp /tmp/all.tmp $@
  88.  
  89. # Build archives in the BBS section of the CD using various parts of the GNU tree.
  90. # In general, there are three archives per program, one for the source, one for
  91. # the binaries, and one for the diffs of the amiga source against the baseline
  92. # source.  The packing script requires the name of the BBS directory as a command
  93. # line argument.  A default value is provided in BBSROOT, but this can be (and
  94. # normally is) overridden by the upper level makefile that calls this one.
  95.  
  96. BBS:
  97.     (cd src/amiga && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) $@)
  98.     (cd src/baseline && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) $@)
  99.     $(SHELL) PackGNU.sh $(BBSROOT) $(SCRATCHDIR)
  100.  
  101. # Clean up this directory.
  102.  
  103. clean:
  104.         rm -f *!
  105.  
  106. clobber:    clean
  107.         rm -f CONTENTS.guide CONTENTS INDEX LOCATE AllList
  108.