home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fonts 1
/
freshfonts1.bin
/
amigalib.mk
next >
Wrap
Makefile
|
1994-10-18
|
3KB
|
84 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:
#
# (1) "Cleaning up" the file tree.
# (2) Building the automatically generated files for the release.
# (3) Building the ISO image for the release.
CDNAME = FreshFonts-Vol1
PUBLISHER = "Amiga Library Services - (602) 917-0917"
PREPARER = "Fred Fish"
IMAGE = ISO:$(CDNAME).iso
TMPDIR = /tmp
TMPFILE = $(TMPDIR)/$(CDNAME).tmp
all:
@echo "rerun make with one of:"
@echo "[clean, clobber, iso, rebuild, DirList FileList, CRCList]"
# This target will rebuild all the machine generated files, after you
# have done a "make clobber". Without doing a "make clobber", all it
# will do is ensure that the files exist.
rebuild: DirList FileList CRCList
# Build an ISO image for the release. Some important mkisofs flags
# and their meanings are:
#
# -a Include all files
# -A Map filenames to ISO compliant file names.
# -c Do not convert filenames
# -e Sort file extents by common extensions.
# -o Write ISO image to specified file.
# -p Specify the preparer field in the CD-ROM data structures.
# -P Specify the publisher field in the CD-ROM data structures.
# -r Inhibit relocation of directories.
# -R Enable RockRidge extensions.
# -T Generate a file TRANS.TBL to make ISO names to original names.
# -V The volume name.
iso: CRCList
mkisofs -a -c -e -r -o $(IMAGE) -P $(PUBLISHER) -p $(PREPARER) \
-V $(CDNAME) $(CDNAME):
# 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 it's output file while it is open for write.
DirList:
find . -type d -print | sort | sed -e "s:^./::" -e "/^\.$$/d" >$(TMPFILE)
cp $(TMPFILE) $@
rm -f $(TMPFILE)
FileList: DirList
touch $@ CRCList
find . -type f -print | sort | sed "s:^./::" >$(TMPFILE)
cp $(TMPFILE) $@
rm -f $(TMPFILE) CRCList
CRCList: FileList
sed "/^CRCList$$/d" <FileList >$(TMPFILE)
brik -Gvbf $(TMPFILE) >$@
rm -f $(TMPFILE)
# Clean out the machine generated files in preparation for rebuilding them.
clobber: clean
rm -f DirList FileList CRCList
clean:
rm -f *! *~ $(TMPFILE)