cons-discuss
[Top][All Lists]
Advanced

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

Re: Dependencies between "build" and "dist"


From: Steven Knight
Subject: Re: Dependencies between "build" and "dist"
Date: Mon, 6 Aug 2001 14:16:16 -0500 (CDT)

> The issue for Arun is that pkgmk in solaris creates a directory as its
> final output. This is particularly irritating in the cons view of the world
> since we expect file targets for dependency checking. I had a conversation
> with Bob previously on this very same issue, and there was no good way to
> make cons (make .. cons) depend on a directory (or create a directory as its
> target.)

I've been gradually nudging the dependency code towards treating files
and directories exactly the same for dependency purposes, so we're
actually a lot closer today than we used to be to being able to make a
directory a target.  Maybe it's time to just work through and finish the
code for that effort.

For purposes of building a target, though, I've usefully worked around
this limitation by having the target of the Command be a dummy target
file that gets touched as the last command executed--for Arun's case,
something like:

        Command $env
            "$DIST/$PKG/.pkgmap_updated",
            "$prototype",
            ["pkgmk -o -d $dest_dir -f %1 -p $version -v $product_info " .
                "INSTALL_DIR=$BUILD_ROOT $PKG",
             "touch %>"];

This assumes that pkgmk will return a failed exit code, in which case
Cons will not execute the touch and not update the .consign signature
for the dummy target file.  If you really need the target dir listed,
you can tell the Command that it's "building" multiple targets:

            ["$DIST/$PKG/.pkgmap_updated",
                "$DIST/$PKG/pkgmap"]

I don't think that should make a difference, though.

        --SK




reply via email to

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