> "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" > > sed -e s'/[^=][^=]*=$$/XFOO=/' I wonder if it would be better to just say 's/^STAGE1_CFLAGS=$$/XFOO=/' and avoid the wildcards completely.