Never fail `make clean'
authorDan Nicholson <dbn.lists@gmail.com>
Wed, 7 May 2008 18:35:23 +0000 (11:35 -0700)
committerDan Nicholson <dbn.lists@gmail.com>
Wed, 7 May 2008 18:35:23 +0000 (11:35 -0700)
Mostly some pedantic changes such that `make clean' always ignores
errors. Also changed the top clean target to do the `touch
configs/current' dance instead of realclean.

28 files changed:
Makefile
doxygen/Makefile
progs/Makefile
progs/beos/Makefile
progs/egl/Makefile
progs/fbdev/Makefile
progs/fp/Makefile
progs/miniglx/Makefile
progs/slang/Makefile
progs/tests/Makefile
progs/trivial/Makefile
progs/vp/Makefile
src/Makefile
src/egl/Makefile
src/egl/drivers/demo/Makefile
src/egl/drivers/dri/Makefile
src/egl/main/Makefile
src/glu/Makefile
src/glx/Makefile
src/mesa/Makefile
src/mesa/drivers/directfb/Makefile
src/mesa/drivers/dri/Makefile
src/mesa/drivers/dri/common/xmlpool/Makefile
src/mesa/drivers/glslcompiler/Makefile
src/mesa/glapi/Makefile
src/mesa/shader/slang/library/Makefile
src/mesa/x86-64/Makefile
src/mesa/x86/Makefile

index df0a0e91e3d648dd09871aa5b5425d437fdb1e34..96d3885849244b692bac63d967a5975b34c2aab2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,16 +17,16 @@ doxygen:
        cd doxygen && $(MAKE)
 
 clean:
-       @for dir in $(SUBDIRS) ; do \
+       -@touch $(TOP)/configs/current
+       -@for dir in $(SUBDIRS) ; do \
                if [ -d $$dir ] ; then \
                        (cd $$dir && $(MAKE) clean) ; \
                fi \
        done
+       -@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
 
 
-realclean:
-       touch $(TOP)/configs/current
-       $(MAKE) clean
+realclean: clean
        -rm -rf lib*
        -rm -f $(TOP)/configs/current
        -rm -f $(TOP)/configs/autoconf
index d8dd555b05efd58405ae728ad8e0b476ac5f720f..15ade4043b8a9c8d99df66de99871fa0fcf55b9f 100644 (file)
@@ -29,5 +29,5 @@ subset: $(SUBSET:.doxy=.tag)
        $(foreach FILE,$(SUBSET),doxygen $(FILE);)
 
 clean:
-       rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
-       rm -rf *.tag
+       -rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
+       -rm -rf *.tag
index 5e705efa7eee2edc7d5706f35eac3062d48d0326..c99f4eebcc1be56d27de779c55efab1c72acddef 100644 (file)
@@ -25,7 +25,7 @@ subdirs:
 install:
 
 clean:
-       @for dir in $(SUBDIRS) tests ; do \
+       -@for dir in $(SUBDIRS) tests ; do \
                if [ -d $$dir ] ; then \
                        (cd $$dir && $(MAKE) clean) ; \
                fi \
index 491e8e442d1ab6b2513f27b486ea07dc9d26455a..0dc4cdce632b064bd87953bdae83c67416891014 100644 (file)
@@ -19,8 +19,8 @@ INCLUDES = -I. -I- -I../../include
 default: demo sample GLInfo
 
 clean:
-       rm -f demo sample GLInfo
-       rm -f *.o
+       -rm -f demo sample GLInfo
+       -rm -f *.o
 
 demo: demo.o
        $(LD) demo.o $(LDFLAGS) $(LIBS) -o $@
index 07215604d3bad5363465a7f99a816868728e4c65..416d2c04b220e398527a915e242b1d39a9581769 100644 (file)
@@ -60,6 +60,6 @@ eglgears.o: eglgears.c $(HEADERS)
 
 
 clean:
-       rm -f *.o *~
-       rm -f *.so
-       rm -f $(PROGRAMS)
+       -rm -f *.o *~
+       -rm -f *.so
+       -rm -f $(PROGRAMS)
index 56daf56f8a719d9486211e839afc65b10f134320..39401243e50843ed6deef865a30e5bd95736d97e 100644 (file)
@@ -37,8 +37,8 @@ LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
 default:  depend $(PROGS)
 
 clean:
-       rm -f $(PROGS)
-       rm -f *.o
+       -rm -f $(PROGS)
+       -rm -f *.o
 
 
 depend: $(SOURCES)
index a395b734ef6ef2cc35a6ff004aa878f45a0cea26..09f22d1a7b560bb7d3a119a909efcf5c862d2f91 100644 (file)
@@ -86,9 +86,9 @@ UTIL_FILES = readtex.h readtex.c
 default: $(UTIL_FILES) $(PROGS)
 
 clean:
-       rm -f $(PROGS)
-       rm -f *.o
-       rm -f getproclist.h
+       -rm -f $(PROGS)
+       -rm -f *.o
+       -rm -f getproclist.h
 
 
 # auto code generation
index 5d0c8eae64fadf6e04e0e3402861b96b3c40ab75..d5258b0a9660de3e54ab0ce3be7af193a514b865 100644 (file)
@@ -43,8 +43,8 @@ LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS
 default:  depend $(PROGS)
 
 clean:
-       rm -f $(PROGS)
-       rm -f *.o
+       -rm -f $(PROGS)
+       -rm -f *.o
 
 
 depend: $(SOURCES)
index ea1e9b6afdd143e04fcd9bab03494c4b09f70530..c93caeab619e00cae20548f79759cef067339ef8 100644 (file)
@@ -24,7 +24,7 @@ tests: default
        ! ./cltest 2> /dev/null | (grep -e ^[*][*][*])
 
 clean:
-       rm -f cltest.o sotest.o vstest.o framework.o cltest sotest vstest
+       -rm -f cltest.o sotest.o vstest.o framework.o cltest sotest vstest
 
 #
 # executables
index 116a19b1f5b4db7a71315a7318477c648e2009b4..cf8e0bfc1e5d850586c27f30be46fa0907f74ebc 100644 (file)
@@ -99,9 +99,9 @@ UTIL_FILES = readtex.h readtex.c
 default: $(UTIL_FILES) $(PROGS)
 
 clean:
-       rm -f $(PROGS)
-       rm -f *.o
-       rm -f getproclist.h
+       -rm -f $(PROGS)
+       -rm -f *.o
+       -rm -f getproclist.h
 
 ##### RULES #####
 
index 7610a5df08c0f6885049b2eab1267d7a25aef7a3..6fa51ce2cfec5019cbb1c2e7e64434b43e1715e2 100644 (file)
@@ -102,9 +102,9 @@ UTIL_FILES = readtex.h readtex.c
 default: $(UTIL_FILES) $(PROGS)
 
 clean:
-       rm -f $(PROGS)
-       rm -f *.o
-       rm -f getproclist.h
+       -rm -f $(PROGS)
+       -rm -f *.o
+       -rm -f getproclist.h
 
 
 # auto code generation
index 3349fd5342856aa2782cb16711179f1256e7d0dd..28d63237a453767da98fae7216d75b2d7e88ab89 100644 (file)
@@ -40,9 +40,9 @@ INCLUDES = -I. -I$(TOP)/include -I../samples
 default: $(PROGS)
 
 clean:
-       rm -f $(PROGS)
-       rm -f *.o
-       rm -f getproclist.h
+       -rm -f $(PROGS)
+       -rm -f *.o
+       -rm -f getproclist.h
 
 
 
index f93987e6880b8c0e999946e90e24d97c0c3d9e7d..229beeaffa52e63a13c25400518544518e416597 100644 (file)
@@ -33,7 +33,7 @@ $(TOP)/$(LIB_DIR):
 
 
 clean:
-       @for dir in $(SUBDIRS) ; do \
+       -@for dir in $(SUBDIRS) ; do \
                if [ -d $$dir ] ; then \
                        (cd $$dir && $(MAKE) clean) ; \
                fi \
index 036bf1f01a17527f143bbd39e157908e9edc9f5e..fb4db8f9b9f6482f5cea1d15aee516ea0fb2bef2 100644 (file)
@@ -17,7 +17,7 @@ subdirs:
 
 
 clean:
-       @for dir in $(SUBDIRS) ; do \
+       -@for dir in $(SUBDIRS) ; do \
                if [ -d $$dir ] ; then \
                        (cd $$dir && $(MAKE) clean) ; \
                fi \
index ad2ef38a72fac1a811efcca95a950058e2a2a94e..9653c8805ccb21600c1d649f4d200a6d2610f593 100644 (file)
@@ -27,5 +27,5 @@ $(TOP)/$(LIB_DIR)/demodriver.so: $(OBJECTS)
 
 
 clean:
-       rm -f *.o
-       rm -f *.so
+       -rm -f *.o
+       -rm -f *.so
index 0214cf65a25c63341bef8277bf29f7083f0d8359..52d46cac564a0d4041ae787223bf953bcc85a65b 100644 (file)
@@ -47,8 +47,8 @@ $(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
 
 
 clean:
-       rm -f *.o
-       rm -f *.so
+       -rm -f *.o
+       -rm -f *.so
 
 depend: $(SOURCES) $(HEADERS)
        @ echo "running $(MKDEP)"
index 2a7046fb14538b5364d65da9c7a5ebb4f4f9f6a0..52e16a76e3aa99b8408cae9bccf011bf1bb7410f 100644 (file)
@@ -52,8 +52,8 @@ $(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
 
 
 clean:
-       rm -f *.o *.so*
-       rm -f core.*
+       -rm -f *.o *.so*
+       -rm -f core.*
 
 
 depend: $(SOURCES) $(HEADERS)
index 3ee5cfddd7a10afe283f0d6bc87c443e1781c4b4..23161b50156c5cbd5673ae0d6c019a5413d814dc 100644 (file)
@@ -28,6 +28,6 @@ install: glu.pc
        $(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
 
 clean:
-       @for dir in $(SUBDIRS) ; do \
+       -@for dir in $(SUBDIRS) ; do \
                (cd $$dir && $(MAKE) clean) ; \
        done
index a96e0dadaa79204e063f27612d2adeab360c4c19..e0ab4a024016bac5a609ad6442792242c546a6ab 100644 (file)
@@ -8,5 +8,5 @@ default:
 
 
 clean:
-       cd mini && $(MAKE) clean
+       -@cd mini && $(MAKE) clean
 
index d179636c6a2f7a0510f8e644b63167a31f2207ac..08d723553e8639b19a54a544ca9ad85107e01f52 100644 (file)
@@ -207,10 +207,10 @@ clean:
        -rm -f */*/*.o
        -rm -f depend depend.bak libmesa.a
        -rm -f drivers/*/*.o
-       (cd drivers/dri && $(MAKE) clean)
-       (cd drivers/xorg && $(MAKE) clean)
-       (cd x86 && $(MAKE) clean)
-       (cd x86-64 && $(MAKE) clean)
+       -@cd drivers/dri && $(MAKE) clean
+       -@cd drivers/xorg && $(MAKE) clean
+       -@cd x86 && $(MAKE) clean
+       -@cd x86-64 && $(MAKE) clean
 
 
 -include depend
index c515785b2a168cf7b592e36bb06a26d211c6d6fb..dc71b385cac752ff46b32ce033f62d50a2111c29 100644 (file)
@@ -50,5 +50,5 @@ install:
 
 
 clean:
-       rm -f *.o *.so
+       -rm -f *.o *.so
 
index 69a8c553947becc952fb1c3454bcd3e2cb25547c..c6464a2a244e419569cca88d8835b1efc1109a53 100644 (file)
@@ -33,7 +33,7 @@ install:
 
 
 clean:
-       @for dir in $(DRI_DIRS) ; do \
+       -@for dir in $(DRI_DIRS) ; do \
                if [ -d $$dir ] ; then \
                        (cd $$dir && $(MAKE) clean) ; \
                fi \
index b077809cd1860431810fd781f2d15eb107c28199..62ec919ea68c3e7113c327f208fa4032e7d6b80b 100644 (file)
@@ -57,8 +57,8 @@ all: options.h
 # Only intermediate files are cleaned up. options.h is not deleted because
 # it's in CVS. 
 clean:
-       rm -f $(POT) *~
-       rm -rf $(LANGS)
+       -rm -f $(POT) *~
+       -rm -rf $(LANGS)
 
 # Default target options.h
 options.h: t_options.h mo
index 858457ddd40118798e13b17145f47ba2ee5233d4..dc4abd44d4937fc9168fed27e63ef15c5a296148 100644 (file)
@@ -41,4 +41,4 @@ glslcompiler.o: glslcompiler.c
 
 
 clean:
-       rm -f *.o *~ $(PROGRAM)
+       -rm -f *.o *~ $(PROGRAM)
index 6520f75e134eec370bd235f47e906213a79cfaf0..13f5302b160d83876d89c67a4b0980637ca01d9b 100644 (file)
@@ -113,5 +113,5 @@ $(GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX
        $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@
 
 clean:
-       rm -f *~ *.pyo
-       rm -f $(OUTPUTS)
+       -rm -f *~ *.pyo
+       -rm -f $(OUTPUTS)
index dc67b590886d1ccc2f0efeeda10ff9c4c78f36ae..0e03fac2ee176ad8c296acf752785b1c3bac8869 100644 (file)
@@ -17,7 +17,7 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 default: syntax builtin
 
 clean:
-       rm -f syn_to_c gc_to_bin *_syn.h *_gc.h
+       -rm -f syn_to_c gc_to_bin *_syn.h *_gc.h
 
 syntax: slang_pp_directives_syn.h slang_pp_expression_syn.h slang_shader_syn.h slang_pp_version_syn.h
 
index 252218ca86b831bb79747fab19196bca93952062..c6b69bafe86011e1f8b79113284a41793464b702 100644 (file)
@@ -19,7 +19,7 @@ INCLUDE_DIRS = \
 default: matypes.h
 
 clean:
-       rm -f matypes.h
+       -rm -f matypes.h
 
 
 # need some special rules here, unfortunately
index 3c6a6b11c064961a7b232d8abd6aeca8dea329f5..dc8c7f355eb30283f914cebfdd801d28d94637b7 100644 (file)
@@ -17,7 +17,7 @@ INCLUDE_DIRS = \
 default: gen_matypes matypes.h
 
 clean:
-       rm -f matypes.h gen_matypes
+       -rm -f matypes.h gen_matypes
 
 
 gen_matypes: gen_matypes.c