mirror of
https://github.com/mirror/make.git
synced 2025-02-12 04:40:10 +08:00
* main.c (main): Restrict disabling debugging for MAKEFILES.
This commit is contained in:
parent
86b20728fe
commit
65c447289e
30
main.c
30
main.c
@ -2148,12 +2148,8 @@ main (int argc, char **argv, char **envp)
|
|||||||
char **aargv = NULL;
|
char **aargv = NULL;
|
||||||
const char **nargv;
|
const char **nargv;
|
||||||
int nargc;
|
int nargc;
|
||||||
int orig_db_level = db_level;
|
|
||||||
enum update_status status;
|
enum update_status status;
|
||||||
|
|
||||||
if (! ISDB (DB_MAKEFILES))
|
|
||||||
db_level = DB_NONE;
|
|
||||||
|
|
||||||
DB (DB_BASIC, (_("Updating makefiles....\n")));
|
DB (DB_BASIC, (_("Updating makefiles....\n")));
|
||||||
|
|
||||||
/* Remove any makefiles we don't want to try to update.
|
/* Remove any makefiles we don't want to try to update.
|
||||||
@ -2195,6 +2191,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f == NULL || !f->double_colon)
|
if (f == NULL || !f->double_colon)
|
||||||
{
|
{
|
||||||
makefile_mtimes = xrealloc (makefile_mtimes,
|
makefile_mtimes = xrealloc (makefile_mtimes,
|
||||||
@ -2210,18 +2207,26 @@ main (int argc, char **argv, char **envp)
|
|||||||
/* Set up 'MAKEFLAGS' specially while remaking makefiles. */
|
/* Set up 'MAKEFLAGS' specially while remaking makefiles. */
|
||||||
define_makeflags (1, 1);
|
define_makeflags (1, 1);
|
||||||
|
|
||||||
rebuilding_makefiles = 1;
|
{
|
||||||
status = update_goal_chain (read_files);
|
int orig_db_level = db_level;
|
||||||
rebuilding_makefiles = 0;
|
|
||||||
|
if (! ISDB (DB_MAKEFILES))
|
||||||
|
db_level = DB_NONE;
|
||||||
|
|
||||||
|
rebuilding_makefiles = 1;
|
||||||
|
status = update_goal_chain (read_files);
|
||||||
|
rebuilding_makefiles = 0;
|
||||||
|
|
||||||
|
db_level = orig_db_level;
|
||||||
|
}
|
||||||
|
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case us_question:
|
case us_question:
|
||||||
/* The only way this can happen is if the user specified -q and asked
|
/* The only way this can happen is if the user specified -q and asked
|
||||||
* for one of the makefiles to be remade as a target on the command
|
for one of the makefiles to be remade as a target on the command
|
||||||
* line. Since we're not actually updating anything with -q we can
|
line. Since we're not actually updating anything with -q we can
|
||||||
* treat this as "did nothing".
|
treat this as "did nothing". */
|
||||||
*/
|
|
||||||
|
|
||||||
case us_none:
|
case us_none:
|
||||||
/* Did nothing. */
|
/* Did nothing. */
|
||||||
@ -2368,6 +2373,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
for (p = nargv; *p != 0; ++p)
|
for (p = nargv; *p != 0; ++p)
|
||||||
printf (" %s", *p);
|
printf (" %s", *p);
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
|
fflush (stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _AMIGA
|
#ifndef _AMIGA
|
||||||
@ -2446,8 +2452,6 @@ main (int argc, char **argv, char **envp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
db_level = orig_db_level;
|
|
||||||
|
|
||||||
/* Free the makefile mtimes. */
|
/* Free the makefile mtimes. */
|
||||||
free (makefile_mtimes);
|
free (makefile_mtimes);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user