@#
@#  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: msvc.empy 1020 2007-03-05 13:52:29Z vaclavslavik $
@#
@empy.include(os.path.join(RULESDIR, '_hdr_makefile.empy'))
@[if OPTIONS_FILE != '']!include <@OPTIONS_FILE>
@[end if]@
@[if OPTIONS_FILE == '']@
@empy.include(os.path.join(RULESDIR, 'watcom-opts.empy'))
@[end if]@

# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------

### Variables: ###

@[for v in make_vars]@
@utils.wrapLongLine('%s = ' % v.name, v.value, ' \\', variable=v.name)
@[end for]@

### Conditionally set variables: ###

@[for c in cond_vars]@
@[for v in c.values]@
!if @utils.condition2string(v.cond, utils.CONDSTR_MSVC)
@utils.wrapLongLine('%s = ' % c.name, v.value, ' \\', variable=c.name)
!endif
@[end for]@
@[end for]@

@[if BUILDDIR != '.']
all: @BUILDDIR
@BUILDDIR:
@\t-if not exist @BUILDDIR mkdir @BUILDDIR
@[end if]@

### Targets: ###
@[for t in targets]
@[if t.cond != None]@
!if @utils.condition2string(t.cond, utils.CONDSTR_MSVC)
@[end if]@
@t.__targetdir@t.__targetname: @t.__deps
@[for cmd in t.__command.splitlines()]@
@(cmd.strip()[:2]=='<<' ? '<<' : '\t'+cmd.strip())
@[end for]@
@[if t.cond != None]@
!endif
@[end if]@
@[end for]@

@[for f in fragments]
@f.content
@[end for]@
