Force version printing whenever we print the database.
authorPaul Smith <psmith@gnu.org>
Wed, 22 May 2013 06:51:45 +0000 (02:51 -0400)
committerPaul Smith <psmith@gnu.org>
Wed, 22 May 2013 06:51:45 +0000 (02:51 -0400)
ChangeLog
NEWS
main.c

index 9a176e1c9a6b3606efaa286fd2da81a443d46f86..8499e9bbcda83ee13e4d4d75bab67b8719d7ac59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
        in the initial batch of flags.  Do not allow any flags with
        options in that batch.  If there are only non-simple flags MAKEFLAGS
        begins with ' '.
+       (print_data_base): Print the version.  Fixes part of Savannah #35336.
 
        * read.c (eval_buffer): Initialize lineno.
 
diff --git a/NEWS b/NEWS
index 0b39731e30ad0dc0637abe602bebbead189e0a17..e1fb5a727cbb2df4a30fdf3599c55d728e11803d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,14 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=101&set
   GNU make-specific flags to allow your makefile to be portable to other
   versions of make.  GNU make never sets or modifies GNUMAKEFLAGS.
 
+* Behavior of MAKEFLAGS and MFLAGS is more rigorously defined.  All simple
+  flags are grouped together in the first word of MAKEFLAGS.  No options that
+  accept arguments appear there.  If no simple flags are present MAKEFLAGS
+  begins with a space.  MFLAGS never begins with "- ".
+
+* Setting the -r and -R options in MAKEFLAGS inside a makefile now works as
+  expected, removing all built-in rules and variables, respectively.
+
 * On failure, the makefile name and linenumber of the recipe that failed are
   shown.
 
diff --git a/main.c b/main.c
index 6a956add59789f1b441ae64bfc487c462a6cb2f4..2b302607fd210c23539c3a183f4c54c27ec9e3b7 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1390,7 +1390,7 @@ main (int argc, char **argv, char **envp)
   always_make_flag = always_make_set && (restarts == 0);
 
   /* Print version information.  */
-  if (print_version_flag || print_data_base_flag || ISDB (DB_BASIC))
+  if (print_version_flag || ISDB (DB_BASIC))
     {
       print_version ();
 
@@ -3222,9 +3222,10 @@ print_version (void)
 static void
 print_data_base ()
 {
-  time_t when;
+  time_t when = time ((time_t *) 0);
+
+  print_version ();
 
-  when = time ((time_t *) 0);
   printf (_("\n# Make data base, printed on %s"), ctime (&when));
 
   print_variable_data_base ();