comparison lwasm/main.c @ 384:38b50ce6967a

Made --list and --depend work
author lost@starbug
date Sat, 15 May 2010 20:46:04 -0600
parents 848d3cca8078
children cf8c92d70eb1
comparison
equal deleted inserted replaced
383:848d3cca8078 384:38b50ce6967a
234 { 234 {
235 lwasm_show_errors(&asmstate); 235 lwasm_show_errors(&asmstate);
236 exit(1); 236 exit(1);
237 } 237 }
238 } 238 }
239 239
240 debug_message(&asmstate, 50, "Doing output"); 240 if (asmstate.flags & FLAG_DEPEND)
241 do_output(&asmstate); 241 {
242 // output dependencies
243 char *n;
244
245 while (n = lw_stack_pop(asmstate.includelist))
246 {
247 fprintf(stdout, "%s\n", n);
248 lw_free(n);
249 }
250 }
251 else
252 {
253 debug_message(&asmstate, 50, "Doing output");
254 do_output(&asmstate);
255 }
242 256
243 debug_message(&asmstate, 50, "Done assembly"); 257 debug_message(&asmstate, 50, "Done assembly");
244 258
245 do_list(&asmstate); 259 do_list(&asmstate);
246 } 260 }