aboutsummaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-01-14 01:54:01 +0000
committerKen Raeburn <raeburn@cygnus>1994-01-14 01:54:01 +0000
commit398527f2a88698693143a822ad23e9ba7118e4dc (patch)
treeeaeb1347982b789338f665a1ff83522b7187603c /gas/as.c
parentff4325cb9bacbfee43fa76ff359429c1f2d28775 (diff)
downloadgdb-398527f2a88698693143a822ad23e9ba7118e4dc.zip
gdb-398527f2a88698693143a822ad23e9ba7118e4dc.tar.gz
gdb-398527f2a88698693143a822ad23e9ba7118e4dc.tar.bz2
Don't include config.h directly any more.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/gas/as.c b/gas/as.c
index 215d830..d38301c 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -43,7 +43,6 @@
#define COMMON
#include "as.h"
-#include "config.h"
#include "subsegs.h"
#include "output-file.h"
@@ -98,6 +97,7 @@ main (argc, argv)
char **work_argv; /* variable copy of argv */
char *arg; /* an arg to program */
char a; /* an arg flag (after -) */
+ int keep_it;
#if 0 /* do we need any of this?? */
{
@@ -336,26 +336,32 @@ main (argc, argv)
brtab_emit ();
#endif
-#ifndef NO_LISTING
- listing_print ("");
-#endif
-
if (seen_at_least_1_file ()
&& !((had_warnings () && flag_always_generate_output)
|| had_errors () > 0))
- {
- write_object_file (); /* relax() addresses then emit object file */
- } /* we also check in write_object_file() just before emit. */
-#ifdef BFD_ASSEMBLER
+ keep_it = 1;
else
- {
- output_file_close (out_file_name);
- unlink (out_file_name);
- }
+ keep_it = 0;
+
+ if (keep_it)
+ write_object_file ();
+
+#ifndef NO_LISTING
+ listing_print ("");
+#endif
+
+#ifndef BFD_ASSEMBLER
+ if (keep_it)
#endif
+ output_file_close (out_file_name);
+
+ if (!keep_it)
+ unlink (out_file_name);
input_scrub_end ();
- md_end (); /* MACHINE.c */
+#ifdef md_end
+ md_end ();
+#endif
if ((had_warnings () && flagseen['Z'])
|| had_errors () > 0)