This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC vs. `make' on Solaris


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]