summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-05-22 02:51:45 -0400
committerPaul Smith <psmith@gnu.org>2013-05-22 02:51:45 -0400
commit53ceab485a8c5bbd15f5246313ca3b2ba25ebbbf (patch)
tree3d8fd52768f57df9780c06ce39c5fc0db062e612
parent058c1c8d9c4667c25818d525eade78307c0ed4d2 (diff)
downloadmake-53ceab485a8c5bbd15f5246313ca3b2ba25ebbbf.tar.gz
Force version printing whenever we print the database.
-rw-r--r--ChangeLog1
-rw-r--r--NEWS8
-rw-r--r--main.c7
3 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a176e1c..8499e9bb 100644
--- 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 0b39731e..e1fb5a72 100644
--- 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 6a956add..2b302607 100644
--- 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 ();