From: Roland McGrath Date: Mon, 26 Apr 1993 20:05:02 +0000 (+0000) Subject: Formerly main.c.~80~ X-Git-Tag: 3.70.2~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fba3960a6a5d5c5967c590fc3485d6792511a09a;p=thirdparty%2Fmake.git Formerly main.c.~80~ --- diff --git a/main.c b/main.c index 3810a3de..0996ed66 100644 --- a/main.c +++ b/main.c @@ -1510,7 +1510,7 @@ define_makeflags (all, makefile) else { char *buf = (char *) alloca (100); - sprintf (buf, "%f", *(double *) cs->value_ptr); + sprintf (buf, "%g", *(double *) cs->value_ptr); ADD_FLAG (buf, strlen (buf)); } } @@ -1592,9 +1592,14 @@ define_makeflags (all, makefile) *p = '\0'; } - /* On Sun, the value of MFLAGS starts with a `-' but the - value of MAKEFLAGS lacks the `-'. Be compatible. */ - (void) define_variable ("MAKEFLAGS", 9, &flagstring[1], o_env, 0); + (void) define_variable ("MAKEFLAGS", 9, + /* On Sun, the value of MFLAGS starts with a `-' but + the value of MAKEFLAGS lacks the `-'. + Be compatible with this unless FLAGSTRING starts + with a long option `--foo', since removing the + first dash would result in the bogus `-foo'. */ + flagstring[1] == '-' ? flagstring : &flagstring[1], + o_env, 0); (void) define_variable ("MFLAGS", 6, flagstring, o_env, 0); }