# $Id: /mirror/trunk/languages/lisp/config/makefiles/root.in 28688 2008-06-23T00:33:41.905243Z coke  $

# Setup some commands
RM_F          = @rm_f@
PERL          = @perl@
PARROT        = ../../parrot@exe@
BUILD_DIR     = @build_dir@
RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
#CONDITIONED_LINE(darwin):
#CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@

all: build

# This is a listing of all targets, that are meant to be called by users
help :
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  all:               'lisp.pbc'"
	@echo "                     This is the default."
	@echo ""
	@echo "  help:              Print this help message."
	@echo ""
	@echo "  test:              Run the test suite."
	@echo ""
	@echo "  clean:             Cleaning up."
	@echo ""

# regenerate the Makefile
Makefile: config/makefiles/root.in
	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=lisp

test: build
	$(PERL) -Ilib -I../../lib t/harness

build: lisp.pir
	$(PARROT) -o lisp.pbc lisp.pir

clean: testclean
	$(RM_F) core "*.pbc" "*~"

testclean:
	$(RM_F) t/*.out t/*.l

realclean: clean
	$(RM_F) Makefile
