# Generated automatically from Makefile.in by configure.
###=====================================================================
### Makefile for files in /u/sy/beebe/tex/bibsplit
###
### Copyright (C) 1999 Nelson H. F. Beebe
### See the file bibsplit.sin for a full copyright notice.
###
### Current target list:
###	all
###	$(PROGNAME).jar
###	$(PROGNAME).tar
###	$(PROGNAME).zip
###	$(PROGNAME).zoo
###	check
###	check-bibsplit
###	clean
###	cleandist
###	cleandocs
###	clobber
###	config.hin
###	configure
###	dist
###	distclean
###	docs
###	dust
###	dw
###	html
###	install
###	install-exe
###	install-ftp
###	install-man
###	install-show
###	install-shrlib
###	main.o
###	maintainer-check-regress
###	maintainer-checknr
###	maintainer-clean
###	Makefile
###	maketab
###	mostlyclean
###	pdf
###	proctab.c
###	ps
###	spell
###	tgrind
###	txt
###	uninstall
###	uninstall-exe
###	uninstall-man
###	uninstall-shrlib
###	ytab.c
###	ytab.h
###	ytab.o
###	b.o
###	cpuclock.o
###	lib.o
###	maketab.o
###	parse.o
###	proctab.o
###	profile.o
###	run.o
###	timercheck.o
###	tran.o
###	wwlex.o
###
### [11-Nov-1999]
###=====================================================================
### Program definitions

PROGNAME	= bibsplit
PROGRAMS	= $(PROGNAME)
PROGLIB		= $(PROGNAME)-$(VERSION)
VERSION		= 1.00
DATE		= [11-Nov-1999]

###=====================================================================
### Installation locations

prefix		= /usr/local
bindir		= $(prefix)/bin
catdir		= $(prefix)/man/cat$(manext)
mandir		= $(prefix)/man/man$(manext)
manext		= 1
shrlibdir	= $(shrlibtop)/$(PROGNAME)-$(VERSION)
shrlibtop       = $(prefix)/share/lib/$(PROGNAME)

FTPDIR		= /u/ftp/pub/tex/bib

###=====================================================================
### Macro definitions

AUTOCONF	= autoconf

AWK		= /usr/local/bin/mawk

CAT		= cat

CHECKNR		= checknr

CHECKSUM	= checksum

CHMOD		= chmod

CMP		= cmp

CP		= scp -p

DEROFF		= deroff

DIFF		= diff

DISTILL		= distill

DITROFF		= groff

### dw is available at:
###	ftp://ftp.math.utah.edu/pub/misc/dw.shar
###	ftp://ftp.math.utah.edu/pub/misc/dw.tar.gz
###	ftp://ftp.math.utah.edu/pub/misc/dw.zip
###	ftp://ftp.math.utah.edu/pub/misc/dw.zoo
###
###	http://www.math.utah.edu/pub/misc/dw.shar
###	http://www.math.utah.edu/pub/misc/dw.tar.gz
###	http://www.math.utah.edu/pub/misc/dw.zip
###	http://www.math.utah.edu/pub/misc/dw.zoo
DW		= dw

GREP		= grep

GZIP		= gzip

ISPELL		= ispell

JAR		= jar

LEX		= lex

LIBS		= 

LN		= ln

LS		= ls

### man2html is available at
###	ftp://ftp.math.utah.edu/pub/sgml/man2html-x.yy.*
###	http://www.math.utah.edu/pub/sgml/index.html#man2html
MAN2HTML	= man2html

MAN2HTMLFLAGS	= -grammar-level 3.2

MKDIR		= /u/sy/beebe/tex/bibsplit/bibsplit-1.00/mkdir.sh -p

MV		= mv

NROFF		= nroff

RM		= rm -f

SED		= sed

SEDCMD		= $(SED) -e 's%AWK=.*$$%AWK=$(AWK)%' \
			-e 's%LIBDIR=/.*$$%LIBDIR=$(shrlibdir)%' \
			-e 's%@LIBDIR@%$(shrlibdir)%g' \
			-e 's%@BINDIR@%$(bindir)%g' \
			-e 's%1[.]00%$(VERSION)%g' \
			-e 's%@DATE@%$(DATE)%g' \
			-e 's%^\#! /bin/sh%\#! $(SHELL)%'

SHELL		= /bin/ksh

SORT		= sort

SPELL		= spell

SPELLFILTER	= $(CAT)
SPELLFILTER	= $(SED) -e 's/[0-9,.:;?&]/ /g'

TAR		= tar

### The enhanced tgrind utility is available at:
###
###	ftp://ftp.math.utah.edu/pub/misc/tgrind-3.00.tar.gz
###	ftp://ftp.math.utah.edu/pub/misc/tgrind-3.00.zip
###	ftp://ftp.math.utah.edu/pub/misc/tgrind-3.00.zoo
###
###	http://www.math.utah.edu/pub/misc/tgrind-3.00.tar.gz
###	http://www.math.utah.edu/pub/misc/tgrind-3.00.zip
###	http://www.math.utah.edu/pub/misc/tgrind-3.00.zoo
TGRIND		= tgrind

UNZIP		= unzip

ZIP		= zip

ZOO		= zoo

###=====================================================================
### Compiler flags:

CFLAGS          =  $(OPT) $(DEFS) $(CPPFLAGS)

CXXFLAGS	=  $(OPT) $(DEFS) $(CPPFLAGS)

DEFS		=  

CPPFLAGS	= -I. 

OPT		= -O
OPT		= -g

TGRINDFLAGS	= -l awk -fn Bookman

YFLAGS		= -d

###=====================================================================
### Source files:

AWKFILES	= $(PROGNAME).awk

CFILES          = $(DISTCFILES) ytab.c

CHECKFILES      = test/check001.opt test/check002.opt test/check003.opt \
		  test/check004.opt test/check005.opt test/check006.opt \
		  test/check007.opt test/check008.opt test/check009.opt \
		  test/check010.opt test/check011.opt test/check012.opt \
		  test/check013.opt test/check014.opt test/check015.opt \
		  test/master.bib test/okay/check001.err \
		  test/okay/check001.out test/okay/check001/check001.opt \
		  test/okay/check002.err test/okay/check002.out \
		  test/okay/check002/check002.opt test/okay/check003.err \
		  test/okay/check003.out test/okay/check003/check003.opt \
		  test/okay/check003/check003_1800.bib \
		  test/okay/check003/check003_1900.bib \
		  test/okay/check003/check003_UNKNOWN.bib \
		  test/okay/check004.err test/okay/check004.out \
		  test/okay/check004/check004.opt \
		  test/okay/check004/check004_1850.bib \
		  test/okay/check004/check004_1920.bib \
		  test/okay/check004/check004_1930.bib \
		  test/okay/check004/check004_1940.bib \
		  test/okay/check004/check004_1950.bib \
		  test/okay/check004/check004_1960.bib \
		  test/okay/check004/check004_1970.bib \
		  test/okay/check004/check004_1980.bib \
		  test/okay/check004/check004_1990.bib \
		  test/okay/check004/check004_UNKNOWN.bib \
		  test/okay/check005.err test/okay/check005.out \
		  test/okay/check005/check005.opt \
		  test/okay/check005/check005_1850.bib \
		  test/okay/check005/check005_1900.bib \
		  test/okay/check005/check005_1950.bib \
		  test/okay/check005/check005_UNKNOWN.bib \
		  test/okay/check006.err test/okay/check006.out \
		  test/okay/check006/check006.opt \
		  test/okay/check006/check006_a.bib \
		  test/okay/check006/check006_b.bib \
		  test/okay/check006/check006_c.bib \
		  test/okay/check006/check006_d.bib \
		  test/okay/check006/check006_e.bib \
		  test/okay/check006/check006_f.bib \
		  test/okay/check006/check006_g.bib \
		  test/okay/check006/check006_h.bib \
		  test/okay/check006/check006_i.bib \
		  test/okay/check006/check006_j.bib \
		  test/okay/check006/check006_k.bib \
		  test/okay/check006/check006_l.bib \
		  test/okay/check006/check006_m.bib \
		  test/okay/check006/check006_n.bib \
		  test/okay/check006/check006_o.bib \
		  test/okay/check006/check006_p.bib \
		  test/okay/check006/check006_q.bib \
		  test/okay/check006/check006_r.bib \
		  test/okay/check006/check006_s.bib \
		  test/okay/check006/check006_t.bib \
		  test/okay/check006/check006_u.bib \
		  test/okay/check006/check006_v.bib \
		  test/okay/check006/check006_w.bib \
		  test/okay/check006/check006_x.bib \
		  test/okay/check006/check006_y.bib \
		  test/okay/check006/check006_z.bib test/okay/check007.err \
		  test/okay/check007.out test/okay/check007/check007.opt \
		  test/okay/check007/check007_000001.bib \
		  test/okay/check007/check007_000251.bib \
		  test/okay/check007/check007_000501.bib \
		  test/okay/check007/check007_000751.bib \
		  test/okay/check007/check007_001001.bib \
		  test/okay/check008.err test/okay/check008.out \
		  test/okay/check008/check008.opt \
		  test/okay/check008/check008_1850.bib \
		  test/okay/check008/check008_1920.bib \
		  test/okay/check008/check008_1925.bib \
		  test/okay/check008/check008_1930.bib \
		  test/okay/check008/check008_1935.bib \
		  test/okay/check008/check008_1940.bib \
		  test/okay/check008/check008_1945.bib \
		  test/okay/check008/check008_1950.bib \
		  test/okay/check008/check008_1955.bib \
		  test/okay/check008/check008_1960.bib \
		  test/okay/check008/check008_1965.bib \
		  test/okay/check008/check008_1970.bib \
		  test/okay/check008/check008_1975.bib \
		  test/okay/check008/check008_1980.bib \
		  test/okay/check008/check008_1985.bib \
		  test/okay/check008/check008_1990.bib \
		  test/okay/check008/check008_1995.bib \
		  test/okay/check008/check008_UNKNOWN.bib \
		  test/okay/check009.err test/okay/check009.out \
		  test/okay/check009/check009.opt \
		  test/okay/check009/check009_a_e.bib \
		  test/okay/check009/check009_f_j.bib \
		  test/okay/check009/check009_k_o.bib \
		  test/okay/check009/check009_p_t.bib \
		  test/okay/check009/check009_u_z.bib test/okay/check010.err \
		  test/okay/check010.out test/okay/check010/check010.opt \
		  test/okay/check010/check010_1840.bib \
		  test/okay/check010/check010_1920.bib \
		  test/okay/check010/check010_1940.bib \
		  test/okay/check010/check010_1960.bib \
		  test/okay/check010/check010_1980.bib \
		  test/okay/check010/check010_UNKNOWN.bib \
		  test/okay/check011.err test/okay/check011.out \
		  test/okay/check011/check011.opt \
		  test/okay/check011/check011_1854.bib \
		  test/okay/check011/check011_1923.bib \
		  test/okay/check011/check011_1925.bib \
		  test/okay/check011/check011_1933.bib \
		  test/okay/check011/check011_1935.bib \
		  test/okay/check011/check011_1938.bib \
		  test/okay/check011/check011_1939.bib \
		  test/okay/check011/check011_1940.bib \
		  test/okay/check011/check011_1942.bib \
		  test/okay/check011/check011_1945.bib \
		  test/okay/check011/check011_1946.bib \
		  test/okay/check011/check011_1949.bib \
		  test/okay/check011/check011_1950.bib \
		  test/okay/check011/check011_1951.bib \
		  test/okay/check011/check011_1952.bib \
		  test/okay/check011/check011_1953.bib \
		  test/okay/check011/check011_1955.bib \
		  test/okay/check011/check011_1956.bib \
		  test/okay/check011/check011_1957.bib \
		  test/okay/check011/check011_1958.bib \
		  test/okay/check011/check011_1959.bib \
		  test/okay/check011/check011_1960.bib \
		  test/okay/check011/check011_1961.bib \
		  test/okay/check011/check011_1962.bib \
		  test/okay/check011/check011_1963.bib \
		  test/okay/check011/check011_1964.bib \
		  test/okay/check011/check011_1965.bib \
		  test/okay/check011/check011_1966.bib \
		  test/okay/check011/check011_1967.bib \
		  test/okay/check011/check011_1968.bib \
		  test/okay/check011/check011_1969.bib \
		  test/okay/check011/check011_1970.bib \
		  test/okay/check011/check011_1971.bib \
		  test/okay/check011/check011_1972.bib \
		  test/okay/check011/check011_1973.bib \
		  test/okay/check011/check011_1974.bib \
		  test/okay/check011/check011_1975.bib \
		  test/okay/check011/check011_1976.bib \
		  test/okay/check011/check011_1977.bib \
		  test/okay/check011/check011_1978.bib \
		  test/okay/check011/check011_1979.bib \
		  test/okay/check011/check011_1980.bib \
		  test/okay/check011/check011_1981.bib \
		  test/okay/check011/check011_1982.bib \
		  test/okay/check011/check011_1983.bib \
		  test/okay/check011/check011_1984.bib \
		  test/okay/check011/check011_1985.bib \
		  test/okay/check011/check011_1986.bib \
		  test/okay/check011/check011_1987.bib \
		  test/okay/check011/check011_1988.bib \
		  test/okay/check011/check011_1989.bib \
		  test/okay/check011/check011_1990.bib \
		  test/okay/check011/check011_1991.bib \
		  test/okay/check011/check011_1992.bib \
		  test/okay/check011/check011_1993.bib \
		  test/okay/check011/check011_1994.bib \
		  test/okay/check011/check011_1995.bib \
		  test/okay/check011/check011_1996.bib \
		  test/okay/check011/check011_1997.bib \
		  test/okay/check011/check011_1998.bib \
		  test/okay/check011/check011_1999.bib \
		  test/okay/check011/check011_UNKNOWN.bib \
		  test/okay/check012.err test/okay/check012.out \
		  test/okay/check012/check012.opt test/okay/check013.err \
		  test/okay/check013.out test/okay/check013/check013.opt \
		  test/okay/check014.err test/okay/check014.out \
		  test/okay/check014/check014.opt test/okay/check015.err \
		  test/okay/check015.out test/okay/check015/check015.opt \
		  test/okay/check015/check015_000001.bib

CHECKOPTFILES   = check001.opt check002.opt check003.opt check004.opt \
		  check005.opt check006.opt check007.opt check008.opt \
		  check009.opt check010.opt check011.opt check012.opt \
		  check013.opt check014.opt check015.opt

CHECKNAMES	= $(CHECKOPTFILES:.opt=)

CONFIGINFILES   = configure.in $(PROGNAME).sin

DISTFILES       = ChangeLog COPYING INSTALL Makefile.in README \
		  README.AWK mkdir.sh $(CHECKFILES) $(CONFIGINFILES) \
		  configure $(SINFILES) $(SHRLIBFILES) $(SOKFILES) \
		  $(DOCFILES) $(SAVEFILES)

DOCFILES	= $(HTMLFILES) $(MANFILES) $(PDFFILES) $(PSFILES) $(TXTFILES)

HTMLFILES	= $(MANFILES:.man=.html)

MANFILES	= $(PROGNAME).man

PDFFILES	= $(MANFILES:.man=.pdf)

PSFILES		= $(MANFILES:.man=.ps)

SAVEFILES       = save/Makefile save/configure

SHFILES		= $(AWKFILES:.awk=.sh)

SHRLIBFILES	= $(AWKFILES)

SINFILES	= $(AWKFILES:.awk=.sin)

SOKFILES	= $(MANFILES:.man=.sok)

TMPBIBSPLIT	= $(TMPDIR)/bibsplit

TMPDIR		= /tmp

TXTFILES	= $(MANFILES:.man=.txt)

###=====================================================================
### Suffixes and extra rule(s):

.SUFFIXES:	.dw .ser .html .pdf .ps .txt .man

.man.dw:
	$(DEROFF) $< | $(DW) >$*.dw
	@if [ -s $*.dw ] ; \
	then \
		echo "Doubled words in $*.dw" ; \
		cat $*.dw ; \
	fi

.man.html:
	$(MAN2HTML) $(MAN2HTMLFLAGS) $<
	$(MV) $@ $*.tmp
	$(SEDCMD) < $*.tmp >$@
	-$(RM) $*.tmp

.man.ps:
	$(SEDCMD) $< | $(DITROFF) -Tps -man - >$@

SPELL-FILTER = $(SED) -e "s/[^a-zA-Z'-]/ /g"
.man.ser:
	$(DEROFF) $< | $(SPELL-FILTER) | $(SPELL) +$*.sok >$*.ser
	$(DEROFF) $< | $(SPELL-FILTER) | $(ISPELL) -l -p $*.sok >>$*.ser
	@if [ -s $*.ser ] ; \
	then \
		echo "Spelling exceptions in $*.ser" ; \
		$(SORT) -u $*.ser >/tmp/$*.tmp ; \
		$(MV) /tmp/$*.tmp $*.ser ; \
		$(CAT) $*.ser ; \
	fi

.man.txt:
	$(SEDCMD) $< | $(NROFF) -man - | col -b | expand >$@

.ps.pdf:
	$(DISTILL) $<

###=====================================================================
### Targets:

all:
	@echo 'There is nothing to compile in the $(PROGNAME)-$(VERSION) distribution'
	@echo 'Perhaps you should try "make -n install"'

### A Java archive (.jar) file is read and written like a UNIX .tar
### file, but its format is compatible with InfoZip (zip/unzip), a
### cross-platform archive format.  As Java becomes widely available,
### .jar files will become familiar to users, and are therefore a
### reasonable distribution format.
###
### jar creates one additional file, META-INF/MANIFEST.MF, which
### provides a contents listing, and checksums, e.g.,
###
###	% cat META-INF/MANIFEST.MF
###	Manifest-Version: 1.0
###
###	Name: foo.1
###	Digest-Algorithms: SHA MD5
###	SHA-Digest: 3o3sk+dlhmdbQB0A7Upx4qRRUzU=
###	MD5-Digest: N7t5JDQ07HAcNKJSNTAhig==

$(PROGNAME).jar:	$(DISTFILES)
	-$(RM) $(PROGNAME).jar
	$(JAR) cf $(PROGNAME).jar $(DISTFILES)
	-$(MKDIR) $(PROGNAME)-$(VERSION)
	cd $(PROGNAME)-$(VERSION); $(JAR) xf ../$(PROGNAME).jar
	$(JAR) cf $(PROGNAME)-$(VERSION).jar $(PROGNAME)-$(VERSION)
	-$(RM) -r $(PROGNAME)-$(VERSION)
	-$(RM) $(PROGNAME).jar
	$(LN) $(PROGNAME)-$(VERSION).jar $(PROGNAME).jar

$(PROGNAME).tar:	$(DISTFILES)
	-$(RM) $(PROGNAME).tar $(PROGNAME).tar-lst
	$(TAR) chf $(PROGNAME).tar $(DISTFILES)
	-$(MKDIR) $(PROGNAME)-$(VERSION)
	cd $(PROGNAME)-$(VERSION); $(TAR) xf ../$(PROGNAME).tar
	$(TAR) cf $(PROGNAME)-$(VERSION).tar $(PROGNAME)-$(VERSION)
	-$(RM) -r $(PROGNAME)-$(VERSION)
	-$(RM) $(PROGNAME).tar
	$(LN) $(PROGNAME)-$(VERSION).tar $(PROGNAME).tar

$(PROGNAME).zip:	$(DISTFILES)
	-$(RM) $(PROGNAME)*.zip $(PROGNAME)*.zip-lst
	$(ZIP) $(PROGNAME)-$(VERSION).zip $(DISTFILES)
	$(UNZIP) -v $(PROGNAME)-$(VERSION).zip >$(PROGNAME)-$(VERSION).zip-lst
	$(LN) $(PROGNAME)-$(VERSION).zip $(PROGNAME).zip

$(PROGNAME).zoo:	$(DISTFILES)
	-$(RM) $(PROGNAME)*.zoo $(PROGNAME)*.zoo-lst
	$(ZOO) a $(PROGNAME)-$(VERSION).zoo $(DISTFILES)
	$(ZOO) v $(PROGNAME)-$(VERSION).zoo >$(PROGNAME)-$(VERSION).zoo-lst
	$(LN) $(PROGNAME)-$(VERSION).zoo $(PROGNAME).zoo

# Because a good bit of the command-line processing is done in the
# shell script interface to bibsplit.awk, we need to make the checks
# using a temporarily-installed version of the program.
check:	check-install-tmp check-runs check-uninstall-tmp

check-install-tmp:
	@-$(MKDIR) $(TMPBIBSPLIT) $(TMPBIBSPLIT)/bin $(TMPBIBSPLIT)/man \
		$(TMPBIBSPLIT)/man/man1 $(TMPBIBSPLIT)/share \
		$(TMPBIBSPLIT)/share/lib $(TMPBIBSPLIT)/share/lib/bibsplit
	@$(MAKE) install prefix=$(TMPBIBSPLIT) >/dev/null

# Because jar seems to have problems with empty directories, we have a copy
# of the *.opt files in test/okay/check??? and in test/check???.
check-runs:
	@echo ""
	@echo ========================================================================
	@echo WARNING: You need about 14MB of free disk space in the current directory
	@echo to complete the tests!
	@echo ========================================================================
	@echo Test of bibsplit: there should be no output, other than the test and 
	@echo command names.  The tests take about 30 sec on a fast workstation.
	@-cd test ; \
	for f in $(CHECKNAMES) ; \
	do \
		echo ============ $$f: $(PROGNAME) `cat $$f.opt` ; \
		$(MKDIR) $$f 2>/dev/null; \
		$(TMPBIBSPLIT)/bin/$(PROGNAME) --quick --logfile $$f.err \
			--outfile $$f.out --prefix $$f/$${f}_ `cat $$f.opt` master.bib ; \
		if $(CMP) -s okay/$$f.err $$f.err ; \
		then \
			$(RM) $$f.err ; \
		else \
			$(DIFF) okay/$$f.err $$f.err ; \
		fi ; \
		if $(CMP) -s okay/$$f.out $$f.out ; \
		then \
			$(RM) $$f.out ; \
		else \
			$(DIFF) okay/$$f.out $$f.out ; \
		fi ; \
		$(CP) $$f.opt $$f >/dev/null ; \
		$(DIFF) -r okay/$$f $$f ; \
	done
	@echo ========================================================================
	@echo ""

check-uninstall-tmp:
	@-$(RM) -r $(TMPBIBSPLIT)

checknr:	maintainer-checknr

clean:	clean-test
	-$(RM) *.dw
	-$(RM) *.i
	-$(RM) *.ser
	-$(RM) *.tmp
	-$(RM) *~
	-$(RM) \#*
	-$(RM) a.out
	-$(RM) core
	-$(RM) tg_[0-9][0-9][0-9][0-9][0-9].*

clean-test:
	-$(RM) -r test/check???
	-$(RM) test/check???.err test/check???.out
	-$(RM) test/*~
	-$(RM) test/\#*
	-$(RM) test/a.out
	-$(RM) test/core

cleandist:
	-$(RM) $(PROGNAME)*.jar $(PROGNAME)*.jar-lst
	-$(RM) $(PROGNAME)*.tar $(PROGNAME)*.tar-lst
	-$(RM) $(PROGNAME)*.zip $(PROGNAME)*.zip-lst
	-$(RM) $(PROGNAME)*.zoo $(PROGNAME)*.zoo-lst

cleandocs:
	-$(RM) $(HTMLFILES)
	-$(RM) $(PDFFILES)
	-$(RM) $(PSFILES)
	-$(RM) $(TXTFILES)

clobber:	distclean

### While this step requires autoconf, it should only ever be used at the
### developer's site, where it is universally available.
configure:	configure.in
	$(AUTOCONF)

dist:	docs $(PROGNAME).jar $(PROGNAME).tar $(PROGNAME).zip $(PROGNAME).zoo

distclean:	mostlyclean cleandist
	-$(RM) config.cache config.log config.status Makefile

docs:	$(DOCFILES)

dw:	$(MANFILES:.man=.dw)

html:	$(HTMLFILES)

install:	install-exe install-shrlib install-man install-show

install-exe:	uninstall-exe
	for f in $(SHFILES) ; \
	do \
		g=`basename $$f .sh` ; \
		$(SEDCMD) < $$f > $(bindir)/$$g ; \
		$(LN) $(bindir)/$$g $(bindir)/$$g-$(VERSION) ; \
		$(CHMOD) 775 $(bindir)/$$g $(bindir)/$$g-$(VERSION) ; \
	done

install-ftp:	dist
	$(TAR) tvf $(PROGNAME)-$(VERSION).tar >$(FTPDIR)/$(PROGNAME)-$(VERSION).tar-lst
	$(GZIP) <$(PROGNAME)-$(VERSION).tar >$(FTPDIR)/$(PROGNAME)-$(VERSION).tar.gz
	$(CP) $(PROGNAME)-$(VERSION).jar $(FTPDIR)
	$(JAR) tvf $(PROGNAME)-$(VERSION).jar >$(FTPDIR)/$(PROGNAME)-$(VERSION).jar-lst 2>&1
	$(CP) $(PROGNAME)-$(VERSION).zip $(FTPDIR)
	$(CP) $(PROGNAME)-$(VERSION).zip-lst $(FTPDIR)
	$(CP) $(PROGNAME)-$(VERSION).zoo $(FTPDIR)
	$(CP) $(PROGNAME)-$(VERSION).zoo-lst $(FTPDIR)
	$(LS) -l $(FTPDIR)/$(PROGNAME)*

install-man:	uninstall-man
	for f in $(MANFILES) ; \
	do \
		g=`basename $$f .man` ; \
		$(SEDCMD) $$f | $(CHECKSUM) > $(mandir)/$$g.$(manext) ; \
		$(CHMOD) 664 $(mandir)/$$g.$(manext) ; \
	done

install-show:
	@echo ''
	@echo Installed files...
	@$(LS) -l $(bindir)/$(PROGNAME) $(bindir)/$(PROGNAME)-$(VERSION)
	@$(LS) -l $(mandir)/$(PROGNAME).$(manext)
	@if test -d $(shrlibdir) ; then $(LS) -lR $(shrlibdir)/* ; fi
	@echo ''

install-shrlib:	uninstall-shrlib
	-$(MKDIR) $(shrlibtop)
	@if test -d $(shrlibtop) ; then true ; else echo Cannot create $(shrlibtop) ; exit 1 ; fi
	-$(MKDIR) $(shrlibdir)
	@if test -d $(shrlibdir) ; then true ; else echo Cannot create $(shrlibdir) ; exit 1 ; fi
	for f in $(SHRLIBFILES) ; \
	do \
		$(SEDCMD) < $$f > $(shrlibdir)/$$f ; \
	done
	$(CHMOD) 664 $(shrlibdir)/*

maintainer-clean:	distclean cleandocs
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."
	-$(RM) configure

Makefile:	Makefile.in
	./configure

mostlyclean:	clean

pdf:	$(PDFFILES)

ps:	$(PSFILES)

spell:	$(MANFILES:.man=.ser)

tgrind:
	$(TGRIND) $(TGRINDFLAGS) $(PROGNAME).awk 2>&1 | $(GREP) '^-.*[.]ps'
	-@$(RM) tg_[0-9][0-9][0-9][0-9][0-9].dvi tg_[0-9][0-9][0-9][0-9][0-9].log tg_[0-9][0-9][0-9][0-9][0-9].tex

txt:	$(TXTFILES)

uninstall:	uninstall-exe uninstall-shrlib uninstall-man

uninstall-exe:
	-for f in $(PROGRAMS) ; \
	do \
		$(RM) $(bindir)/$$f $(bindir)/$$f-$(VERSION) 2>/dev/null; \
	done

uninstall-man:
	-for f in $(MANFILES) ; \
	do \
		g=`basename $$f .man` ; \
		$(RM) $(mandir)/$$g.$(manext) 2>/dev/null; \
		$(RM) $(catdir)/$$g.$(manext) 2>/dev/null; \
	done

uninstall-shrlib:
	-$(RM) -r $(shrlibdir) 2>/dev/null
