#
# $Id: Makefile,v 1.6 2005/04/13 23:52:42 geoff Exp $
#
# Copyright 1993, 2001, Geoff Kuenning, Claremont, CA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All modifications to the source code must be clearly marked as
#    such.  Binary redistributions based on modified source code
#    must be clearly marked as modified versions in the documentation
#    and/or other materials provided with the distribution.
# 4. The code that causes the 'ispell -v' command to display a prominent
#    link to the official ispell Web site may not be removed.
# 5. The name of Geoff Kuenning may not be used to endorse or promote
#    products derived from this software without specific prior
#    written permission.
#
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Log: Makefile,v $
# Revision 1.6  2005/04/13 23:52:42  geoff
# Update the license.  Integrate Ed Avis's changes.
#
# Revision 1.5.1.1  2002/06/21 00:35:55  geoff
# Edward Avis's changes
#
# Revision 1.3  2001/11/07 18:59:26  epa98
# Rewrite of fix8bit.c prompted by SuSE's ispell-3.2.06-languages.patch.
# I wanted to make sure the patch wouldn't break anything, so I wrote a
# test suite, but doing that I found lots of other things that were
# wrong, so I started trying to fix those...
#
# Makefile: fixed dependencies for fix8bit, added 'test' target.  The
# test suite checks fix8bit's pushback routines, runs test_fix8bit (see
# below) and checks a couple of additional properties: fix8bit -8 |
# fix8bit -7 == cat; fix8bit -7 | fix8bit -7 == fix8bit -7.
#
# fix8bit.c: rewrote to8bit() to better handle cases when the
# backslashed sequence turns out to be illegal.  The initial backslash
# is printed and the remaining characters are pushed back to be read
# again.  This means that for example \\x41 will print as \A, in the
# same way that !\x41 produces !A.  It also handles escape sequences
# cut off by EOF properly (again they are printed unchanged).  This uses
# a mini pushback library which has a test suite if you give main() the
# argument --test-pushback.  Also fixed the original problem with hex
# sequences being miscomputed, which SuSE wrote the patch for.  Added a
# warning if the input already contains 8-bit chars (that would stop
# -8 | -7 being identity).
#
# test_fix8bit: new file.  This is a Perl script to run fix8bit -7 and
# fix8bit -8 on every input file in test_data/ and check the results
# against the expected results also in that directory.
#
# test_data/: new directory.  Contains test cases, some written by hand
# and some randomly generated by rand_gen.  rand_gen tries to make 'well
# behaved' input that doesn't muck up fix8bit -8 | fix8bit -7 or other
# commands - but there are three flags you can use to tell it not to.
# The random test cases have not been checked by hand, so they should be
# used in addition to human-written ones.
#
# Revision 1.2  2001/10/05 14:22:30  epa98
# Imported 3.2.06.epa1 release.  This was previously developed using
# sporadic RCS for certain files, but I'm not really bothered about
# rolling back beyond this release.
#
# Revision 1.5  2001/07/25 21:51:47  geoff
# *** empty log message ***
#
# Revision 1.4  2001/07/23 20:43:38  geoff
# *** empty log message ***
#
# Revision 1.3  1994/01/25 07:12:25  geoff
# Get rid of all old RCS log lines in preparation for the 3.1 release.
#
#

SHELL = sh
MAKE = make

CONFIG		=	../config.sh
FIX8BIT		=	../fix8bit.exe

all:	fix8bit.exe

install:

fix8bit.exe:	$(CONFIG) fix8bit.c
	@. $(CONFIG); \
	  set -x; \
	  $$CC $$CFLAGS -DWIN32=1 -Fefix8bit.exe fix8bit.c

# Note that individual languages are cleaned from the top-level Makefile.
clean:
	rm -f core *.log fix8bit.exe
