#!/usr/bin/env /usr/bin/tclsh8.6
# -*- tcl -*-
# # ## ### ##### ######## ############# #####################
## Kettle application

# @@ Meta Begin
# Application kettle 1
# Meta author       {Andreas Kupries}
# Meta build::by    abuild
# Meta build::date  2024-02-20
# Meta category     Builder/Developer support
# Meta description  Kettle is a system to make building Tcl packages quick
# Meta description  and easy. More importantly, possibly, to make writing
# Meta description  the build system for Tcl packages easy. As such kettle
# Meta description  is several things: (1) A DSL helping you to write build
# Meta description  systems for your packages. (2) A package implementing
# Meta description  this DSL. (3) An application which can serve as the
# Meta description  interpreter for a build file containing commands in the
# Meta description  above DSL.
# Meta location     https://core.tcl.tk/akupries/kettle
# Meta platform     tcl
# Meta require      {Tcl 8.5-}
# Meta require      kettle
# Meta subject      {build support} critcl teapot {meta data} doctools
# Meta subject      diagram
# Meta summary      Build support application.
# Meta vc::revision unknown
# Meta vc::system   unknown
# @@ Meta End

apply {{self} {
    set selfdir [file dirname $self]
    if {[file exists $selfdir/kettle.tcl]} {
	# Look for a local copy first, for when we install ourselves.
	source $selfdir/kettle.tcl
    } else {
	# use the installed core.
	package require kettle
    }
    kettle::option::set @kettle $self
    kettle::Application
}} [file dirname [file normalize [info script]/__]]
