#  'cbb' -- Check Book Balancer
#           Makefile
#
#  Written by Curtis Olson.  Started August 25, 1994.
#
#  Copyright (C) 1994 - 1997  Curtis L. Olson  - curt@sledge.mn.org
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 2.31 1997/06/12 21:53:11 curt Exp $
# (Log is kept at end of this file)
# -----------------------------------------------------------------------


CBB_ROOT = cbb-0.73
TAR = tar
PERL = perl


all:
	@echo "Nothing is needed to build in advance of 'make install'"

install:
	$(PERL) install.pl

docs/cbb-man.dvi: docs/cbb-man.tex
	(cd docs; \
	latex cbb-man.tex; \
	echo "Running twice to make sure references are right."; \
	latex cbb-man.tex)


docs/cbb-man.ps: docs/cbb-man.dvi
	(cd docs; \
	dvips cbb-man.dvi -o)


docs/cbb-man/cbb-man.html: docs/cbb-man.tex
	(cd docs; latex2html -split 0 -show_section_numbers cbb-man.tex)


tar: docs/cbb-man.ps docs/cbb-man/cbb-man.html
	chmod 644 cbb wrapper.pl install.pl
	( cd ..; \
	$(TAR) cvf $(CBB_ROOT).tar $(CBB_ROOT)/Announce $(CBB_ROOT)/Bugs \
		$(CBB_ROOT)/COPYING $(CBB_ROOT)/FAQ $(CBB_ROOT)/Makefile \
		$(CBB_ROOT)/README $(CBB_ROOT)/THANKS $(CBB_ROOT)/Todo \
		$(CBB_ROOT)/Version \
		$(CBB_ROOT)/balloon.tcl \
		$(CBB_ROOT)/balance.tcl $(CBB_ROOT)/bindings.tcl \
		$(CBB_ROOT)/categories.pl $(CBB_ROOT)/categories.tcl \
		$(CBB_ROOT)/cbb \
		$(CBB_ROOT)/docs/cbb-man/ $(CBB_ROOT)/docs/cbb-man.ps \
		$(CBB_ROOT)/docs/cbb-man.tex \
		$(CBB_ROOT)/docs/cbb-man.txt \
		$(CBB_ROOT)/cbb.lsm \
		$(CBB_ROOT)/common.pl \
		$(CBB_ROOT)/common.tcl \
		$(CBB_ROOT)/contrib/cbbsh.tar.gz \
		$(CBB_ROOT)/contrib/demo.inv \
		$(CBB_ROOT)/contrib/emacs-forms \
		$(CBB_ROOT)/contrib/fetch-latest.pl \
		$(CBB_ROOT)/contrib/importcat.README \
		$(CBB_ROOT)/contrib/importcat.pl \
		$(CBB_ROOT)/contrib/invest.pl \
		$(CBB_ROOT)/contrib/loan.pl \
		$(CBB_ROOT)/contrib/loan.gnuplot \
		$(CBB_ROOT)/contrib/recur.pl \
		$(CBB_ROOT)/contrib/term.pl \
		$(CBB_ROOT)/contrib/trimold.pl \
		$(CBB_ROOT)/contrib/txn \
		$(CBB_ROOT)/contrib/txn.README \
		$(CBB_ROOT)/contrib/upgrade-splits.pl \
		$(CBB_ROOT)/contrib/yearend.pl \
		$(CBB_ROOT)/default.cat \
		$(CBB_ROOT)/demo/categories \
		$(CBB_ROOT)/demo/demo.cbb \
		$(CBB_ROOT)/demo/demo.qif \
		$(CBB_ROOT)/demo/demo.rcr \
		$(CBB_ROOT)/engine.pl $(CBB_ROOT)/export.pl \
		$(CBB_ROOT)/extern.conf \
		$(CBB_ROOT)/file.pl $(CBB_ROOT)/file.tcl \
		$(CBB_ROOT)/filebox.tcl \
		$(CBB_ROOT)/graphs/cat-col.pl $(CBB_ROOT)/graphs/cat-pie.pl \
		$(CBB_ROOT)/graphs/cat2-col.pl $(CBB_ROOT)/graphs/graphbal \
		$(CBB_ROOT)/graphs/graphcol $(CBB_ROOT)/graphs/graphcolpos \
		$(CBB_ROOT)/graphs/graphpie $(CBB_ROOT)/graphs/graphs.conf \
		$(CBB_ROOT)/graphs/txn-list.pl \
		$(CBB_ROOT)/help.tcl \
		$(CBB_ROOT)/images/author.xbm \
		$(CBB_ROOT)/images/cbb.xbm \
		$(CBB_ROOT)/images/mini-cross.gif \
		$(CBB_ROOT)/images/mini-exclam.gif \
		$(CBB_ROOT)/import.pl \
		$(CBB_ROOT)/init.tcl \
		$(CBB_ROOT)/install.pl \
		$(CBB_ROOT)/log.pl $(CBB_ROOT)/main.tcl \
		$(CBB_ROOT)/memorized.pl \
		$(CBB_ROOT)/menu.tcl \
		$(CBB_ROOT)/prefs.tcl \
		$(CBB_ROOT)/req-specs \
		$(CBB_ROOT)/reports/ave-by-cat.pl \
		$(CBB_ROOT)/reports/by-cat.pl \
		$(CBB_ROOT)/reports/reports.conf \
		$(CBB_ROOT)/reports/miss-check.pl \
		$(CBB_ROOT)/reports/shrt-by-cat.pl \
		$(CBB_ROOT)/reports/txn-list.pl \
		$(CBB_ROOT)/reports.pl \
		$(CBB_ROOT)/reports.tcl \
		$(CBB_ROOT)/images/splash-32.gif \
		$(CBB_ROOT)/splits.tcl $(CBB_ROOT)/undo.tcl \
		$(CBB_ROOT)/wrapper.pl)

tar-all:
	chmod 755 cbb wrapper.pl install.pl
	( cd ..; $(TAR) cvf $(CBB_ROOT)-all.tar $(CBB_ROOT) )

clean:
	rm -f cbb-man.log cbb-man.aux cbb-man.toc cbb-man.ps cbb-man.dvi \
		debug alltxns.log


# -----------------------------------------------------------------------
# $Log: Makefile,v $
# Revision 2.31  1997/06/12 21:53:11  curt
# Applied more patches from Martin Schenk <schenkm@ping.at>.  His changes
# greatly improved and developed the preferences menu so it is now actually
# usable to set preferences.
# Current data file is now saved in ~/.cbbcur.tcl
#
# Revision 2.30  1997/05/07 01:17:44  curt
# Added contrib script "trimold.pl"
#
# Revision 2.29  1997/05/06 02:34:24  curt
# Added "prefs.tcl"
#
# Revision 2.28  1997/04/23 19:06:10  curt
# Changed regexp in install.pl & latex2html invocation in Makefile so that
# generic installations of latex2html will work as a converter rather than
# my specialized installation.
#
# Revision 2.27  1997/04/23 18:10:59  curt
# Added importcat.pl & txn to contrib section.
#
# Revision 2.26  1997/04/16 20:30:24  curt
# Reduced color version of splash.gif renamed to splash-32.gif
#
# Revision 2.25  1997/04/08 19:47:33  curt
# Changes for version 0.73
#
# Revision 2.24  1997/04/07 21:11:31  curt
# Allow "perl" to be overridden from command line.
#
# Revision 2.23  1997/03/04 03:23:35  curt
# Changes for next version.
#
# Revision 2.22  1997/02/19 18:17:09  curt
# Removed migrate script from tar line
#
# Revision 2.21  1997/01/10 19:53:28  curt
# Added loan.gnuplot loan.pl term.pl
#
# Revision 2.20  1997/01/09 03:56:55  curt
# Added contrib script loan.pl.
# User sizable account list.
# Removed some old gnuplot baggage from install.pl.
#
# Revision 2.19  1996/12/17 20:15:42  curt
# Version incremented to 0.70.
# No longer save running total in .cbb files.
# Miscellaneous tweaks.
#
# Revision 2.18  1996/12/17 14:53:49  curt
# Updated copyright date.
#
# Revision 2.17  1996/12/16 04:18:08  curt
# Continuing the great overhaul of December 1996.
#
# Revision 2.16  1996/12/13 01:26:57  curt
# Worked on getting reports.tcl to work smoothly.
#
# Revision 2.15  1996/12/11 18:33:23  curt
# Ran a spell checker.
#
# Revision 2.14  1996/12/11 04:32:25  curt
# Several minor tweaks.
#
# Revision 2.13  1996/12/09 14:35:06  curt
# Changes to reflect new structure and several new files.
#
# Revision 2.12  1996/10/24 15:15:14  curt
# Minor changes to install.pl & Makefile to facilitate creating a Debian
# package.
#
# Revision 2.11  1996/10/24 15:09:29  curt
# Version number updates.
#
# Revision 2.10  1996/10/22 21:43:56  curt
# Added a new report:  ave-by-cat.pl
#
# Revision 2.9  1996/10/04 19:51:16  curt
# Added miss-check.pl report to Makefile so it can get included in the tar
# file.
#
# Revision 2.8  1996/10/04 19:48:21  curt
# Added a script to automatically fetch and install the latest version of CBB.
#
# Revision 2.7  1996/10/03 04:48:57  curt
# Fixed an inconsistency in &raw_date() in common.pl (with how it was
# called.)
#
# Version now is 0.67-beta-x
#
# Revision 2.6  1996/09/30 15:18:56  curt
# Added a "clean" target.
#
# Revision 2.5  1996/09/27 21:43:42  curt
# Added a text version of the manual to the Help menu.
#
# Revision 2.4  1996/08/29 14:23:46  curt
# Version 0.65 to 0.66
#
# Revision 2.3  1996/07/13 02:57:30  curt
# Version 0.65
# Packing Changes
# Documentation changes
# Changes to handle a value in both debit and credit fields.
#
# Revision 2.2  1996/03/03  00:14:02  curt
# Added section numbers to latex2html command
# Added install.pl back into tar command.  (No idea how it disappeared.)
#
# Revision 2.1  1996/02/27  05:35:28  curt
# Just stumbling around a bit with cvs ... :-(
#
# Revision 2.0  1996/02/27  04:41:43  curt
# Initial 2.0 revision.  (See "Log" files for old history.)
