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_update bug


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

> One fix is to touch all the files, unconditionally, with a one second
> wait between them.  That will take a while, but it will be correct.

Ugh.

> Using `make' would be another option, possibly via a little here
> document in gcc_update.

How about this (untested):

touch_files() {
    rm -f Makefile.$$
    echo 'all: \' > Makefile.$$
    files_and_dependencies | sed 's, .*,,;$p;$d;s,$, \\,' >> Makefile.$$
    files_and_dependencies | sed 's, ,: ,' >> Makefile.$$
    files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$
    echo ':' >> Makefile.$$
    echo '	echo Touching $@$(AGAIN)... 1>&2' >> Makefile.$$
    echo '	touch $@' >> Makefile.$$
    make all 2>&1 > /dev/null
    while make all AGAIN=" again" | grep . > /dev/null; do
      :
    done 2>&1
    rm -f Makefile.$$
}

-- 
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]