From: Roland McGrath Date: Thu, 18 Mar 1993 01:02:20 +0000 (+0000) Subject: Formerly main.c.~74~ X-Git-Tag: 3.70.2~348 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9b50f64362184425ae05431d04be3c0bba1fa48;p=platform%2Fupstream%2Fmake.git Formerly main.c.~74~ --- diff --git a/main.c b/main.c index 9df61e3..00733d9 100644 --- a/main.c +++ b/main.c @@ -1495,10 +1495,15 @@ define_makeflags (all, makefile) if (all) { struct stringlist *sl = *(struct stringlist **) cs->value_ptr; - register unsigned int i; if (sl != 0) - for (i = 0; i < sl->idx; ++i) - ADD_FLAG (sl->list[i], strlen (sl->list[i])); + { + /* Add the elements in reverse order, because + all the flags get reversed below; and the order + matters for some switches (like -I). */ + register unsigned int i = sl->idx; + while (i-- > 0) + ADD_FLAG (sl->list[i], strlen (sl->list[i])); + } } break; }