home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
amigalib.mk
< prev
next >
Wrap
Makefile
|
1995-10-24
|
4KB
|
121 lines
# Amiga Library Services - CD Administration Makefile
#
# This Makefile goes in the root directory of the CD-ROM master file
# tree and is responsible for doing such things as:
#
# * Building the automatically generated files for the release.
#
# * "Cleaning up" the file tree.
# The following things will probably need to be changed with each CD
# release or whenever the host system changes configuration.
CDNAME = GoldFish-Vol3
VOLNAME = $(CDNAME)
IMAGE = ISO:$(VOLNAME).iso
SCRATCHDIR = /iso/scratch
# These things will probably remain constant across CD releases.
PUBLISHER = "Amiga Library Services - (602) 491-0442"
PREPARER = "Fred Fish"
MAKE = make
MAKEFILE = AmigaLib.mk
SHELL = /bin/sh
# Macros which are composites of other macros.
FLAGS_TO_PASS = \
"MAKE=$(MAKE)" \
"MAKEFILE=$(MAKEFILE)" \
"CDNAME=$(CDNAME)" \
"SCRATCHDIR=$(SCRATCHDIR)"
# The default thing to do is nothing, except to suggest things that
# can be done.
all:
@echo "rerun make with one of:"
@echo " [iso, rebuild, FileList, CRCList, CONTENTS.guide]"
# This target will rebuild all the machine generated files, after doing
# a "make clobber".
rebuild: DirList FileList CRCList
# -a Include all files
# -A Map filenames to ISO compliant file names.
# -c Do not convert filenames
# -e Sort file extents by common extensions.
# -r Inhibit relocation of directories.
# -R Enable RockRidge extensions.
# -T Generate a file TRANS.TBL to make ISO names to original names.
iso: CRCList
mkisofs -a -c -e -r -o $(IMAGE) -P $(PUBLISHER) -p $(PREPARER) \
-V $(VOLNAME) $(VOLNAME):
# Build the DirList, FileList and CRCList files. Note that we ensure
# that a FileList and CRCList file exist by touching them before building
# the updated FileList, and then removing the CRCList file (even a
# previously existing one) after building the new FileList, since the
# CRCList needs to be rebuilt anyway if the FileList is touched. However
# since we can't compute a CRC for the CRC file itself without major
# trickery, the CRCList is generated using a copy of FileList that has
# had the CRCList line removed. All these gyrations ensure that the
# FileList file includes entries for both itself and the CRCList file,
# while the CRCList file contains no entry for itself.
#
# Also note that the output is stored in a temporary file on a different
# volume, so as to avoid problems on the Amiga with "find" trying to
# lock CRCList while it is open for write.
DirList:
find . -type d -print | sort | sed -e "s:^./::" -e "/^\.$$/d" >/tmp/DirList
cp /tmp/DirList $@
rm -f /tmp/DirList
FileList: DirList
touch $@ CRCList All.api CONTENTS.guide PIList
find . -type f -print | sort | sed "s:^./::" >/tmp/FileList
cp /tmp/FileList $@
rm -f /tmp/FileList CRCList All.api CONTENTS.guide PIList
CRCList: All.api CONTENTS.guide
sed "/^CRCList$$/d" <FileList >/tmp/FileList
brik -Gvbf /tmp/FileList >$@
# Generate a list of all product-info files in this tree, sorted by the
# actual name of the product as recorded in the ".name" field and list
# with fully qualified pathnames (not relative names).
# Note that the sed command assumes that pwd returns the
# unix style name "/FreshFish-Vol10/..."
PIList: FileList
egrep -i <$? "Product-Info$$|\.pi$$" \
| sed -e "s:^:`pwd`/:" -e "s:^/::" -e "s@/@:@" \
| pitool -b -F "@%N@%i\n" -f - - \
| sort -f \
| sed -e "s:@.*@::" >$@
# Generate an accumulated product info file to use for searches.
All.api: PIList
pitool -s - <$? >$@
# Build an amigaguide file CONTENTS.guide that directly accesses all
# material on this disk that has a product info file.
CONTENTS.guide: PIList GenCONTENTS.sh
if [ -f $@ ]; then mv $@ $@.bak; else true; fi
$(SHELL) GenCONTENTS.sh PIList >$@
# Clean out the machine generated files in preparation for rebuilding them.
clobber: clean
rm -f DirList FileList CRCList PIList All.api CONTENTS.guide
clean:
rm -f *! *~ *.bak