# Copyright (C) 2005-2007, The Perl Foundation.
# $Id: /mirror/trunk/languages/scheme/config/makefiles/root.in 28688 2008-06-23T00:33:41.905243Z coke  $

# Makefile for languages/scheme

# Set up commands
PERL          = @perl@
RM_F          = @rm_f@
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@

# Set up directories
BUILD_DIR     = @build_dir@

# The default target
default: build

help :
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  build:             Just check whether 'schemec' compiles"
	@echo "                     This is the default."
	@echo ""
	@echo "  test:              run the test suite,"
	@echo ""
	@echo "  clean:             clean up temporary files"
	@echo ""
	@echo "  realclean:         clean up generated files"
	@echo ""
	@echo "  help:              print this help message"

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

# Compilation:
build:
	$(PERL) -c schemec

# cleaning up

clean:
	$(RM_F) foo.pasm foo.pbc \
  "t/*/*.pasm" \
  "t/*/*.pir" \
  "t/*/*.pbc" \
  "t/*/*.scheme" \
  "t/*/*.out"

realclean: clean
	$(RM_F) Makefile

over:
	@$(MAKE) clean
	@$(MAKE) all

# testing
test:
	cd .. && $(PERL) scheme/t/harness
