home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 2
/
goldfish_vol2_cd1.bin
/
gnu
/
amigalib.mk
< prev
next >
Wrap
Makefile
|
1994-11-27
|
3KB
|
93 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 program"
# basis, and install them in the BBS tree on this CD, along with
# appropriate product info files.
#
SHELL=/bin/sh
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"
# This is the default thing to do.
all: 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 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.
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
# Clean up files that are trash.
clean:
rm -f *! *~
# Remove all automatically generated files.
clobber: clean
rm -f CONTENTS INDEX LOCATE AllList