Re: make: compilation firewall

"Michael" <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
On Feb 16, 12:45 pm, [email protected] (Paul Jarc) wrote:
> "Michael" <[email protected]> wrote:
> > out.h out.cc: in.our_format generate
> >      generate -i in.our_format -o tmp
> >      if (tmp.h != out.h OR tmp.cc != out.cc) {
> >          cp tmp.h out.h
> >          cp tmp.cc out.cc
> >      }
>
>         if { cmp tmp.h out.h && cmp tmp.cc out.cc; } > /dev/null 2>&1; \
>           then :; \
>           else cp tmp.h out.h && cp tmp.cc out.cc; \
>         fi
>
> You could also incorporate this conditional update into generate
> itself, to keep the Makefile simpler.
>
> paul

I actually tried something like this, but it recompiled everything
whenever generate changed (i.e., whenever the rule for out.h and
out.cc fired), not just when out.h and out.cc actually changed.  I
think I'm missing something to get the dependencies right.

Michael
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.