OSDN Git Service

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 df0a0e9..96d3885 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 d8dd555..15ade40 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 5e705ef..c99f4ee 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 491e8e4..0dc4cdc 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 0721560..416d2c0 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 56daf56..3940124 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 a395b73..09f22d1 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 5d0c8ea..d5258b0 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 ea1e9b6..c93caea 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 116a19b..cf8e0bf 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 7610a5d..6fa51ce 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 3349fd5..28d6323 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 f93987e..229beea 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 036bf1f..fb4db8f 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 ad2ef38..9653c88 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 0214cf6..52d46ca 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 2a7046f..52e16a7 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 3ee5cfd..23161b5 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 a96e0da..e0ab4a0 100644 (file)
@@ -8,5 +8,5 @@ default:
 
 
 clean:
-       cd mini && $(MAKE) clean
+       -@cd mini && $(MAKE) clean
 
index d179636..08d7235 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 c515785..dc71b38 100644 (file)
@@ -50,5 +50,5 @@ install:
 
 
 clean:
-       rm -f *.o *.so
+       -rm -f *.o *.so
 
index 69a8c55..c6464a2 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 b077809..62ec919 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 858457d..dc4abd4 100644 (file)
@@ -41,4 +41,4 @@ glslcompiler.o: glslcompiler.c
 
 
 clean:
-       rm -f *.o *~ $(PROGRAM)
+       -rm -f *.o *~ $(PROGRAM)
index 6520f75..13f5302 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 dc67b59..0e03fac 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 252218c..c6b69ba 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 3c6a6b1..dc8c7f3 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