From: Oliver Schmidt
Date: Wed, 1 Jun 2016 20:14:30 +0000 (+0200)
Subject: Fixed clean goal on Windows.
X-Git-Tag: V2.16~127
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ec06d162bd82038de2312a7a07d6a160ab169f35;p=cc65
Fixed clean goal on Windows.
Now that the clean goal of the samples Makefile is part of the global clean goal it should work on Windows!
BTW: Ideally the whole samples Makefile should work on Windows ;-))
---
diff --git a/samples/Makefile b/samples/Makefile
index 7ab9a13e6..f90cafa5a 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -7,6 +7,18 @@
# Enter the target system here
SYS = c64
+ifneq ($(shell echo),)
+ CMD_EXE = 1
+endif
+
+ifdef CMD_EXE
+ NULLDEV = nul:
+ DEL = -del /f
+else
+ NULLDEV = /dev/null
+ DEL = $(RM)
+endif
+
# Determine the path to the executables and libraries. If the samples
# directory is part of a complete source tree, use the stuff from that
# source tree; otherwise, use the "install" directories.
@@ -131,12 +143,12 @@ ovrldemo: overlaydemo.o
d64: samples.d64
samples.d64: samples
- @$(C1541) -format samples,AA d64 $@ > /dev/null
+ @$(C1541) -format samples,AA d64 $@ >$(NULLDEV)
@for exe in $(EXELIST); do\
- $(C1541) -attach $@ -write $$exe > /dev/null || exit $$?;\
+ $(C1541) -attach $@ -write $$exe >$(NULLDEV) || exit $$?;\
done
@for mod in $(TGI) $(MOUS); do\
- $(C1541) -attach $@ -write $$mod > /dev/null || exit $$?;\
+ $(C1541) -attach $@ -write $$mod >$(NULLDEV) || exit $$?;\
done
# --------------------------------------------------------------------------
@@ -168,8 +180,8 @@ zip:
mostlyclean:
clean:
- $(RM) *.map *.o *.s *.lbl
+ @$(DEL) *.map *.o *.s *.lbl 2>$(NULLDEV)
zap: clean
- $(RM) $(EXELIST) samples.d64
- $(RM) multdemo.? ovrldemo.?
+ @$(DEL) $(EXELIST) samples.d64 2>$(NULLDEV)
+ @$(DEL) multdemo.? ovrldemo.? 2>$(NULLDEV)