# vi: set ts=8 shiftwidth=8 noexpandtab:
#
# VNPForth - Compiled native Forth for IA32 Linux systems
# Copyright (C) 2005  Simon Baldwin (simon_baldwin@yahoo.com)
#
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#

SPLIT		= /usr/bin/split
AWK		= /usr/bin/awk

#
# Other general definitions
#
COMPILER_TESTS	= compiler_tests
SPLIT_PREFIX	= compile_test_
REPORT_FILE	= report.txt
WRAPPER		= compiler_wrapper

default: check

check:
	$(AWK) '$$1 != "\\" && length ($$0) > 0 { print $$0 }'		\
		$(COMPILER_TESTS)					\
		| $(SPLIT) -l 1 - "$(SPLIT_PREFIX)"
	rm -f core $(REPORT_FILE)
	$(SHELL) $(WRAPPER) $(REPORT_FILE) $(SPLIT_PREFIX)??

clean:
	rm -f $(REPORT_FILE) $(SPLIT_PREFIX)??
	rm -f core *.o *.p *.s

clobber: clean
distclean: clean
maintainer-clean: distclean
