This is the mail archive of the gcc-patches@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 16, 2001, Loren James Rittle <rittle@latour.rsch.comm.mot.com> wrote:

>>>> +    echo '	@for f in $?; do test ! -f $$f && exit 0; done; \' >> Makefile.$$

>> I'd generally prefer to rewrite this command as:

>> for f in $?; do test -f $$f || exit 0; done

>> so that all compound commands succeed.

>> If nobody opposes, I'll make this change.

> The change is fine by me.  Feel free to undo the 'true;' I stuck in
> there.

Here's what I'm checking in.

Index: contrib/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* gcc_update (touch_files): Use simpler, yet as portable, syntax.

Index: contrib/gcc_update
===================================================================
RCS file: /cvs/gcc/egcs/contrib/gcc_update,v
retrieving revision 1.23
diff -u -p -r1.23 gcc_update
--- contrib/gcc_update 2001/05/15 04:58:07 1.23
+++ contrib/gcc_update 2001/05/17 22:47:03
@@ -108,7 +108,7 @@ touch_files () {
     files_and_dependencies | sed 's, ,: ,' >> Makefile.$$
     files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$
     echo ':' >> Makefile.$$
-    echo '	@for f in $?; do test ! -f $$f && exit 0; true; done; \' >> Makefile.$$
+    echo '	@for f in $?; do test -f $$f || exit 0; done; \' >> Makefile.$$
     echo '	echo Touching $@...; \' >> Makefile.$$
     echo '	echo Touching $@... 1>&2; \' >> Makefile.$$
     echo '	touch $@' >> 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]