home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
amigalib.mk
< prev
next >
Wrap
Makefile
|
1995-01-31
|
4KB
|
115 lines
# Amiga Library Services - CD Administration Makefile
#
# This makefile is responsible for doing such things as:
#
# (1) Build an accumulated CONTENTS file for all material in this tree.
# This is a comprehensive listing of the material that includes
# much of the relevant information from the product info file,
# such as name, version, short description, long description, author,
# and path to the material.
#
# (2) Build an INDEX file for all material in this tree. This is a
# quick reference file that lists the program name, version, and
# short description of the material.
#
# (3) Build a LOCATE file for all material in this tree. This is a
# quick reference file that lists the program name, version, and
# and the path to the material.
#
# (4) Build archives for the material in this tree on a "per submission"
# basis, and install them in the BBS tree on this CD, along with
# appropriate product info files.
#
CONTENTS_FORMAT = "==========\n\n%N %V %S\n\n%d\n\nAuthor: %a\nPath: %P\n\n"
INDEX_FORMAT = "%-16.16N %8.8V %-S\n"
LOCATE_FORMAT = "%-16.16N %8.8V %P\n"
SHELL = /bin/sh
# The "base name" of this CD set. Supply a default value here that is
# typically overridden by an upper level make, or else passed as a command
# line arg.
CDNAME = FreshFish-Vol8
# This is the root directory for the BBS tree. Typically it is assigned
# a value like "FreshFish-Vol8-2:BBS" via a command line arg to Make, or
# else is passed in by an upper level make.
BBSROOT = $(CDNAME)-2:BBS
# This is the default thing to do.
all: CONTENTS.guide CONTENTS INDEX LOCATE AllList
# Generate a summary file called "CONTENTS". Note that the entries in the
# contents are generated in pathname sorted, case independent, order.
CONTENTS: AllList
@echo >$@ "This file is generated automatically from the product info files"
@echo >>$@ "included in this tree."
@echo >>$@ ""
egrep "/Product-Info$$|\.pi$$" <AllList | \
pitool -f - -b -F $(CONTENTS_FORMAT) - >>$@
@if test -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
# Generate an AmigaGuide format summary file called "CONTENTS.guide".
CONTENTS.guide: AllList CONTENTS-header
$(SHELL) GenCONTENTS.sh AllList >$@
@if test -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
# Generate a quick reference file, which contains the name of the product,
# the version number, and the short description; one product per line.
INDEX: AllList
@echo >$@ "This file is generated automatically from the product info files"
@echo >>$@ "included in this tree. See the 'CONTENTS' file for additional"
@echo >>$@ "information about each item."
@echo >>$@ ""
egrep "/Product-Info$$|\.pi$$" <AllList | \
pitool -b -F $(INDEX_FORMAT) -f - - | sort -f | uniq >>$@
@if test -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
# Generate a quick reference file, which contains the name of the product,
# the version number, and the short description; one product per line.
LOCATE: AllList
@echo >$@ "This file is generated automatically from the product info files"
@echo >>$@ "included in this tree. See the 'CONTENTS' file for additional"
@echo >>$@ "information about each item."
@echo >>$@ ""
egrep "/Product-Info$$|\.pi$$" <AllList | \
pitool -b -F $(LOCATE_FORMAT) -f - - | sort -f | uniq >>$@
@if test -f $@.info; then true; else echo "WARNING - missing $@.info"; fi
# Generate a list of all files and directories rooted at this point in the
# file tree. This target is only rebuilt when it does not exist, so the only
# way to get rid of it is to either make "clobber" or manually delete it.
AllList:
find . -print | sort -f | sed "s:^./::" >/tmp/all.tmp
cp /tmp/all.tmp $@
# Feed the list of files and directories to the Pack.sh script, which picks
# out all names of files or directories that are 3 levels deep and examines
# them as potential candidates from which to generate archives in the BBS
# tree.
BBS: AllList
$(SHELL) Pack.sh AllList $(BBSROOT)
# Clean up files that are trash.
clean:
rm -f *! *~
# Remove all automatically generated files.
clobber: clean
rm -f CONTENTS.guide CONTENTS INDEX LOCATE AllList