home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
amigalib.mk
next >
Wrap
Makefile
|
1995-01-31
|
5KB
|
146 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.
#
#
# Note: The following list is incomplete as of vol 8. More work
# still needs to be done...
# In order to build a new CD-ROM release, the following targets need
# to be made, in the given order:
#
# * GNUdiffs Populate the directory GNU:src/diffs, which
# contains diff files created from the contents
# of GNU:src/baseline and GNU:src/amiga.
#
# * coverage Check that the manifest files completely cover
# the contents of the GNU: tree.
#
# * CONTENTS Builds the CONTENTS, INDEX, and LOCATE files.
#
# * BBS Populate the BBS portion of the CD-ROM from
# other parts.
#
# * iso Build the ISO-9660 image suitable for writing
# to a CD recorder for testing.
# These things will probably need to be changed with each CD release
# or whenever the host system changes configuration.
CDNAME = FreshFish-Vol8
VOLNAME = $(CDNAME)-1
IMAGE = ISO2:$(VOLNAME).iso
SCRATCHDIR = /iso2/scratch
# These things will probably remain constant across CD releases.
PUBLISHER = "Amiga Library Services - (602) 491-0048"
PREPARER = "Fred Fish"
MAKE = make
MAKEFILE = AmigaLib.mk
SHELL = /bin/sh
# Macros which are composites of other macros.
BBSROOT = $(CDNAME)-2:BBS
FLAGS_TO_PASS = \
"MAKE=$(MAKE)" \
"MAKEFILE=$(MAKEFILE)" \
"CDNAME=$(CDNAME)" \
"BBSROOT=$(BBSROOT)" \
"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]"
# 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
find . -type f -print | sort | sed "s:^./::" >/tmp/FileList
cp /tmp/FileList $@
rm -f /tmp/FileList CRCList
CRCList: FileList
sed "/^CRCList$$/d" <FileList >/tmp/FileList
brik -Gvbf /tmp/FileList >$@
# Build the CONTENTS, LOCATE, and INDEX files in each major subtree.
CONTENTS:
(cd GNU && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) CONTENTS LOCATE INDEX)
(cd New && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) CONTENTS LOCATE INDEX)
(cd Useful && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) CONTENTS LOCATE INDEX)
# Do everything that needs to be done to populate the BBS section
# of the CD-ROM set. Normally expensive operations are not repeated
# but simple copies are.
BBS:
(cd GNU && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) $@)
(cd New && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) $@)
(cd Useful && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) $@)
# Populate the GNU:src/diffs directory.
# FIXME: This was broken in the move to an archived source dir.
GNUdiffs:
# (cd GNU/src/diffs && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) $@)
# Test the GNU: tree for coverage represented by manifest files.
coverage:
(cd GNU/manifests && $(MAKE) -f $(MAKEFILE) $(FLAGS_TO_PASS) $@)
# Clean out the machine generated files in preparation for rebuilding them.
clobber: clean
rm -f DirList FileList CRCList
clean:
rm -f *! *~