home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
bbs
/
support
/
makefile
< prev
next >
Wrap
Makefile
|
1994-05-14
|
3KB
|
92 lines
# This Makefile helps build and manage the BBS support utilities
# and other files.
# VOLNAME = `pwd | sed -e 's%^/%%' -e 's%/.*%%'`
VOLNAME = FreshFish-May94
CC = gcc
CFLAGS = -O -DSEPARATE_GNU
SOURCEFILES = symlinks.c strcasecmp.c
DISTFILES = $(SOURCEFILES) Makefile
# The default thing to make.
all : symlinks PV.list Archives view1.lha
# This target builds "Archives", which is an accumulated summary of all
# of the archives on this CD under the BBS directory, for which a product
# info file is supplied. I.E. it is the list of things which are suitable
# for making available for BBS or FTP access transfer as a single file unit.
# This isn't used for anything else by this makefile, it is just for the
# user's consumption.
Archives :
pitool -b -f - /$(VOLNAME)/BBS | sort >Archives
# This target builds "PV.list", which is a file containing one line for
# every archive on this CD under the BBS directory, where each line
# consists of the full pathname to the archive, followed by the version
# number of that material (if known). It can be fed to "symlinks" to build
# symbolic links to each archive and associated product info file on the CD.
PV.list :
pitool -b -F "%P %V\n" -f - /$(VOLNAME)/BBS | sort >PV.list
# Build the tool that can be used to make symbolic links, or to build
# a script that can be run later to make symbolic links.
symlinks : symlinks.o strcasecmp.o
$(CC) -o symlinks symlinks.o
symlinks.o : symlinks.c
$(CC) -c $(CFLAGS) symlinks.c
strcasecmp.o : strcasecmp.c
$(CC) -c $(CFLAGS) strcasecmp.c
# Build the lha archive for "view 1".
VIEW1_FILES = view1.script pitool symlinks PV.list view1desc.lha \
view1.links
view1.lha : $(VIEW1_FILES)
rm -f view1.lha
lha -mraxeq a view1.lha $(VIEW1_FILES)
view1.links : PV.list symlinks
symlinks -V1 -s <PV.list >view1.links
# Build the archive of description files. This can take an hour or more,
# and is hard to abort once started. It is intended to be manually run
# in a scratch area with "make bbsfiles".
bbsfiles : PV.list symlinks pitool links links/bbsfiles
(cd links ; rm -f view1desc.lha)
(cd links ; lha -mraxeq -ibbsfiles a view1desc.lha)
mv links/view1desc.lha view1desc.lha
links :
rm -rf links
mkdir links
(cd links ; ../symlinks -V1 <../PV.list)
links/bbsfiles :
(cd links ; rm -f */files.bbs)
(cd links ; ../pitool -b .)
(cd links ; find . -name files.bbs -print >/tmp/bbsfiles)
(cd links ; sed "s:^./::" </tmp/bbsfiles >bbsfiles)
(cd links ; for bbsfile in `cat bbsfiles` ; do \
sort <$$bbsfile >/tmp/junkfile ; \
cp /tmp/junkfile $$bbsfile ; \
done)
# Standard stuff that every Makefile should have.
clean :
rm -f *.o *! *~
rm -rf links
clobber : clean
rm -f symlinks Archives view1.links PV.list view1.lha