home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Da Capo
/
da_capo_vol1.bin
/
als
/
amigalib.mk
next >
Wrap
Makefile
|
1995-05-09
|
3KB
|
87 lines
# Amiga Library Services - CD Administration Makefile
#
# This Makefile is envoked from 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.
# These things will probably need to be changed with each CD release
# or whenever the host system changes configuration.
CDNAME = dacapo-vol1
VOLNAME = $(CDNAME)
IMAGE = ISO2:$(VOLNAME).iso
# These things will probably remain constant across CD releases.
PUBLISHER = "Amiga Library Services - (602) 491-0048"
PREPARER = "Fred Fish"
MAKE = make
SHELL = /bin/sh
# 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]"
# This target will rebuild all the machine generated files, after doing
# a "make clobber".
rebuild: ALS/DIRLIST ALS/FILELIST ALS/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: ALS/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.
ALS/DIRLIST:
find . -type d -print | sort | sed -e "s:^./::" -e "/^\.$$/d" >/tmp/DIRLIST
cp /tmp/DIRLIST $@
rm -f /tmp/DIRLIST
ALS/FILELIST: ALS/DIRLIST
touch $@ ALS/CRCLIST
find . -type f -print | sort | sed "s:^./::" >/tmp/FILELIST
cp /tmp/FILELIST $@
rm -f /tmp/FILELIST ALS/CRCLIST
ALS/CRCLIST: ALS/FILELIST
sed "/^ALS\/CRCLIST$$/d" <ALS/FILELIST >/tmp/FILELIST
brik -Gvbf /tmp/FILELIST >$@
# Clean out the machine generated files in preparation for rebuilding them.
clobber: clean
rm -f ALS/DIRLIST ALS/FILELIST ALS/CRCLIST
clean:
rm -f *! *~