[OpenBIOS] [PATCH] Fixes for Makefile clean target

Andreas Färber andreas.faerber at web.de
Sat May 22 14:54:12 CEST 2010


Hello,

Here are two fixes for Makefile.target:

1) Lots of .o files stay around after a `make clean`, on Mac OS X host.

diff --git a/Makefile.target b/Makefile.target
index aa45120..8a706b2 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -62,7 +62,7 @@ info:
  clean:
  	@printf "Cleaning up for $(ARCH)..."
  	@rm -rf forth.dict.core forthstrap *.dict openbios-*
-	@find . -type f -name "*~" -o -name '*.o' -o -name '*.a' -exec rm \ 
{\} \;
+	@find . -type f \( -name "*~" -o -name '*.o' -o -name '*.a' \) -exec  
rm \{\} \;
  	@echo " ok"

Without this grouping, `find` fails to exec anything.

2) Even with the `find` expression fixed, the two generated files with  
the date are not removed, so take care of that manually:

diff --git a/Makefile.target b/Makefile.target
index 8a706b2..bab5998 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -62,6 +62,7 @@ info:
  clean:
  	@printf "Cleaning up for $(ARCH)..."
  	@rm -rf forth.dict.core forthstrap *.dict openbios-*
+	@rm -f $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/ 
version.fs
  	@find . -type f \( -name "*~" -o -name '*.o' -o -name '*.a' \) - 
exec rm \{\} \;
  	@echo " ok"

Signed-off-by: Andreas Faerber <andreas.faerber at web.de>

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-find-expression-in-clean-target.patch
Type: application/octet-stream
Size: 775 bytes
Desc: not available
URL: <http://lists.openbios.org/pipermail/openbios/attachments/20100522/fe60ac1a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Clean-generated-version-files.patch
Type: application/octet-stream
Size: 741 bytes
Desc: not available
URL: <http://lists.openbios.org/pipermail/openbios/attachments/20100522/fe60ac1a/attachment-0001.obj>


More information about the OpenBIOS mailing list