diff --git a/asm/nasm.c b/asm/nasm.c index f581a05b..288cb0e1 100644 --- a/asm/nasm.c +++ b/asm/nasm.c @@ -1207,6 +1207,9 @@ static void assemble_file(char *fname, StrList **depend_ptr) cpu = cmd_cpu; if (pass0 == 2) { lfmt->init(listname); + } else if (passn == 1 && *listname) { + /* Remove the list file in case we die before the output pass */ + remove(listname); } in_absolute = false; global_offset_changed = 0; /* set by redefine_label */ diff --git a/test/Makefile b/test/Makefile index 51fbb27d..4133dbe4 100644 --- a/test/Makefile +++ b/test/Makefile @@ -10,40 +10,40 @@ $(NASM): $(MAKE) -C .. %.bin: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $< %.ith: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f ith -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f ith -o $@ -l $*.lst $< %.srec: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f srec -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f srec -o $@ -l $*.lst $< %.o: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f elf32 -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f elf32 -o $@ -l $*.lst $< %.o64: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f elf64 -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f elf64 -o $@ -l $*.lst $< %.obj: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f obj -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f obj -o $@ -l $*.lst $< %.coff: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f coff -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f coff -o $@ -l $*.lst $< %.win32: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f win32 -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f win32 -o $@ -l $*.lst $< %.win64: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f win64 -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f win64 -o $@ -l $*.lst $< %.mo32: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f macho32 -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f macho32 -o $@ -l $*.lst $< %.mo64: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f macho64 -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f macho64 -o $@ -l $*.lst $< %.dbg: %.asm $(NASM) - $(RM) $*.lst ; $(NASM) $(NASMOPT) -f dbg -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f dbg -o $@ -l $*.lst $< %.asm: %.pl $(PERL) $< > $@