cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: building an obj file multiple places


From: Gary Oberbrunner
Subject: RE: building an obj file multiple places
Date: Thu, 5 Oct 2000 11:59:53 -0400 (EDT)

>>>>> "KT" == Kolarik, Tony <address@hidden> writes:

  KT> But, could someone explain why its undesirable to build the same
  KT> source file two ways as long as it builds separate objs?

It's fine to build two separate objs from the same source; Link/Build
does this all the time (build a debug and final version, for
instance).  It's harder to do it into the same dir, because there's no
variant of Objects (or Program) which allows you to set the object
name independently from the source name.  Here's a quick example
Construct showing two objs built from the same source two different
ways, just using Command:

  $e1 = new cons(PRETEXT=>"// this is e1");
  $e2 = new cons(PRETEXT=>"// this is e2");

  Command $e1 "foo1", "foo.c", q(echo %PRETEXT > %>
    cat %1 >> %>);
  Command $e2 "foo2", "foo.c", q(echo %PRETEXT > %>
    echo "// this is the second command" >> %>
    cat %1 >> %>);

Create a foo.c and you'll see it builds foo1 and foo2 from the same
source, foo.c, with two different commands.

-- 
. . . . . . . . . . . . . . . . . . . . . . . . .
Gary Oberbrunner                address@hidden
GenArts, Inc.                   Tel: 617-492-2888
8 Clinton Street                Fax: 617-492-2852
Cambridge, MA 02139 USA         http://web.genarts.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]