# $Id: languages.in 16842 2007-01-30 16:23:16Z fperrad $

# setup of commands
@make_set_make@
PERL      = @perl@
MAKE      = @make_c@
RM_F      = @rm_f@

# add new languages here
# remove obsolete languages here
LANGUAGES = \
    APL \
    BASIC \
    HQ9plus \
    PIR \
    WMLScript \
    Zcode \
    abc \
    befunge \
    bf \
    c99 \
    cardinal \
    cola \
    dotnet \
    ecmascript \
    forth \
    jako \
    lisp \
    lua \
    m4 \
    ook \
    parrot_compiler \
    perl5 \
    perl6 \
    pheme \
    punie \
    regex \
    scheme \
    tap \
    tcl \
    urm

# the default target
all: $(LANGUAGES)

# 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:          Make a lot of language implementations."
	@echo "                This is the default."
	@echo "  test:         Unified test suite for a lot of languages."
	@echo ""
	@echo "  clean:        Clean up a lot of languages."
	@echo ""
	@echo "  help:         Print this help message."
	@echo ""
	@echo "  smoke:        Run the test suite and send smoke.html to "
	@echo "                http://smoke.parrotcode.org/"
	@echo ""
	@echo "  smoke-clean:  clean up smoke.html"
	@echo ""
	@echo ""
	@echo "Following languages are available:"
	@echo "  $(LANGUAGES)"
	@echo "A particular language <lang> can be built, tested and cleand up"
	@echo "  make <lang>"
	@echo "  make <lang>.test"
	@echo "  make <lang>.clean"
	@echo "For the status of individual languages see LANGUAGES.STATUS.pod"
	@echo ""

test:   all
	$(PERL) t/harness

smoke:  all
	$(PERL) t/harness --html
	$(PERL) ../tools/util/smokeserv-client.pl languages_smoke.html

smoke-clean :
	$(RM_F) languages_smoke.html

clean: \
    APL.clean \
    BASIC.clean \
    HQ9plus.clean \
    PIR.clean \
    WMLScript.clean \
    Zcode.clean \
    abc.clean \
    befunge.clean \
    bf.clean \
    c99.clean \
    cardinal.clean \
    cola.clean \
    dotnet.clean \
    ecmascript.clean \
    forth.clean \
    jako.clean \
    lisp.clean \
    lua.clean \
    m4.clean \
    ook.clean \
    parrot_compiler.clean \
    perl5.clean \
    perl6.clean \
    pheme.clean \
    punie.clean \
    regex.clean \
    scheme.clean \
    tap.clean \
    tcl.clean \
    urm.clean \
    smoke-clean


#
# Language specific targets
#

# The *.dummy targets are a replacement for the target .PHONY in 'GNU make'

APL : APL.dummy
APL.dummy:
	- $(MAKE) APL
APL.test:
	- $(MAKE) APL test
APL.clean:
	- $(MAKE) APL clean

BASIC : BASIC.dummy
BASIC.dummy:
# don't know how to build BASIC
BASIC.test:
# Don't know how to test BASIC
BASIC.clean:
# Don't know how to clean BASIC

PIR: PIR.dummy
PIR.dummy:
	- $(MAKE) PIR
PIR.test:
	- $(MAKE) PIR test
PIR.clean:
	- $(MAKE) PIR clean

WMLScript: WMLScript.dummy
WMLScript.dummy:
	- $(MAKE) WMLScript
WMLScript.test:
	- $(MAKE) WMLScript test
WMLScript.clean:
	- $(MAKE) WMLScript clean

Zcode : Zcode.dummy
Zcode.dummy:
# Do nothing. make Zcode requires an Inform compiler
Zcode.test:
	- $(MAKE) Zcode test
Zcode.clean:
	- $(MAKE) Zcode clean

abc : abc.dummy
abc.dummy:
	- $(MAKE) abc
abc.test:
	- $(MAKE) abc test
abc.clean:
	- $(MAKE) abc clean

befunge : befunge.dummy
befunge.dummy:
	- $(MAKE) befunge
befunge.test:
	- $(MAKE) befunge test
befunge.clean:
	- $(MAKE) befunge clean

bf : bf.dummy
bf.dummy:
	- $(MAKE) bf
bf.test:
	- $(MAKE) bf test
bf.clean:
	- $(MAKE) bf clean

c99 : c99.dummy
c99.dummy:
	- $(MAKE) c99
c99.test:
	- $(MAKE) c99 test
c99.clean:
	- $(MAKE) c99 clean

cardinal : cardinal.dummy
cardinal.dummy:
	- $(MAKE) cardinal
cardinal.test:
	- $(MAKE) cardinal test
cardinal.clean:
	- $(MAKE) cardinal clean

cola : cola.dummy
cola.dummy:
	- $(MAKE) cola
cola.test:
	- $(MAKE) cola test
cola.clean:
# don't clean cola, as files in MANIFEST are removed

dotnet : dotnet.dummy
dotnet.dummy:
	cd dotnet && $(PERL) Configure.pl
	- $(MAKE) dotnet
dotnet.test:
	- $(MAKE) dotnet test
dotnet.clean:
	- $(MAKE) dotnet clean

ecmascript : ecmascript.dummy
ecmascript.dummy:
	- $(MAKE) ecmascript
ecmascript.test:
	- $(MAKE) ecmascript test
ecmascript.clean:
	- $(MAKE) ecmascript clean

forth : forth.dummy
forth.dummy:
	- $(MAKE) forth
forth.test:
	- $(MAKE) forth test
forth.clean:
	- $(MAKE) forth clean

HQ9plus: HQ9plus.dummy
HQ9plus.dummy:
	- $(MAKE) HQ9plus
HQ9plus.test:
	- $(MAKE) HQ9plus test
HQ9plus.clean:
	- $(MAKE) HQ9plus clean

jako: jako.dummy
jako.dummy:
	- $(MAKE) jako
jako.test:
	- $(MAKE) jako test
jako.clean:
	- $(MAKE) jako clean

lisp: lisp.dummy
lisp.dummy:
	- $(MAKE) lisp
lisp.test:
	- $(MAKE) lisp test
lisp.clean:
	- $(MAKE) lisp clean

lua: lua.dummy
lua.dummy:
	- $(MAKE) lua
lua.test:
	- $(MAKE) lua test
lua.clean:
	- $(MAKE) lua clean

m4: m4.dummy
m4.dummy:
	- $(MAKE) m4
m4.test:
	- $(MAKE) m4 test
m4.clean:
	- $(MAKE) m4 clean

ook : ook.dummy
ook.dummy:
	- $(MAKE) ook
ook.test:
	- $(MAKE) ook test
ook.clean:
	- $(MAKE) ook clean

parrot_compiler: parrot_compiler.dummy
parrot_compiler.dummy:
	- $(MAKE) parrot_compiler
parrot_compiler.test:
	- $(MAKE) parrot_compiler test
parrot_compiler.clean:
	- $(MAKE) parrot_compiler clean

perl5 : perl5.dummy
perl5.dummy:
	- $(MAKE) perl5
perl5.test:
	- $(MAKE) perl5 test
perl5.clean:
	- $(MAKE) perl5 clean

perl6 : perl6.dummy
perl6.dummy:
	- $(MAKE) perl6
perl6.test:
	- $(MAKE) perl6 test
perl6.clean:
	- $(MAKE) perl6 clean

pheme : pheme.dummy
pheme.dummy:
	- $(MAKE) pheme
pheme.test:
	- $(MAKE) pheme test
pheme.clean:
	- $(MAKE) pheme clean

punie : punie.dummy
punie.dummy:
	- $(MAKE) punie
punie.test:
	- $(MAKE) punie test
punie.clean:
	- $(MAKE) punie clean

regex: regex.dummy
regex.dummy:
	- $(MAKE) regex
regex.test :
	- $(MAKE) regex test
regex.clean :
	- $(MAKE) regex clean

scheme: scheme.dummy
scheme.dummy:
	@echo "SKIPPED: scheme: (nothing to make, but should not default to make test)"
scheme.test :
	- $(MAKE) scheme test
scheme.clean :
	- $(MAKE) scheme clean

tap: tap.dummy
tap.dummy:
	- $(MAKE) tap
tap.test:
	$(MAKE) tap test
tap.clean:
	$(MAKE) tap clean

tcl: tcl.dummy
tcl.dummy:
	- $(MAKE) tcl
tcl.test:
	- $(MAKE) tcl test
tcl.clean:
	- $(MAKE) tcl clean

urm: urm.dummy
urm.dummy:
	- $(MAKE) urm
urm.test:
	- $(MAKE) urm test
urm.clean:
	- $(MAKE) urm clean
