[m-rev.] for review: configure.in: HAVE_ASM_LABELS; separate build dir

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 27 20:06:47 AEDT 2002


On 27-Feb-2002, Peter Moulder <pmoulder at csse.monash.edu.au> wrote:
> Two changes to configure.in:

In general, please post unrelated changes as separate diffs.

>   - The configure.in changes necessary to allow building in a
>     different directory from the source directory.
>     configure.in isn't the only file that would need changing: the
>     (m)makefiles would also need changing to use proper VPATH
>     etc. settings.  I haven't made those changes, as I don't know if
>     there's some reason why this hasn't already been done.

I spent two full days working on getting this to work,
and eventually gave up.  There were a lot of problems.
Setting VPATH is not the only thing that is needed,
there are also a lot of other changes required.
In the end I decided it just wasn't worth the effort.

I don't recall exactly what all the problems were.  But in general I
think there's a lot of language-specific support needed to make this
work, which has been done for C/C++/etc. but would require quite a bit
of effort to make it work for Mercury.

Your proposed change complicates the source code,
and would introduce a dependency on `cut' and `tr',
which might make porting more difficult.
Given this, and given that it doesn't solve all of the
problems with building in a different directory, I think
it is probably best not to commit this change unless and
until the other problems are fixed.

> (Is there any problem with using VPATH etc. in Mmakefiles?)

Mmake already uses VPATH, so you need to use VPATH += ... or VPATH =
$(MMAKE_VPATH):...  rather than just setting it.

Mmake also sets GPATH to VPATH, which is needed (or at least
was needed, with old versions of GNU Make) because of our use
of .*date* files.  I think setting GPATH like this causes
problems for srcdir != builddir.

>  test -f runtime/mercury_conf.h || {
> +	test -d runtime || mkdir runtime

This part is fine.

>   - Change $HAVE_ASM_LABELS test from 1 to yes.  However, as far as I
>     can see from a simple grep, all the HAVE_ASM_LABELS stuff could be
>     removed.

This change is fine (as a separate change).

I think you're right about the HAVE_ASM_LABELS stuff not being used.
So it would also be fine to just delete it.

> @@ -1636,7 +1636,9 @@
>  fi
>  HAVE_ASM_LABELS=$mercury_cv_asm_labels
>  AC_SUBST(HAVE_ASM_LABELS)
> -if test $HAVE_ASM_LABELS = 1; then
> +# [pjm]: The below used to test against 1 instead of yes; I'm guessing that that's a bug.

You're right.  This comment is not needed, and should be deleted.

> +# However, note that a grep -r HAVE_ASM_LABELS suggests that it isn't being used anyway.

Once you delete the previous comment, the "However," here isn't needed.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list