mirror of
https://github.com/mirror/make.git
synced 2025-01-14 22:30:39 +08:00
* A few fixes.
This commit is contained in:
parent
24aec1878b
commit
447c76f601
20
ChangeLog
20
ChangeLog
@ -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>
|
2000-01-22 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
Integrate GNU gettext support.
|
Integrate GNU gettext support.
|
||||||
@ -18,6 +37,7 @@
|
|||||||
* po/POTFILES.in, po/Makefile.in.in: New files. Take
|
* po/POTFILES.in, po/Makefile.in.in: New files. Take
|
||||||
Makefile.in.in from the latest GNU tar distribution, as that
|
Makefile.in.in from the latest GNU tar distribution, as that
|
||||||
version works better than the one that comes with gettext.
|
version works better than the one that comes with gettext.
|
||||||
|
* NEWS: Mention i18n ability.
|
||||||
|
|
||||||
2000-01-21 Paul D. Smith <psmith@gnu.org>
|
2000-01-21 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
5
NEWS
5
NEWS
@ -42,12 +42,15 @@ Version 3.79
|
|||||||
function and have it work properly. This was suggested by Damien
|
function and have it work properly. This was suggested by Damien
|
||||||
GIBOU <damien.gibou@st.com>.
|
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
|
controlling the amount and type of debugging output. By default only
|
||||||
a minimal amount information is generated, displaying the names of
|
a minimal amount information is generated, displaying the names of
|
||||||
"normal" targets (not makefiles) were deemed out of date and in need
|
"normal" targets (not makefiles) were deemed out of date and in need
|
||||||
of being rebuilt.
|
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.
|
* Hartmut Becker provided many updates for the VMS port of GNU make.
|
||||||
See the readme.vms file for more details.
|
See the readme.vms file for more details.
|
||||||
|
|
||||||
|
@ -87,8 +87,6 @@ struct file
|
|||||||
unsigned int secondary:1;
|
unsigned int secondary:1;
|
||||||
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
||||||
this target cannot be remade. */
|
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 ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
||||||
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
||||||
pattern-specific variables. */
|
pattern-specific variables. */
|
||||||
|
21
main.c
21
main.c
@ -142,6 +142,7 @@ int just_print_flag;
|
|||||||
/* Print debugging info (--debug). */
|
/* Print debugging info (--debug). */
|
||||||
|
|
||||||
static struct stringlist *db_flags;
|
static struct stringlist *db_flags;
|
||||||
|
static int debug_flag = 0;
|
||||||
|
|
||||||
int db_level = 0;
|
int db_level = 0;
|
||||||
|
|
||||||
@ -260,10 +261,13 @@ static const struct command_switch switches[] =
|
|||||||
{ 'C', string, (char *) &directories, 0, 0, 0, 0, 0,
|
{ 'C', string, (char *) &directories, 0, 0, 0, 0, 0,
|
||||||
"directory", N_("DIRECTORY"),
|
"directory", N_("DIRECTORY"),
|
||||||
N_("Change to DIRECTORY before doing anything") },
|
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,
|
"basic", 0,
|
||||||
"debug", N_("FLAGS"),
|
"debug", N_("FLAGS"),
|
||||||
N_("Print different types of debugging information") },
|
N_("Print various types of debugging information") },
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
{ 'D', flag, (char *) &suspend_flag, 1, 1, 0, 0, 0,
|
{ 'D', flag, (char *) &suspend_flag, 1, 1, 0, 0, 0,
|
||||||
"suspend-for-debug", 0,
|
"suspend-for-debug", 0,
|
||||||
@ -289,7 +293,7 @@ static const struct command_switch switches[] =
|
|||||||
(char *) &inf_jobs, (char *) &default_job_slots,
|
(char *) &inf_jobs, (char *) &default_job_slots,
|
||||||
"jobs", "N",
|
"jobs", "N",
|
||||||
N_("Allow N jobs at once; infinite jobs with no arg") },
|
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,
|
"jobserver-fds", 0,
|
||||||
0 },
|
0 },
|
||||||
{ 'k', flag, (char *) &keep_going_flag, 1, 1, 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,
|
{ 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0,
|
||||||
"print-directory", 0,
|
"print-directory", 0,
|
||||||
N_("Print the current directory") },
|
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,
|
"no-print-directory", 0,
|
||||||
N_("Turn off -w, even if it was turned on implicitly") },
|
N_("Turn off -w, even if it was turned on implicitly") },
|
||||||
{ 'W', string, (char *) &new_files, 0, 0, 0, 0, 0,
|
{ 'W', string, (char *) &new_files, 0, 0, 0, 0, 0,
|
||||||
"what-if", N_("FILE"),
|
"what-if", N_("FILE"),
|
||||||
N_("Consider FILE to be infinitely new") },
|
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,
|
"warn-undefined-variables", 0,
|
||||||
N_("Warn when an undefined variable is referenced") },
|
N_("Warn when an undefined variable is referenced") },
|
||||||
{ '\0', }
|
{ '\0', }
|
||||||
@ -497,6 +501,9 @@ decode_debug_flags ()
|
|||||||
{
|
{
|
||||||
char **pp;
|
char **pp;
|
||||||
|
|
||||||
|
if (debug_flag)
|
||||||
|
db_level = DB_ALL;
|
||||||
|
|
||||||
if (!db_flags)
|
if (!db_flags)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -515,13 +522,13 @@ decode_debug_flags ()
|
|||||||
db_level |= DB_BASIC;
|
db_level |= DB_BASIC;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
db_level |= DB_IMPLICIT;
|
db_level |= DB_BASIC | DB_IMPLICIT;
|
||||||
break;
|
break;
|
||||||
case 'j':
|
case 'j':
|
||||||
db_level |= DB_JOBS;
|
db_level |= DB_JOBS;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
db_level |= DB_MAKEFILES;
|
db_level |= DB_BASIC | DB_MAKEFILES;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
db_level |= DB_BASIC | DB_VERBOSE;
|
db_level |= DB_BASIC | DB_VERBOSE;
|
||||||
|
60
remake.c
60
remake.c
@ -258,39 +258,6 @@ update_goal_chain (goals, makefiles)
|
|||||||
return status;
|
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.
|
/* If FILE is not up to date, execute the commands for it.
|
||||||
Return 0 if successful, 1 if unsuccessful;
|
Return 0 if successful, 1 if unsuccessful;
|
||||||
but with some flag settings, just call `exit' if unsuccessful.
|
but with some flag settings, just call `exit' if unsuccessful.
|
||||||
@ -381,7 +348,6 @@ update_file_1 (file, depth)
|
|||||||
{
|
{
|
||||||
DBF (DB_VERBOSE,
|
DBF (DB_VERBOSE,
|
||||||
_("Recently tried and failed to update file `%s'.\n"));
|
_("Recently tried and failed to update file `%s'.\n"));
|
||||||
no_rule_error(file);
|
|
||||||
return file->update_status;
|
return file->update_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -996,7 +962,31 @@ remake_file (file)
|
|||||||
Pretend it was successfully remade. */
|
Pretend it was successfully remade. */
|
||||||
file->update_status = 0;
|
file->update_status = 0;
|
||||||
else
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -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>
|
2000-01-11 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* scripts/functions/call: Add a test for PR/1517 and PR/1527: make
|
* scripts/functions/call: Add a test for PR/1517 and PR/1527: make
|
||||||
|
@ -51,8 +51,11 @@ $answer = "This is another included makefile\n";
|
|||||||
# the -include suppressed it during the makefile read phase, we should
|
# the -include suppressed it during the makefile read phase, we should
|
||||||
# see one during the makefile run phase).
|
# see one during the makefile run phase).
|
||||||
|
|
||||||
&run_make_with_options($makefile, "error", &get_logfile, 512);
|
# The fix to this caused more problems than the error, so I removed it.
|
||||||
$answer = "$make_name: *** No rule to make target `makeit.mk', needed by `error'.\n";
|
# pds -- 22 Jan 2000
|
||||||
&compare_output($answer, &get_logfile(1));
|
|
||||||
|
#&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;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user