[Omake] Re: Building in subdirectories and variant builds
revisited
Jesper Eskilson
jesper at eskilson.se
Tue Jun 19 01:51:37 PDT 2007
2007/6/19, David Kågedal <davidk at lysator.liu.se>:
> "Jesper Eskilson" <jesper at eskilson.se> writes:
>
> > The simplest way to solve this in terms of variant builds is simply to
> > always run the build command in the build directory; that way all the
> > outpus (including the "unknown" ones) are placed in the build
> > directory (where it rightly belongs), and not in the source directory
> > (where it would "contaminate" other variant builds). This is how
> > variant builds are implemented in the autotools world.
>
> As Jason said, not all programs behave that way. It only works for
> programs that put their output in the current directory, or where you
> can instruct them where to put it.
>
> > IMO, the impreciseness of the build rules are really orthogonal to the
> > issue of variant builds.
>
> Mostly orthogonal, at least. For cases where you don't specify the
> input files, the program might start looking in the current directory
> for inputs instead of in the real source directory. It sounded like
> ocamldep was broken in this way, but I have never used it.
>
It would be unfortunate if support for out-of-source builds was left
out just because it can't be implemented 100% correctly for 100% of
every tool out there. I think that would be the wrong approach.
Try to write a correct build rule for creating compiled HTML help
files on Windows (.chm). The compiler ("hhc") does not even have a
well-defined way to detect if it fails or not. "Return values? I
didn't think anyone used them!" *grmbl*
--
/Jesper
More information about the Omake
mailing list