#	$Header: /usr/people/sam/fax/RCS/distrules,v 1.39 93/04/18 18:39:53 sam Rel $
#
# FlexFAX Facsimile Software
#
# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993 Sam Leffler
# Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
# 
# Permission to use, copy, modify, distribute, and sell this software and 
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
# 
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
# 
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
# OF THIS SOFTWARE.
#

#
# FlexFAX distribution rules.
#

#
# Files that are part of FlexFAX proper.
#
FLEXFAXFILES=\
    VERSION					\
    README					\
    HOWTO					\
    CHANGES-v2.1				\
    MODEMS					\
    BLURB					\
    SURVEY					\
    configure rules distrules			\
    doc/Makefile				\
	doc/README				\
	doc/fax.ps				\
	doc/scorecard				\
	doc/class1.txt				\
	doc/class2.txt				\
	doc/hayes.txt				\
	doc/modems-faq				\
	doc/suprainfo				\
	doc/zyxel				\
    relnotes/Makefile				\
	relnotes/TC.online			\
	relnotes/cFront				\
	relnotes/ch1.cmm			\
	relnotes/ch2.cmm			\
	relnotes/ch3.cmm			\
	relnotes/ch4.cmm			\
	relnotes/ch5.cmm			\
	relnotes/ch6.cmm			\
	relnotes/chA.cmm			\
	relnotes/cover.x			\
	relnotes/credit.x			\
	relnotes/errata.x			\
	relnotes/macros.online			\
	relnotes/table_template			\
    dist/flexfax.spec				\
	dist/newalpha				\
    etc/Makefile				\
	etc/config.abaton			\
	etc/config.class1			\
	etc/config.class2			\
	etc/config.dsi-scout+			\
	etc/config.everex-2496d			\
	etc/config.mt-1432			\
	etc/config.nuvo-voyager			\
	etc/config.skel				\
	etc/config.rockwell			\
	etc/config.rockwell-class1		\
	etc/config.telebit-wb			\
	etc/config.zyxel-1496e			\
	etc/copy.h				\
	etc/copy.m				\
	etc/copy.ps				\
	etc/faxd				\
	etc/faxaddmodem.sh			\
    iv/Makefile					\
    gs/README					\
	gs/Makefile.sgi				\
	gs/gdevtiff.c				\
	gs/devs.mak				\
    util/Makefile				\
	util/Array.c++				\
	util/Dictionary.c++			\
	util/Fatal.c++				\
	util/FaxClient.c++			\
	util/FaxDB.c++				\
	util/Obj.c++				\
	util/StackBuffer.c++			\
	util/Str.c++				\
	util/StrArray.c++			\
	util/Array.h				\
	util/DSmacros.h				\
	util/Dictionary.h			\
	util/FaxClient.h			\
	util/FaxDB.h				\
	util/Obj.h				\
	util/Ptr.h				\
	util/StackBuffer.h			\
	util/Str.h				\
	util/StrArray.h				\
	util/Types.h				\
	util/config.h				\
	util/faxanswer.c			\
	util/faxinfo.c				\
	util/faxquit.c				\
	util/faxsubmit.c			\
	util/freq.c				\
	util/fxassert.c				\
	util/pause.c				\
	util/deliver.sh				\
	util/notify.sh				\
	util/ps2fax.dps.sh			\
	util/ps2fax.gs.sh			\
	util/rts.sh				\
	util/submit2at.sh			\
	util/transcript.sh			\
	util/fax.ftr				\
	util/dpsprinter.ps			\
	util/faxchest.ps			\
	util/faxdb				\
	util/xfer.awk				\
	util/xferdest.awk			\
    lptops/Makefile				\
	lptops/inch.h				\
	lptops/lptops.c				\
	lptops/strcm2.h				\
    fax2ps/Makefile				\
    faxalter/Makefile				\
	faxalter/faxalter.c++			\
    faxcover/Makefile				\
	faxcover/faxcover.c++			\
	faxcover/faxcover.ps			\
    faxd/Makefile faxd/TODO			\
	faxd/Class1.h				\
	faxd/Class2.h				\
	faxd/Class2Params.h			\
	faxd/Everex.h				\
	faxd/FaxMachineInfo.h			\
	faxd/FaxMachineLog.h			\
	faxd/FaxModem.h				\
	faxd/FaxRecvInfo.h			\
	faxd/FaxRequest.h			\
	faxd/FaxServer.h			\
	faxd/FaxTrace.h				\
	faxd/Getty.h				\
	faxd/GettyBSD.h				\
	faxd/GettySysV.h			\
	faxd/HDLCFrame.h			\
	faxd/ModemConfig.h			\
	faxd/RegExArray.h			\
	faxd/UUCPLock.h				\
	faxd/class2.h				\
	faxd/everex.h				\
	faxd/faxServerApp.h			\
	faxd/t.30.h				\
	faxd/Class1.c++				\
	faxd/Class1Poll.c++			\
	faxd/Class1Recv.c++			\
	faxd/Class1Send.c++			\
	faxd/Class2.c++				\
	faxd/Class2Params.c++			\
	faxd/Class2Poll.c++			\
	faxd/Class2Recv.c++			\
	faxd/Class2Send.c++			\
	faxd/Everex.c++				\
	faxd/EverexPoll.c++			\
	faxd/EverexRecv.c++			\
	faxd/EverexSend.c++			\
	faxd/FaxMachineInfo.c++			\
	faxd/FaxMachineLog.c++			\
	faxd/FaxModem.c++			\
	faxd/FaxPoll.c++			\
	faxd/FaxRecv.c++			\
	faxd/FaxRecvdData.c++			\
	faxd/FaxRecvInfo.c++			\
	faxd/FaxRequest.c++			\
	faxd/FaxRequestData.c++			\
	faxd/FaxSend.c++			\
	faxd/FaxServer.c++			\
	faxd/Getty.c++				\
	faxd/GettyBSD.c++			\
	faxd/GettySysV.c++			\
	faxd/HDLCFrame.c++			\
	faxd/ModemConfig.c++			\
	faxd/RegExArray.c++			\
	faxd/UUCPLock.c++			\
	faxd/faxServerApp.c++			\
    faxmail/Makefile				\
	faxmail/README				\
	faxmail/faxmail.c++			\
	faxmail/haeberli.ps			\
	faxmail/calligraphy.ps			\
	faxmail/mailfax.sh			\
    faxrm/Makefile				\
	faxrm/faxrm.c++				\
    faxstat/Makefile				\
	faxstat/FaxStatClient.h			\
	faxstat/RecvStatus.h			\
	faxstat/SendStatus.h			\
	faxstat/ServerStatus.h			\
	faxstat/FaxStatClient.c++		\
	faxstat/RecvStatus.c++			\
	faxstat/SendStatus.c++			\
	faxstat/ServerStatus.c++		\
	faxstat/faxstat.c++			\
    man/Makefile				\
	man/config.4f				\
	man/fax2ps.1				\
	man/faxaddmodem.1m			\
	man/faxalter.1				\
	man/faxanswer.1m			\
	man/faxcover.1				\
	man/faxd.1m				\
	man/faxd.recv.1m			\
	man/faxmail.1				\
	man/faxquit.1m				\
	man/faxrm.1				\
	man/faxstat.1				\
	man/flexfax.4f				\
	man/hosts.4f				\
	man/info.4f				\
	man/log.4f				\
	man/ps2fax.1m				\
	man/recvq.4f				\
	man/sendfax.1				\
	man/sendq.4f				\
	man/sgi2fax.1				\
	man/status.4f				\
	man/tsi.4f				\
	man/typerules.4f			\
	man/xferlog.4f				\
    recvfax/Makefile				\
	recvfax/alter.c				\
	recvfax/auth.c				\
	recvfax/defs.h				\
	recvfax/jobs.c				\
	recvfax/main.c				\
	recvfax/remove.c			\
	recvfax/status.c			\
	recvfax/submit.c			\
	recvfax/regex.c++			\
    sendfax/Makefile				\
	sendfax/sendfax.c++			\
	sendfax/TypeRules.c++			\
	sendfax/TypeRules.h			\
	sendfax/typerules			\
    sgi2fax/Makefile				\
	sgi2fax/hipass.c			\
	sgi2fax/hipass.h			\
	sgi2fax/imgtofax.c			\
	sgi2fax/izoom.c				\
	sgi2fax/izoom.h				\
	sgi2fax/lum.h				\
	sgi2fax/lut.c				\
	sgi2fax/lut.h				\
	sgi2fax/rand.c				\
	sgi2fax/row.c				\
    port/generic/mkdepend			\
	port/generic/getopt.h			\
	port/generic/flock.h			\
	port/generic/Makefile.libtiff.gcc	\
	port/generic/GCC-PATCH			\
    port/sun/README				\
	port/sun/GCC-PATCH			\
	port/sun/Makefile			\
	port/sun/defs				\
	port/sun/install.sh			\
	port/sun/paths.h			\
	port/sun/termios.h			\
	port/sun/sys/types.h			\
    port/sgi/Makefile				\
	port/sgi/defs.cc			\
	port/sgi/defs.gcc			\
	port/sgi/Makefile.libtiff.gcc		\
	port/sgi/getopt.h			\
	port/sgi/paths.h			\
	port/sgi/sys/types.h			\
    port/bsdi/README				\
	port/bsdi/Makefile			\
	port/bsdi/Makefile.flexfax		\
	port/bsdi/Makefile.libtiff		\
	port/bsdi/defs				\
	port/bsdi/install.sh			\
	port/bsdi/cuserid.c			\
	port/bsdi/libc.h			\
	port/bsdi/malloc.h			\
	port/bsdi/paths.h			\
	port/bsdi/termios.h			\
    port/svr4/README				\
	port/svr4/Makefile			\
	port/svr4/byteorder.h			\
	port/svr4/defs				\
	port/svr4/flock.h			\
	port/svr4/install.sh			\
	port/svr4/limits.h			\
	port/svr4/paths.h			\
	port/svr4/signal.h			\
	port/svr4/syslog.h			\
	port/svr4/termios.h			\
	port/svr4/ulimit.h			\
	port/svr4/unistd.h			\
	port/svr4/utmp.h			\
	port/svr4/sys/select.h			\
	port/svr4/faxmail.o.uu			\
	port/svr4/mkdev.patch			\
    port/386bsd/README				\
	port/386bsd/Makefile			\
	port/386bsd/defs			\
	port/386bsd/paths.h			\
    port/solaris2/README			\
	port/solaris2/Makefile			\
	port/solaris2/defs			\
    port/sco/README				\
	port/sco/Makefile			\
	port/sco/Makefile.flexfax		\
	port/sco/defs				\
	port/sco/flock.c			\
	port/sco/ftruncate.c			\
	port/sco/install.sh			\
	port/sco/mkstemp.c			\
	port/sco/paths.h			\
	${NULL}
#
# Files imported from InterViews.
#
IVFILES=\
    iv/Dispatch/_defines.h			\
    iv/Dispatch/dispatcher.c++			\
    iv/Dispatch/dispatcher.h			\
    iv/Dispatch/dp.h				\
    iv/Dispatch/enter-scope.h			\
    iv/Dispatch/iohandler.c++			\
    iv/Dispatch/iohandler.h			\
    iv/InterViews/_defines.h			\
    iv/InterViews/_undefs.h			\
    iv/InterViews/enter-scope.h			\
    iv/InterViews/iv.h				\
    iv/InterViews/regexp.c++			\
    iv/InterViews/regexp.h			\
    iv/OS/_defines.h				\
    iv/OS/_undefs.h				\
    iv/OS/enter-scope.h				\
    iv/OS/leave-scope.h				\
    iv/OS/memory.c++				\
    iv/OS/memory.h				\
    iv/OS/types.h				\
    iv/OS/os.h					\
    ${NULL}
#
# Files imported from libtiff.
#
TIFFFILES=\
    libtiff/README				\
    libtiff/machdep.h				\
    libtiff/t4.h				\
    libtiff/tif_fax3.h				\
    libtiff/tiff*.h				\
    libtiff/mk*.c				\
    libtiff/tif_*.c				\
    libtiff/Makefile.*				\
    ${NULL}
#
# Files imported from tiff/contrib/fax2ps.
#
FAX2PSFILES=\
    fax2ps/README				\
    fax2ps/defs.h				\
    fax2ps/fax2ps.c				\
    fax2ps/faxdecode.c				\
    ${NULL}
#
# Files that comprise the FlexFAX source distribution.
#
DISTFILES=\
    ${FLEXFAXFILES} dist/flexfax.alpha		\
    ${IVFILES} \
    ${TIFFFILES} \
    ${FAX2PSFILES} \
    ${NULL}

#
# These rules are used to create the source distribution images
#
rcsclean:
	rcsclean ${FLEXFAXFILES} && co ${FLEXFAXFILES}

alpha:
	${MAKE} alpha.stamp
	${MAKE} alpha.tar

# stamp relevant files according to current alpha
alpha.stamp:
	ALPHA=`awk '{print $$3}' dist/flexfax.alpha`;			\
	VERSION="Alpha`sed 's/\./_/g' VERSION`$$ALPHA";			\
	NOW=`date`;							\
	for i in ${FLEXFAXFILES}; do					\
	    REV=`rlog -h -d"$$NOW" $$i|fgrep 'head:'|awk '{print $$2}'`;\
	    rcs "-N$$VERSION:$$REV" "-sExp:$$REV" $$i && co -sExp $$i;	\
	done

purge.alpha.stamp:
	ALPHA=`awk '{print $$3}' dist/flexfax.alpha`;			\
	VERSION="Alpha`sed 's/\./_/g' VERSION`$$ALPHA";			\
	NOW=`date`;							\
	for i in ${FLEXFAXFILES}; do					\
	    REV=`rlog -h -d"$$NOW" $$i|fgrep 'head:'|awk '{print $$2}'`;\
	    rcs "-n$$VERSION" "-sExp:$$REV" $$i && co $$i;		\
	done

# create alpha distribution archive
alpha.tar:
	ALPHA=`awk '{print $$3}' dist/flexfax.alpha`;			\
	VERSION=v`cat VERSION`$$ALPHA;					\
	rm -f $$VERSION.src.tar.Z;					\
	tar cvf - ${DISTFILES} | compress > $$VERSION.src.tar.Z

release:
	${MAKE} clobber
	${MAKE} release.stamp
	./configure
	${MAKE} product
	${MAKE} release.tar

release.stamp:
	VERSION="Release`sed 's/\./_/g' VERSION`";			\
	NOW=`date`;							\
	for i in ${FLEXFAXFILES}; do					\
	    REV=`rlog -h -d"$$NOW" $$i|fgrep 'head:'|awk '{print $$2}'`;\
	    rcs "-N$$VERSION:$$REV" "-sRel:$$REV" $$i && co -sRel $$i;	\
	done

# create release distribution archive
release.tar:
	VERSION=v`cat VERSION`;						\
	rm -f $$VERSION.src.tar.Z;					\
	tar cvf - ${DISTFILES} | compress > $$VERSION.src.tar.Z
