cons-discuss
[Top][All Lists]
Advanced

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

RE: Fwd: Suggestion about derived files and commands


From: Gary Oberbrunner
Subject: RE: Fwd: Suggestion about derived files and commands
Date: Wed, 2 May 2001 12:21:34 -0400

Your first way to solve the problem could just be done in regular perl,
right?

  foreach $f (@srcs) {
    get_from_sccs($f) if (! -f $f);
  }

I do stuff like this all the time.  You might like to have some of cons's
environment-substitution and filename stuff available though, so "#filename"
and relative paths etc. would work like they do in rules.  I've sometimes
wondered if that couldn't be pulled out and documented so this kind of stuff
would be easier.  Maybe something like $f_real = $ENV->subst($f)?

. . . . . . . . . . . . . . . . . . . . . . . . .
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



 > -----Original Message-----
 > From: Wayne Scott
 >
 > I can think of two ways to solve this problem.
 >
 >   * Add some sort of "weak" rules that will build a file if it doesn't
 >     exist, but if it does exist it treat it like another source file.
 >
 >   * Have the ability to overload CONS's "file exists" primitive.  So
 >     that when cons looks for a file in a directory if it is not found
 >     we can quickly query the revision system.
 >




reply via email to

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