home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
amigalib.mk
< prev
next >
Wrap
Makefile
|
1995-01-31
|
3KB
|
91 lines
# Amiga Library Services - CD Administration Makefile
#
# This Makefile goes in the root directory of the BBS tree, and
# is responsible for doing such things as:
#
# (1) Build an accumulated "Contents" file for all material in this tree.
#
# (2) Build a "Quick Reference" file for all material in this tree.
#
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
all: CONTENTS.guide CONTENTS INDEX LOCATE FILES.BBS
# 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 $@
# Build default FILES.BBS files in all the directories that have
# product info files. First we find and delete existing files, since
# the default is to append to the file. Note we have to sort the files
# after creating them.
FILES.BBS:
rm -f */files.bbs
pitool -b .
for i in `find . -name files.bbs -print`; \
do \
sort -f <$$i >/tmp/files.bbs; \
cp /tmp/files.bbs $$i; \
done
clean:
rm -f *! *~
# Remove all automatically generated files.
clobber: clean
rm -f CONTENTS.guide CONTENTS INDEX LOCATE AllList
rm -f */files.bbs