Skip to content

Commit 339017d

Browse files
committed
Added conditional removal commands
1 parent d5e958d commit 339017d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

wat4g.mak

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ $(BINDIR)luac4g.exe: $(BINDIR) $(OBJDIR) $(objs) $(luac_obj)
4949

5050
clean: .SYMBOLIC
5151
!ifdef __UNIX__
52-
rm -R $(OBJDIR)
53-
rm $(BINDIR)lua4g.exe
54-
rm $(BINDIR)luac4g.exe
52+
@!if [ -e $(OBJDIR) ]; then rm -R $(OBJDIR); fi
53+
@!if [ -e $(BINDIR)lua4g.exe ]; then rm $(BINDIR)lua4g.exe; fi
54+
@!if [ -e $(BINDIR)luac4g.exe ]; then rm $(BINDIR)luac4g.exe; fi
5555
!else
5656
!ifdef __NT__
57-
@if exist $(OBJDIR) rd /S /Q $(OBJDIR)
57+
@!if exist $(OBJDIR) rd /S /Q $(OBJDIR)
5858
!else
59-
@if exist $(OBJDIR) deltree /Y $(OBJDIR)
59+
@!if exist $(OBJDIR) deltree /Y $(OBJDIR)
6060
!endif
61-
@if exist $(BINDIR)lua4g.exe del $(BINDIR)lua4g.exe
62-
@if exist $(BINDIR)luac4g.exe del $(BINDIR)luac4g.exe
61+
@!if exist $(BINDIR)lua4g.exe del $(BINDIR)lua4g.exe
62+
@!if exist $(BINDIR)luac4g.exe del $(BINDIR)luac4g.exe
6363
!endif
6464

6565
dist:

0 commit comments

Comments
 (0)