Re: Makefile.am changes



Tim Janik <timj@gtk.org> writes:
> On 24 Dec 1999, Raja R Harinath wrote:
> > Elliot Lee <sopwith@redhat.com> writes:
> > > On Fri, 24 Dec 1999, Tim Janik wrote:
> > > > you're changes to gtk+/gtk/Makefile.am didn't at all *fix* srcdir!=builtdir,
> > > > a lot of efford has been put into gtk+ 1.2.5 to actually get this going
> > > > reliably. instead you're changes would create new versions of the
> > > > built sources and will cause failing builds when the autogenerated sources
> > > > don't match the static sources anymore.
> > > 
> > > It didn't work before. If you don't believe me, or have wonderful ideas on
> > > making it work better, do a fresh cvs checkout and try it yourself.
> > 
> > Can you elaborate.  There are a couple of problems which Tim and I
> > discussed a few months ago.  My suspicion is that you have a 
> > 
> >   cp x... ../../gtk/gtktypebuiltins_eval.c
> >           ^^^^^^^^^
> >                   |_____
> > command that fails (this path is from builddir to srcdir, but
> > the 'cp' occurs in srcdir and hence the path is invalid).
> 
> i first want to reproduce this case (that you outlined a few months ago
> as well). i suspect you used a buggy version of make back then, since
> i wasn't able to reproduce this either with the then-stable version
> of make nor with it's most recent version.
> elliot, if this is actually your problem, *please* give me the exact make
> version you have and a build log, i'd really like to see that case triggered.

I'll try to reproduce the problem and send you a build log too.

> > However, your fix, while it works, doesn't feel clean.  You have a
> > temporary file created in srcdir and then copy it into builddir.
> > Secondly, the generated file doesn't need to be in builddir since it
> > is identical on all platforms -- it should go into srcdir.
> > 
> > My proposed fix is (pseudo patch)
> > 
> >   gtktypebuiltins_eval.c: @REBUILD@ ...
> >         cd $(srcdir) \
> >         && ... \
> >  -      && cp ... $@ \
> >  +      && cp ... gtktypebuiltins_eval.c \
> > 
> > and similarly for the other targets.
> 
> if we indeed had to fix this case because of the target being
> prefixed with the path from builtdir to srcdir, the patch should
> actually be:
> 
>    gtktypebuiltins_eval.c: @REBUILD@ ...
>          cd $(srcdir) \
>          && ... \
>   -      && cp ... $@ \
>   +      && cp ... $(@F) \

IIRC (from a recent discussion on the automake list) BSD make doesn't
support using $< in non-implicit rules.  I don't know if it supports
the $@ or $(@F) syntax in non-implicit rules either -- I would expect
not.  However, since this is essentially a maintainer rule (or invoked
when using a CVS checked-out tree), I guess you can assume a GNU make
is in use.

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



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