From ec06d162bd82038de2312a7a07d6a160ab169f35 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 1 Jun 2016 22:14:30 +0200 Subject: [PATCH] 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 ;-)) --- samples/Makefile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) 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) -- 2.39.2