diff options
author | Roland McGrath <roland@redhat.com> | 1993-04-26 20:05:02 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1993-04-26 20:05:02 +0000 |
commit | fba3960a6a5d5c5967c590fc3485d6792511a09a (patch) | |
tree | a6ed5a8a62fb6d5d3c650e1154913d498872c129 /main.c | |
parent | 0986bb2c43147eb7da72234ca55be095bd68bb0e (diff) | |
download | gunmake-fba3960a6a5d5c5967c590fc3485d6792511a09a.tar.gz |
Formerly main.c.~80~
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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); } |