]> git.ipfire.org Git - thirdparty/make.git/commitdiff
[SV 49114] Remove support for the NO_FLOAT compile flag.
authorPaul Smith <psmith@gnu.org>
Sun, 18 Dec 2016 17:43:18 +0000 (12:43 -0500)
committerPaul Smith <psmith@gnu.org>
Mon, 26 Dec 2016 14:01:58 +0000 (09:01 -0500)
* makeint.h (max_load_average): Always a double.
* main.c (max_load_average, default_load_average): Always doubles.
(switches): -l option is a "floating" format.
(decode_switches, define_makeflags): Support "floating" format.
* remake.c (f_mtime): Show time skew as double.
* rule.c (print_rule_data_base): Show percentages as double.
* Makefile.ami, README.DOS.template, SMakefile.template: Remove
references to NO_FLOAT.
* SCOPTIONS, glob/SCOPTIONS: Remove NO_FLOAT settings.

Makefile.ami
README.DOS.template
SCOPTIONS
SMakefile.template
glob/SCOPTIONS
hash.c
main.c
makeint.h
remake.c
rule.c

index 39a9788e94303c001483b691eab2deccac2becfe..bc4ebf452c8d76728a1f75eabc7fae113877d9d1 100644 (file)
@@ -32,7 +32,6 @@ LDFLAGS =
 
 # Define these for your system as follows:
 #      -DNO_ARCHIVES           To disable 'ar' archive support.
-#      -DNO_FLOAT              To avoid using floating-point numbers.
 #      -DENUM_BITFIELDS        If the compiler isn't GCC but groks enum foo:2.
 #                              Some compilers apparently accept this
 #                              without complaint but produce losing code,
index bc31adb9097e748f5a62e4a0d6a99f9aebbe048a..f9a6d92f6437c858c8bc16a18875548af07ebbfb 100644 (file)
@@ -73,13 +73,7 @@ To build from sources:
       should be available from the usual DJGPP sites) and rerun
       configure.bat.
 
-   4. If you will need to run Make on machines without an FPU, you
-      might consider building a version of Make which doesn't issue
-      floating-point instructions (they don't help much on MSDOS
-      anyway).  To this end, edit the Makefile created by
-      configure.bat and add -DNO_FLOAT to the value of CPPFLAGS.
-
-   5. Invoke Make.
+   4. Invoke Make.
 
       If you are building from outside of the source directory, you
       need to tell Make where the sources are, like this:
@@ -90,7 +84,7 @@ To build from sources:
       use a full, not relative, name of the source directory here, or
       else Make might fail.
 
-   6. After Make finishes, if you have a Unix-style shell installed,
+   5. After Make finishes, if you have a Unix-style shell installed,
       you can use the 'install' target to install the package.  You
       will also need GNU Fileutils and GNU Sed for this (they should
       be available from the DJGPP sites).
@@ -120,10 +114,10 @@ To build from sources:
       (If your Info directory is other than C:\DJGPP\INFO, change this
       command accordingly.)
 
-   7. The 'clean' targets also require Unix-style shell, and GNU Sed
+   6. The 'clean' targets also require Unix-style shell, and GNU Sed
       and 'rm' programs (the latter from Fileutils).
 
-   8. To run the test suite, type "make check".  This requires a Unix
+   7. To run the test suite, type "make check".  This requires a Unix
       shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
       and Sh-utils.
 
index f89daae12f7737b4f3fe6414d8a224874fc66907..3d69fb42e3d7541b9f2b25904cbaf9ec0c58583b 100644 (file)
--- a/SCOPTIONS
+++ b/SCOPTIONS
@@ -6,7 +6,6 @@ OPTIMIZERALIAS
 DEFINE INCLUDEDIR="include:"
 DEFINE LIBDIR="lib:"
 DEFINE NO_ALLOCA
-DEFINE NO_FLOAT
 DEFINE NO_ARCHIVES
 IGNORE=161
 IGNORE=100
index 1b60d85788b865f290ab5fdbacd3bb311f85c6e5..ce2fb63ce93364094988f2ba4a5dac9d79cd913f 100644 (file)
@@ -38,7 +38,6 @@ LDFLAGS =
 
 # Define these for your system as follows:
 #      -DNO_ARCHIVES           To disable 'ar' archive support.
-#      -DNO_FLOAT              To avoid using floating-point numbers.
 #      -DENUM_BITFIELDS        If the compiler isn't GCC but groks enum foo:2.
 #                              Some compilers apparently accept this
 #                              without complaint but produce losing code,
index f89daae12f7737b4f3fe6414d8a224874fc66907..3d69fb42e3d7541b9f2b25904cbaf9ec0c58583b 100644 (file)
@@ -6,7 +6,6 @@ OPTIMIZERALIAS
 DEFINE INCLUDEDIR="include:"
 DEFINE LIBDIR="lib:"
 DEFINE NO_ALLOCA
-DEFINE NO_FLOAT
 DEFINE NO_ARCHIVES
 IGNORE=161
 IGNORE=100
diff --git a/hash.c b/hash.c
index ed4c876636395e67ff1c56a7211e5bf4bfdc80eb..e1688870232fd766a0f02204a6ad0ac88ad9f414 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -276,7 +276,6 @@ hash_rehash (struct hash_table *ht)
 void
 hash_print_stats (struct hash_table *ht, FILE *out_FILE)
 {
-  /* GKM FIXME: honor NO_FLOAT */
   fprintf (out_FILE, _("Load=%lu/%lu=%.0f%%, "), ht->ht_fill, ht->ht_size,
           100.0 * (double) ht->ht_fill / (double) ht->ht_size);
   fprintf (out_FILE, _("Rehash=%u, "), ht->ht_rehashes);
diff --git a/main.c b/main.c
index e7ad8caa45d33e3674f5e6c9ffe7cbd1c8aea8e9..346cc0d2fd4fde7e2f86fd113dcc6b0aebbd4f6d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -277,13 +277,8 @@ char *sync_mutex = NULL;
    Negative values mean unlimited, while zero means limit to
    zero load (which could be useful to start infinite jobs remotely
    but one at a time locally).  */
-#ifndef NO_FLOAT
 double max_load_average = -1.0;
 double default_load_average = -1.0;
-#else
-int max_load_average = -1;
-int default_load_average = -1;
-#endif
 
 /* List of directories given with -C switches.  */
 
@@ -453,13 +448,8 @@ static const struct command_switch switches[] =
       "include-dir" },
     { 'j', positive_int, &arg_job_slots, 1, 1, 0, &inf_jobs, &default_job_slots,
       "jobs" },
-#ifndef NO_FLOAT
     { 'l', floating, &max_load_average, 1, 1, 0, &default_load_average,
       &default_load_average, "load-average" },
-#else
-    { 'l', positive_int, &max_load_average, 1, 1, 0, &default_load_average,
-      &default_load_average, "load-average" },
-#endif
     { 'o', filename, &old_files, 0, 0, 0, 0, 0, "old-file" },
     { 'O', string, &output_sync_option, 1, 1, 0, "target", 0, "output-sync" },
     { 'W', filename, &new_files, 0, 0, 0, 0, 0, "what-if" },
@@ -2942,7 +2932,6 @@ decode_switches (int argc, const char **argv, int env)
                       = *(unsigned int *) cs->noarg_value;
                   break;
 
-#ifndef NO_FLOAT
                 case floating:
                   if (coptarg == 0 && optind < argc
                       && (ISDIGIT (argv[optind][0]) || argv[optind][0] == '.'))
@@ -2954,7 +2943,6 @@ decode_switches (int argc, const char **argv, int env)
                          : *(double *) cs->noarg_value);
 
                   break;
-#endif
                 }
 
               /* We've found the switch.  Stop looking.  */
@@ -3156,7 +3144,6 @@ define_makeflags (int all, int makefile)
             }
           break;
 
-#ifndef NO_FLOAT
         case floating:
           if (all)
             {
@@ -3176,7 +3163,6 @@ define_makeflags (int all, int makefile)
                 }
             }
           break;
-#endif
 
         case string:
           if (all)
index 5eb5cb8c758af36730c88aa1045a35e7122c5b90..d7266cff8ada9283e48c496510c80b44bc4119f0 100644 (file)
--- a/makeint.h
+++ b/makeint.h
@@ -662,11 +662,7 @@ extern int batch_mode_shell;
 extern char cmd_prefix;
 
 extern unsigned int job_slots;
-#ifndef NO_FLOAT
 extern double max_load_average;
-#else
-extern int max_load_average;
-#endif
 
 #ifdef WINDOWS32
 extern char *program;
index 3a908cbc64ea5d92b761e902afab23bad8a1e78a..c01eb910f64fd72210c5a37bd6176342c991024a 100644 (file)
--- a/remake.c
+++ b/remake.c
@@ -1408,11 +1408,6 @@ f_mtime (struct file *file, int search)
           adjusted_now = now + (resolution - 1);
           if (adjusted_now < adjusted_mtime)
             {
-#ifdef NO_FLOAT
-              OS (error, NILF,
-                  _("Warning: File '%s' has modification time in the future"),
-                  file->name);
-#else
               double from_now =
                 (FILE_TIMESTAMP_S (mtime) - FILE_TIMESTAMP_S (now)
                  + ((FILE_TIMESTAMP_NS (mtime) - FILE_TIMESTAMP_NS (now))
@@ -1426,7 +1421,6 @@ f_mtime (struct file *file, int search)
               OSS (error, NILF,
                    _("Warning: File '%s' has modification time %s s in the future"),
                    file->name, from_now_string);
-#endif
               clock_skew_detected = 1;
             }
         }
diff --git a/rule.c b/rule.c
index de8b30464070e52237dc0e17a8605d2186f1e0a8..a173fdd968b35b4a7fe33d53a62340e3c07bc191 100644 (file)
--- a/rule.c
+++ b/rule.c
@@ -511,16 +511,8 @@ print_rule_data_base (void)
     puts (_("\n# No implicit rules."));
   else
     {
-      printf (_("\n# %u implicit rules, %u"), rules, terminal);
-#ifndef NO_FLOAT
-      printf (" (%.1f%%)", (double) terminal / (double) rules * 100.0);
-#else
-      {
-        int f = (terminal * 1000 + 5) / rules;
-        printf (" (%d.%d%%)", f/10, f%10);
-      }
-#endif
-      puts (_(" terminal."));
+      printf (_("\n# %u implicit rules, %u (%.1f%%) terminal."),
+              rules, terminal, (double) terminal / (double) rules * 100.0);
     }
 
   if (num_pattern_rules != rules)