Fix Windows file deletion.

Under Windows, 'del' was causing problems with the forward slashes used for directories, as these are not accepted by the shell commands, even if they are accepted as paths in general. Fix it by adding 'rm' capabilities to build-aux.py and using it in Makefile instead of the $(RM) macro.
This commit is contained in:
Sei Lisa 2017-09-01 20:29:16 +02:00 committed by Sei-Lisa
parent 242a5e0017
commit 19b025f7c3
2 changed files with 66 additions and 17 deletions

View file

@ -15,9 +15,6 @@ PREPROC_KIND=mcpp
# If the preprocessor is mcpp and it is in your path, you can leave it as is.
PREPROC_PATH=mcpp
# Command to remove files in your system. Use 'del' for Windows.
RM=rm -f
# Name of the zipped file to generate for SL
SLZIP=AVsitter2.zip
@ -67,24 +64,24 @@ OPENSIM=[AV]sitA.oss\
all: $(SLZIP) $(OSZIP)
clean:
$(RM) $(SLZIP) $(OSZIP) $(OPTIMIZED) $(OPENSIM)
$(PYTHON) build-aux.py rm $(SLZIP) $(OSZIP) $(OPTIMIZED) $(OPENSIM)
optimized: $(OPTIMIZED)
opensim: $(OPENSIM)
$(SLZIP): $(OPTIMIZED) $(UNOPTIMIZED)
$(RM) $@
$(PYTHON) build-aux.py rm $@
zip $@ $(OPTIMIZED) $(UNOPTIMIZED)
%.lslo: %.lsl
$(PYTHON) $(OPTIMIZER) -H -O addstrings,shrinknames,-extendedglobalexpr -p $(PREPROC_KIND) --precmd=$(PREPROC_PATH) $< -o $@
$(OSZIP): $(OPENSIM)
$(RM) $@
$(PYTHON) build-aux.py rm $@
zip $@ $(OPENSIM)
%.oss: %.lsl
$(PYTHON) prepare-for-oss.py $< > $@
$(PYTHON) build-aux.py oss-process $< > $@
.PHONY : all clean optimized