summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-01-12 19:42:13 +0000
committerRoland McGrath <roland@redhat.com>1993-01-12 19:42:13 +0000
commit2bff7aa420a054f1c7c5be13befaab34d7f04434 (patch)
tree45e9c1b7291678a3e1d33362c521f19179d54601
parente07db8077c1d9f0c0b75152fad903212e43c7dcc (diff)
downloadgunmake-2bff7aa420a054f1c7c5be13befaab34d7f04434.tar.gz
Formerly main.c.~68~
-rw-r--r--main.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/main.c b/main.c
index e2a613b..60e4e76 100644
--- a/main.c
+++ b/main.c
@@ -993,10 +993,6 @@ main (argc, argv, envp)
}
}
- /* Print the data base under -p. */
- if (print_data_base_flag)
- print_data_base ();
-
if (goals == 0)
{
if (read_makefiles == 0)
@@ -1349,8 +1345,12 @@ decode_env_switches (envar, len)
args[(value[0] == '-' ? 0 : 1) + len + 1] = '\0';
/* Allocate a vector that is definitely big enough. */
- argv = (char **) alloca (len * sizeof (char *));
- argc = 0;
+ argv = (char **) alloca (1 + len * sizeof (char *));
+
+ /* getopt will look at the arguments starting at ARGV[1].
+ Prepend a spacer word. */
+ argv[0] = 0;
+ argc = 1;
do
{
argv[argc++] = args;
@@ -1591,6 +1591,9 @@ die (status)
/* Remove the intermediate files. */
remove_intermediates (0);
+ if (print_data_base_flag)
+ print_data_base ();
+
if (print_directory_flag)
log_working_directory (0);
}