diff options
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | filedef.h | 2 | ||||
-rw-r--r-- | main.c | 21 | ||||
-rw-r--r-- | remake.c | 60 | ||||
-rw-r--r-- | tests/ChangeLog | 6 | ||||
-rw-r--r-- | tests/scripts/features/include | 9 |
7 files changed, 75 insertions, 48 deletions
@@ -1,3 +1,22 @@ +2000-01-23 Paul D. Smith <psmith@gnu.org> + + * main.c (decode_debug_flags): If debug_flag is set, enable all + debugging levels. + (debug_flag): Resurrect this flag variable. + (switches): Make -d give the old behavior of turning on all + debugging. Change --debug alone to emit basic debugging and take + optional arguments to expand debugging. + * NEWS: Document the new debugging options. + + * remake.c (no_rule_error): Remove this function. This tries to + fix a real problem--see the description with the introduction of + this function below. However, the cure is worse than the disease + and this approach won't work. + (remake_file): Put the code from no_rule_error back here. + (update_file_1): Remove call to no_rule_error. + + * filedef.h (struct file): Remove mfile_status field. + 2000-01-22 Paul D. Smith <psmith@gnu.org> Integrate GNU gettext support. @@ -18,6 +37,7 @@ * po/POTFILES.in, po/Makefile.in.in: New files. Take Makefile.in.in from the latest GNU tar distribution, as that version works better than the one that comes with gettext. + * NEWS: Mention i18n ability. 2000-01-21 Paul D. Smith <psmith@gnu.org> @@ -42,12 +42,15 @@ Version 3.79 function and have it work properly. This was suggested by Damien GIBOU <damien.gibou@st.com>. -* The -d (--debug) option has changed: it now allows optional flags +* The --debug option has changed: it now allows optional flags controlling the amount and type of debugging output. By default only a minimal amount information is generated, displaying the names of "normal" targets (not makefiles) were deemed out of date and in need of being rebuilt. + Note that the -d option behaves as before: all debugging information + is generated. + * Hartmut Becker provided many updates for the VMS port of GNU make. See the readme.vms file for more details. @@ -87,8 +87,6 @@ struct file unsigned int secondary:1; unsigned int dontcare:1; /* Nonzero if no complaint is to be made if this target cannot be remade. */ - unsigned int mfile_status:1;/* Nonzero if update_status was obtained - while remaking a makefile. */ unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */ unsigned int pat_searched:1;/* Nonzero if we already searched for pattern-specific variables. */ @@ -142,6 +142,7 @@ int just_print_flag; /* Print debugging info (--debug). */ static struct stringlist *db_flags; +static int debug_flag = 0; int db_level = 0; @@ -260,10 +261,13 @@ static const struct command_switch switches[] = { 'C', string, (char *) &directories, 0, 0, 0, 0, 0, "directory", N_("DIRECTORY"), N_("Change to DIRECTORY before doing anything") }, - { 'd', string, (char *) &db_flags, 1, 1, 0, + { 'd', flag, (char *) &debug_flag, 1, 1, 0, 0, 0, + 0, 0, + N_("Print lots of debugging information") }, + { CHAR_MAX+1, string, (char *) &db_flags, 1, 1, 0, "basic", 0, "debug", N_("FLAGS"), - N_("Print different types of debugging information") }, + N_("Print various types of debugging information") }, #ifdef WINDOWS32 { 'D', flag, (char *) &suspend_flag, 1, 1, 0, 0, 0, "suspend-for-debug", 0, @@ -289,7 +293,7 @@ static const struct command_switch switches[] = (char *) &inf_jobs, (char *) &default_job_slots, "jobs", "N", N_("Allow N jobs at once; infinite jobs with no arg") }, - { CHAR_MAX+1, string, (char *) &jobserver_fds, 1, 1, 0, 0, 0, + { CHAR_MAX+2, string, (char *) &jobserver_fds, 1, 1, 0, 0, 0, "jobserver-fds", 0, 0 }, { 'k', flag, (char *) &keep_going_flag, 1, 1, 0, @@ -344,13 +348,13 @@ static const struct command_switch switches[] = { 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0, "print-directory", 0, N_("Print the current directory") }, - { CHAR_MAX+2, flag, (char *) &inhibit_print_directory_flag, 1, 1, 0, 0, 0, + { CHAR_MAX+3, flag, (char *) &inhibit_print_directory_flag, 1, 1, 0, 0, 0, "no-print-directory", 0, N_("Turn off -w, even if it was turned on implicitly") }, { 'W', string, (char *) &new_files, 0, 0, 0, 0, 0, "what-if", N_("FILE"), N_("Consider FILE to be infinitely new") }, - { CHAR_MAX+3, flag, (char *) &warn_undefined_variables_flag, 1, 1, 0, 0, 0, + { CHAR_MAX+4, flag, (char *) &warn_undefined_variables_flag, 1, 1, 0, 0, 0, "warn-undefined-variables", 0, N_("Warn when an undefined variable is referenced") }, { '\0', } @@ -497,6 +501,9 @@ decode_debug_flags () { char **pp; + if (debug_flag) + db_level = DB_ALL; + if (!db_flags) return; @@ -515,13 +522,13 @@ decode_debug_flags () db_level |= DB_BASIC; break; case 'i': - db_level |= DB_IMPLICIT; + db_level |= DB_BASIC | DB_IMPLICIT; break; case 'j': db_level |= DB_JOBS; break; case 'm': - db_level |= DB_MAKEFILES; + db_level |= DB_BASIC | DB_MAKEFILES; break; case 'v': db_level |= DB_BASIC | DB_VERBOSE; @@ -258,39 +258,6 @@ update_goal_chain (goals, makefiles) return status; } -/* Generate an error/fatal message if no rules are available for the target. - */ -static void -no_rule_error(file) - struct file *file; -{ - const char *msg_noparent - = _("%sNo rule to make target `%s'%s"); - const char *msg_parent - = _("%sNo rule to make target `%s', needed by `%s'%s"); - - if (keep_going_flag || file->dontcare) - { - /* If the previous attempt was made while we were creating - makefiles, but we aren't anymore, print an error now. */ - if (!file->dontcare - || (file->mfile_status && !updating_makefiles)) - { - if (file->parent == 0) - error (NILF, msg_noparent, "*** ", file->name, "."); - else - error (NILF, msg_parent, "*** ", - file->name, file->parent->name, "."); - } - file->update_status = 2; - file->mfile_status = updating_makefiles; - } - else if (file->parent == 0) - fatal (NILF, msg_noparent, "", file->name, ""); - else - fatal (NILF, msg_parent, "", file->name, file->parent->name, ""); -} - /* If FILE is not up to date, execute the commands for it. Return 0 if successful, 1 if unsuccessful; but with some flag settings, just call `exit' if unsuccessful. @@ -381,7 +348,6 @@ update_file_1 (file, depth) { DBF (DB_VERBOSE, _("Recently tried and failed to update file `%s'.\n")); - no_rule_error(file); return file->update_status; } @@ -996,7 +962,31 @@ remake_file (file) Pretend it was successfully remade. */ file->update_status = 0; else - no_rule_error (file); + { + const char *msg_noparent + = _("%sNo rule to make target `%s'%s"); + const char *msg_parent + = _("%sNo rule to make target `%s', needed by `%s'%s"); + + /* This is a dependency file we cannot remake. Fail. */ + if (!keep_going_flag && !file->dontcare) + { + if (file->parent == 0) + fatal (NILF, msg_noparent, "", file->name, ""); + + fatal (NILF, msg_parent, "", file->name, file->parent->name, ""); + } + + if (!file->dontcare) + { + if (file->parent == 0) + error (NILF, msg_noparent, "*** ", file->name, "."); + else + error (NILF, msg_parent, "*** ", + file->name, file->parent->name, "."); + } + file->update_status = 2; + } } else { diff --git a/tests/ChangeLog b/tests/ChangeLog index e613d8d..68825fa 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2000-01-23 Paul D. Smith <psmith@gnu.org> + + * scripts/features/include: Remove a check; the fix caused more + problems than the error, so I removed it and removed the test for + it. + 2000-01-11 Paul D. Smith <psmith@gnu.org> * scripts/functions/call: Add a test for PR/1517 and PR/1527: make diff --git a/tests/scripts/features/include b/tests/scripts/features/include index 2a48fbd..60f4482 100644 --- a/tests/scripts/features/include +++ b/tests/scripts/features/include @@ -51,8 +51,11 @@ $answer = "This is another included makefile\n"; # the -include suppressed it during the makefile read phase, we should # see one during the makefile run phase). -&run_make_with_options($makefile, "error", &get_logfile, 512); -$answer = "$make_name: *** No rule to make target `makeit.mk', needed by `error'.\n"; -&compare_output($answer, &get_logfile(1)); +# The fix to this caused more problems than the error, so I removed it. +# pds -- 22 Jan 2000 + +#&run_make_with_options($makefile, "error", &get_logfile, 512); +#$answer = "$make_name: *** No rule to make target `makeit.mk', needed by `error'.\n"; +#&compare_output($answer, &get_logfile(1)); 1; |