<?xml version="1.0" ?>
<!--

  This file is part of Bakefile (http://www.bakefile.org)

  Copyright (C) 2003-2007 Vaclav Slavik

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to
  deal in the Software without restriction, including without limitation the
  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  sell copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  IN THE SOFTWARE.

  $Id: dirs.bkl 1151 2008-01-06 10:41:27Z vaclavslavik $

-->
<makefile>

    <!-- Source dir: -->

    <!-- this tag must be used for changing SRCDIR value -->
    <define-global-tag name="set-srcdir">
        <if cond="not isconst(value)">
            <error>set-srcdir argument must be constant expression</error>
        </if>

        <set var="SRCDIR_RAW">$(value)</set>
        <set var="SRCDIR">$(value)</set>
        
        <if cond="FORMAT=='autoconf'">
            <!-- autoconf is an exception, it has to use $(srcdir) to support
                 out-of-tree compilation: -->
            <set var="SRCDIR">
                <if cond="SRCDIR_RAW=='.'">$(srcdir)</if>
                <if cond="SRCDIR_RAW!='.'">$(srcdir)/$(SRCDIR_RAW)</if>
            </set>
        </if>
    </define-global-tag>

    <!-- set the default value of SRCDIR; note that we don't use <set-srcdir>
         here even though it would be nicer, because its implementation
         requires $(srcdir) variable for autoconf and that's not defined yet at
         this point:
      -->
    <!-- equivalent of <set-srcdir>.</set-srcdir> : -->
    <set var="SRCDIR_RAW">.</set>
    <set var="SRCDIR">.</set> <!-- autoconf format overwrites this in autoconf.bkl -->



    <!-- Build dir: -->
    
    <set var="BUILDDIR">.</set> <!-- to be overwritten by the backend -->


    <!-- Install dirs: -->
    <set var="PREFIX">/usr/local</set>
    <set var="BINDIR" eval="0">$(PREFIX)/bin</set>
    <set var="LIBDIR" eval="0">$(PREFIX)/lib</set>
    <set var="DLLDIR" eval="0">$(LIBDIR)</set>
    <set var="INCLUDEDIR" eval="0">$(PREFIX)/include</set>
    <set var="DATADIR" eval="0">$(PREFIX)/share</set>

    <!-- override directory for 'make install' - files installed into directory
         FOO are copied into $(DESTDIR)FOO instead of into FOO. This makes
         compilation of RPM etc. packages a bit easier. -->
    <set var="DESTDIR"></set>

</makefile>
