Re: dmodule/tool
"Lars Ivar Igesund" <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <019201c38025$665c0dc0$0200000a@mesmer> |
----- Original Message ----- From: "Bram Moolenaar" <[email protected]> > > It's your choice. But you should at least include your name. Here are my files with some minor changes, including my name for copyrights. Lars Ivar Igesund
dmodule.aap
(application/octet-stream, 2.9 KB) - not displayed
dmd.py
(text/plain, 1.6 KB)
# Part of the A-A-P recipe executive
# Copyright (c) 2002-2003 Lars Ivar Igesund and stichting NLnet Labs
# Permission to copy and use this file is specified in the file COPYING.
# If this file is missing you can find it here: http://www.a-a-p.org/COPYING
#
# This module sets up variables and actions for using the DMD compiler tools.
#
# Information on this tool / TODO:
#
# DMD and the default linker (optlink) don't accept objectfiles without
# the single .obj suffix. That is; some other suffix will break the
# build process, as will .<presuff>.obj 2003-09-13
from RecPython import *
import Global
from Action import action_add
from Dictlist import str2dictlist
from RecPos import RecPos
def exists():
"""
Return TRUE when the DMD toolchain can be found.
"""
return program_path("dmd")
def define_actions():
"""
Define the actions that DMD can accomplish.
"""
rd = Global.globals
rpstack = [ RecPos("compile_dmd d action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "compile_dmd object,dllobject,libobject d"),
":sys $DMD $DFLAGS $?INCLUDE -of$target -c $source")
rpstack = [ RecPos("build_dmd action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "build_dmd object,dllobject,libobject"),
":sys $DMD $DLINKFLAGS -of$target $source")
if not rd.get("DMD"):
rd["DMD"] = "dmd"
if not rd.get("DLINKFLAGS"):
rd["DLINKFLAGS"] = ""
def use_actions(scope):
"""
Setup variables so that the default actions use the DMD actions.
"""
scope["D_COMPILE_ACTION"] = "compile_dmd"
scope["D_BUILD_ACTION"] = "build_dmd"
# vim: set sw=4 et sts=4 tw=79 fo+=l: