GCC vs. `make' on Solaris

Alexandre Oliva aoliva@redhat.com
Fri May 11 19:44:00 GMT 2001


On May 11, 2001, Mark Mitchell <mark@codesourcery.com> wrote:

> If we have:

>   x.o: s-foo
>     gcc -c x.c

>   s-foo: bar
>     bar > tmp-foo
>     move-if-change tmp-foo foo
>     touch s-foo

> Make will rebuild `x.o' whenever s-foo is out of date

But what we generally have is:

foo.o: foo.c
        gcc -c foo.c
foo.c: s-foo; @true
s-foo: bar
        bar > tmp-foo
        move-if-change tmp-foo foo.c
        touch s-foo

Even if foo.c is older than s-foo, GNU make is smart enough to figure
@true hasn't changed it, so it doesn't proceed to rebuilding foo.o.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc mailing list