From 6a1781b9ed43104b2cdfd65cf4937c87cdcdde76 Mon Sep 17 00:00:00 2001 From: curt mayer Date: Sat, 22 Feb 2020 21:02:18 -0800 Subject: [PATCH] diff soft failure and casefn speedup --- Source/Images/Makefile | 2 +- Tools/Makefile.inc | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Images/Makefile b/Source/Images/Makefile index 2de29bc7..b7953099 100644 --- a/Source/Images/Makefile +++ b/Source/Images/Makefile @@ -76,7 +76,7 @@ blankhd: if [ "$$file" = "../../Binary/Apps/Tunes/*.*" ] ; then hack=../../Binary/Apps/Tunes/Makefile ; fi ; \ rf=$$($(CASEFN) $$hack $$file | sort -V) ; \ echo " " $$rf ; \ - if [ "$$rf" = nofile ] ; then \ + if [ -z "$$rf" ] ; then \ echo " " $$file missing ; \ else \ $(CPMCP) -f $$fmt $@ $$rf $$user ; \ diff --git a/Tools/Makefile.inc b/Tools/Makefile.inc index 86dc033e..5a60273a 100644 --- a/Tools/Makefile.inc +++ b/Tools/Makefile.inc @@ -24,7 +24,8 @@ RELPATH := $(subst $(TREEROOT),,$(HERE)) # # where's a copy of this tree for windows so we can diff binaries # -DIFFTO := $(shell cd $(TREEROOT)/../RomWBW.windows; pwd) +WINROOT = $(TREEROOT)/../RomWBW.windows +DIFFTO := $(shell if [ -d $(WINROOT) ] ; then cd $(WINROOT); pwd; fi) DIFFPATH := $(DIFFTO)/$(RELPATH) # @@ -127,6 +128,9 @@ clean:: done clobber:: clean + @if [ "$(DEST)" ] ; then for file in $(OBJECTS) ; do \ + rm -f $$($(CASEFN) $(DEST)/$$file) ; \ + done ; fi @-rm -f $$($(CASEFN) $(filter-out $(NODELETE),$(OBJECTS))) @for dir in $(SUBDIRS) ; do \ ( echo "clobbering in `pwd`/$$dir" ; cd "$$dir" ; make clobber ) ; \ @@ -137,6 +141,7 @@ clobber:: clean # the same objects # diff:: +ifneq ($(DIFFTO),) @for dir in $(SUBDIRS) ; do \ ( echo "diff in $(HERE)/$$dir" ; cd "$$dir" ; make diff ) ; \ done @@ -157,4 +162,5 @@ diff:: fi \ fi \ done +endif