Expansion of $source (bcc static lib support)
"F. Schoenahl" <[email protected]> Tue, 11 May 2004 09:41:36 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <20040511094136.025cdad4@dmnu_mn34.hcuge.ch> |
Dear all, dear Bram,
I have posted some times ago for a bcc support of static library build.
I have had now some time to try to implement and use it, I face one
problem - as the building path is build-nt/..., the commandline refuses
it so, that afaik I have to write the tlib.exe command like that :
tlib lib\mylib.lib, "build-nt\...\file1.obj", "build-nt\...\file2.obj"
to have the right expansion, I have the following statement :
":sys $AR $target, $source"
and I transform it into
":sys $AR $target ,\"$*source\" "
to get it into quotes. It doesn't work and I get something like
tlib lib\mylib.lib ", build-nt\...\file1.obj" ", build-nt\...\file2.obj"
I have tried some other combinations without success. Is it possible?
Here is my (very experimental tools/bcc.py file).
Thanks,
fred
# Part of the A-A-P recipe executive: Setup using BCC
# ---------------------------------8<-----------------------------------
# Copyright (c) 2002-2003 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 Borland C++
# compiler tools.
#
from RecPython import *
import Global
from Action import action_add
from Dictlist import str2dictlist
from RecPos import RecPos
def exists():
"""
Return TRUE when the BCC toolchain and the associated linker can be
found.
"""
return program_path("bcc32") and program_path("tlib")
def define_actions():
"""
Define the actions that BCC can accomplish.
"""
rd = Global.globals
# TODO: use DEBUG and OPTIMIZE
rpstack = [ RecPos ("compile_bcc action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "compile_bcc object
c"),
"defi = $?DEFINE\n"
"incl = $?INCLUDE\n"
":sys $BCC $CPPFLAGS $defi $incl $CFLAGS -c -WE -o$target
$source")
rpstack = [ RecPos ("compile_bcc action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "compile_bcc libobject
c"),
"defi = $?DEFINE\n"
"incl = $?INCLUDE\n"
":sys $BCC $CPPFLAGS $defi $incl $CFLAGS -c -WE -o$target
$source")
if not rd.get("BCC"):
rd["BCC"] = "bcc32"
rpstack = [ RecPos("build_bcc action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "build_bcc object"),
":sys $BCCLINK $LINKFLAGS $source c0x32.obj, $target, ,
import32.lib cw32.lib")
if not rd.get("BCCLINK"):
rd["BCCLINK"] = "ilink32"
if not rd.get("LINKFLAGS"):
rd["LINKFLAGS"] = "-q"
rpstack = [ RecPos("buildlib_bcc action") ]
action_add(rpstack, rd, str2dictlist(rpstack, "buildlib_bcc
libobject"),
":sys $AR $target ,\"$*source\" ")
if not rd.get("AR"):
rd["AR"] = "tlib"
def use_actions(scope):
"""
Setup variables so that the default actions use the BCC actions.
"""
scope["C_COMPILE_ACTION"] = "compile_bcc"
scope["CXX_COMPILE_ACTION"] = "compile_bcc"
scope["C_BUILD_ACTION"] = "build_bcc"
scope["CXX_BUILD_ACTION"] = "build_bcc"
scope["CXX_BUILD_ACTION"] = "build_bcc"
scope["BUILDLIB_ACTION"] = "buildlib_bcc"
# vim: set sw=4 et sts=4 tw=79 fo+=l:
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3