On July 15, 2006 09:55 am, Randy McMurchy wrote: > Bruce Dubbs wrote these words on 07/15/06 08:44 CST: > > Robert Connolly wrote: > >> sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' > >> > >> sed 's/^XCFLAGS =/& -fomit-frame-pointer/' > > > > I'd be interested in other opinions. > I fail to see what Robert's sed does. To me, it either:
They match both exactly the same line. If this is the original: XCFLAGS = -g -O2 sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' will change it into: XCFLAGS = -g -O2 -fomit-frame-pointer sed 's/^XCFLAGS =/& -fomit-frame-pointer/' will change it into: XCFLAGS = -fomit-frame-pointer -g -O2 to XCFLAGS it doesn't make a real difference, but lets say this is our original line: CRTSTUFF_CFLAGS = $(GCC_CFLAGS) $(INCLUDES) \ $(MULTILIB_CFLAGS) -g0 the first sed will append to the end of the line, after the \, and the Makefile will be broken. The second sed will add right after the = and will not break the Makefile. robert
pgp2CNgO4EBQ1.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page