Re: Build action

Adriaan de Groot <adridg-FlD2LfDziEhmR6Xm/[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
On Thu, 4 Sep 2003, Lars Ivar Igesund wrote:
> The default BUILD_ACTION creates similar problems like
> the ones created by COMPILE_ACTION. It is not necessarily
> the object files themselves that cause trouble since they
> might be compatible with others (gcc is used for linking on
> linux), but the D compiler/linker needs to link in the D runtime
> which means that I need to change the BUILD_ACTION in
> some way.

In this case you can use {filetype} to good effect.


SOURCES=foo.d bar.d
# Just to be on the safe side
:attr { filetype=d } $SOURCES
# Make the right object files from them
:attr { var_OBJSUF=.doh } $SOURCES

:program dProg { filetype=dexe } : foo.d bar.d

(Well, I'm going to assume that you want to use :program eventually). This
uses whatever compile actions you have defined for .d files to produce
.doh files. Then it uses :action build to link the program, but now dProg
has a filetype of "dexe", so you can define a filetype specific build for
it:

:action build dexe default
	:sys dlink -o $target $source



-- 
 Adriaan de Groot    adridg-FlD2LfDziEhmR6Xm/[email protected]     Kamer A6020     024-3652272
GPG Key Fingerprint 934E 31AA 80A7 723F 54F9  50ED 76AC EE01 FEA2 A3FE
               http://www.cs.kun.nl/~adridg/research/



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.