improved 'clean' targets (Otto Solares)
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 3 Oct 2003 14:03:14 +0000 (14:03 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 3 Oct 2003 14:03:14 +0000 (14:03 +0000)
13 files changed:
Makefile.X11
progs/demos/Makefile.X11
progs/redbook/Makefile.X11
progs/samples/Makefile.X11
progs/xdemos/Makefile.X11
src/glu/mesa/Makefile.X11
src/glu/mini/Makefile.X11
src/glu/sgi/Makefile.X11
src/glut/mini/Makefile.X11
src/glw/Makefile.X11
src/glx/mini/Makefile.X11
src/mesa/Makefile.X11
src/mesa/drivers/dri/r200/Makefile.X11

index 944553019808c3e7e4aa1590ae39d58e54f674e1..39fae1ccffb26c528927f9020bcb4d9abe901b83 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.X11,v 1.89 2003/09/30 11:28:16 alanh Exp $
+# $Id: Makefile.X11,v 1.90 2003/10/03 14:03:14 brianp Exp $
 
 # Mesa 3-D graphics library
 # Version:  5.1
@@ -269,24 +269,54 @@ linux-solo:
 
 # Remove .o files, emacs backup files, etc.
 clean:
-       -rm -f src/mesa/*/*.o
-       -rm -f src/mesa/drivers/*/*.o
-       -rm -f src/mesa/drivers/*/*/*.o
-       -rm -f src/mesa/drivers/*/*/*/*.o
-       -rm -f include/*~
+       if ! [ -f src/mesa/depend      ] ; then touch src/mesa/depend      ; fi
+       if ! [ -f src/mesa/drivers/dri/r200/depend ];   then touch src/mesa/drivers/dri/r200/depend;   fi
+       if ! [ -f src/mesa/drivers/dri/r128/depend ];   then touch src/mesa/drivers/dri/r128/depend;   fi
+       if ! [ -f src/mesa/drivers/dri/radeon/depend ]; then touch src/mesa/drivers/dri/radeon/depend; fi
+       if ! [ -f src/mesa/drivers/dri/mga/depend ];    then touch src/mesa/drivers/dri/mga/depend;    fi
+       if ! [ -f src/mesa/drivers/dri/fb/depend ];     then touch src/mesa/drivers/dri/fb/depend;     fi
+       if ! [ -f src/glu/mesa/depend  ] ; then touch src/glu/mesa/depend  ; fi
+       if ! [ -f src/glu/sgi/depend   ] ; then touch src/glu/sgi/depend   ; fi
+       if ! [ -f src/glu/mini/depend  ] ; then touch src/glu/mini/depend  ; fi
+       if ! [ -f src/glut/glx/depend  ] ; then touch src/glut/glx/depend  ; fi
+       if ! [ -f src/glut/mini/depend ] ; then touch src/glut/mini/depend ; fi
+       if ! [ -f src/glx/mini/depend  ] ; then touch src/glx/mini/depend  ; fi
+       if ! [ -f progs/tests/depend   ] ; then touch progs/tests/depend   ; fi
+       if ! [ -f progs/miniglx/depend ] ; then touch progs/miniglx/depend ; fi
        -rm -f include/GL/*~
-       -rm -f src/glu/mesa/*.o src/glu/mesa/*~ src-glu/*.a
-       -rm -f src/glu/sgi/*/*.o src/glu/sgi/*/*/*.o
-       -rm -f src/glut/glx/*.o
-       -rm -f src/miniglx/*.o
-       -rm -f src/miniglu/*.o
-       -rm -f src/miniglut/*.o
-       -rm -f progs/demos/*.o
-       -rm -f progs/redbook/*.o progs/redbook/*~
-       -rm -f progs/xdemos/*.o progs/xdemos/*~
-       -rm -f progs/samples/*.o progs/samples/*~
-       -rm -f progs/tests/*.o progs/tests/*~
-       -rm -f src/glw/*.o
+       cd src/mesa          && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/mesa/drivers/dri/r200   && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/mesa/drivers/dri/r128   && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/mesa/drivers/dri/radeon && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/mesa/drivers/dri/mga    && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/mesa/drivers/dri/fb     && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/glu/mesa      && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/glu/sgi       && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/glu/mini      && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/glut/glx      && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/glut/mini     && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/glw           && $(MAKE) -f Makefile.X11 $@ || true
+       cd src/glx/mini      && $(MAKE) -f Makefile.X11 $@ || true
+       cd progs/demos       && $(MAKE) -f Makefile.X11 $@ || true
+       cd progs/redbook     && $(MAKE) -f Makefile.X11 $@ || true
+       cd progs/xdemos      && $(MAKE) -f Makefile.X11 $@ || true
+       cd progs/samples     && $(MAKE) -f Makefile.X11 $@ || true
+       cd progs/tests       && $(MAKE) -f Makefile.X11 $@ || true
+       cd progs/miniglx     && $(MAKE) -f Makefile.X11 $@ || true
+       if [ -f src/mesa/depend      ] ; then rm src/mesa/depend      ; fi
+       if [ -f src/mesa/drivers/dri/r200/depend ];   then rm -f src/mesa/drivers/dri/r200/depend;   fi
+       if [ -f src/mesa/drivers/dri/r128/depend ];   then rm -f src/mesa/drivers/dri/r128/depend;   fi
+       if [ -f src/mesa/drivers/dri/radeon/depend ]; then rm -f src/mesa/drivers/dri/radeon/depend; fi
+       if [ -f src/mesa/drivers/dri/mga/depend ];    then rm -f src/mesa/drivers/dri/mga/depend;    fi
+       if [ -f src/mesa/drivers/dri/fb/depend ];     then rm -f src/mesa/drivers/dri/fb/depend;     fi
+       if [ -f src/glu/mesa/depend  ] ; then rm -f src/glu/mesa/depend  ; fi
+       if [ -f src/glu/sgi/depend   ] ; then rm -f src/glu/sgi/depend   ; fi
+       if [ -f src/glu/mini/depend  ] ; then rm -f src/glu/mini/depend  ; fi
+       if [ -f src/glut/glx/depend  ] ; then rm -f src/glut/glx/depend  ; fi
+       if [ -f src/glut/mini/depend ] ; then rm -f src/glut/mini/depend ; fi
+       if [ -f src/glx/mini/depend  ] ; then rm -f src/glx/mini/depend  ; fi
+       if [ -f progs/tests/depend   ] ; then rm -f progs/tests/depend   ; fi
+       if [ -f progs/miniglx/depend ] ; then rm -f progs/miniglx/depend ; fi
 
 # Remove everything that can be remade
 realclean: clean
index 74e92fa2880e9a9649ec9364c9bafdcf761a4a63..a26ed3d398ba950aacaa31fcde82505e34d260ff 100644 (file)
@@ -81,12 +81,12 @@ default:
        @echo "Specify a target configuration"
 
 clean:
-       -rm *.o *~
+       -rm -f *.o *~
 
 realclean:
-       -rm $(PROGS)
-       -rm *.o *~
-       -rm readtex.[ch]
+       -rm -f $(PROGS)
+       -rm -f *.o *~
+       -rm -f readtex.[ch]
 
 targets: readtex.c readtex.h $(PROGS)
 
index f72ea44cd4ed9313566ffb600146547fb174fc7b..aa3585cfe4b7d5ba32dca7c10a67df3982857b05 100644 (file)
@@ -38,11 +38,11 @@ default:
        @echo "Specify a target configuration"
 
 clean:
-       -rm *.o *~
+       -rm -f *.o *~
 
 realclean:
-       -rm $(PROGS)
-       -rm *.o *~
+       -rm -f $(PROGS)
+       -rm -f *.o *~
 
 targets: $(PROGS)
 
index 8a63517951e8a676083bac3ddd784d2654f4376b..d7efd25cd57e9605cb4ff1f38602011092f38517 100644 (file)
@@ -32,11 +32,11 @@ default:
        @echo "Specify a target configuration"
 
 clean:
-       -rm *.o *~
+       -rm -f *.o *~
 
 realclean:
-       -rm $(PROGS)
-       -rm *.o *~
+       -rm -f $(PROGS)
+       -rm -f *.o *~
 
 targets: $(PROGS)
 
index 264fc2491c5ea69a8323d5c41ad797b9878d0a7d..de2273c5e4a24fec7b322df308231a0e2f48715c 100644 (file)
@@ -61,11 +61,11 @@ default:
        @echo "Specify a target configuration (i.e. make -f Makefile.X11 linux)"
 
 clean:
-       -rm *.o *~
+       -rm -f *.o *~
 
 realclean:
-       -rm $(PROGS)
-       -rm *.o *~
+       -rm -f $(PROGS)
+       -rm -f *.o *~
 
 targets: $(PROGS)
 
index b50db58c36f65c0d40190f6610c3554b54413e12..2265620fe6b1f61370a4628be33f20bd40e39a80 100644 (file)
@@ -34,7 +34,7 @@ default:
        @echo "Specify a target configuration"
 
 clean:
-       -rm *.o *~
+       -rm -f *.o *~
 
 targets: $(LIBDIR)/$(GLU_LIB)
 
index d0ef2e50f06458a4aa3a6e21109cdb188685b280..4462d5626121944381fbff2f462467db190bc707 100644 (file)
@@ -39,7 +39,7 @@ targets: depend libGLU.so.1.1 install
 libGLU.so.1.1: $(OBJS) Makefile.X11
        gcc -shared -Wl,-soname,libGLU.so -Wl,-Bsymbolic $(OBJS) $(LIBS) -o $@ 
 
-install:
+install: libGLU.so.1.1
        rm -f $(TOP)/lib/libGLU.so*
        install -D libGLU.so.1.1 $(TOP)/lib/libGLU.so.1.1
        ln -s libGLU.so.1.1 $(TOP)/lib/libGLU.so.1
@@ -58,7 +58,7 @@ tags:
 
 # Remove .o and backup files
 clean:
-       -rm -f *.o *~ *.o *~ *.so
+       -rm -f *.o *~ *.o *~ *.so libGLU.so.1.1
 
 include $(TOP)/Make-config
 
index 76befaa0fa466134909dac37f58db527348414be..7202aa84ffbce8b44013c0e57a12446c3e42aa31 100644 (file)
@@ -131,9 +131,9 @@ default:
        @echo "Specify a target configuration"
 
 clean:
-       -rm *.o */*.o */*/*.o
-       -rm *.lo */*.lo */*/*.lo
-       -rm *.la */*.la */*/*.la
+       -rm -f *.o */*.o */*/*.o
+       -rm -f *.lo */*.lo */*/*.lo
+       -rm -f *.la */*.la */*/*.la
 
 
 targets: $(LIBDIR)/$(GLU_LIB)
index 097a665e4ec655b1b162051d87c7b8c16ea9fccf..bbdc6a690ce5a26396469d5484cb6c03e6aca7a2 100644 (file)
@@ -52,7 +52,7 @@ targets: depend libglut.so.3.7 install
 libglut.so.3.7: $(OBJS) Makefile.X11
        gcc -shared -Wl,-soname,libglut.so -Wl,-Bsymbolic $(OBJS) $(LIBS) -o $@ 
 
-install:
+install: libglut.so.3.7
        rm -f $(TOP)/lib/libglut.so*
        install -D libglut.so.3.7 $(TOP)/lib/libglut.so.3.7
        ln -s libglut.so.3.7 $(TOP)/lib/libglut.so.3
@@ -70,8 +70,8 @@ tags:
 
 
 # Remove .o and backup files
-clean:
-       -rm -f *.o *~ *.o *~ *.so
+clean: depend
+       -rm -f *.o *~ *.o *~ *.so libglut.so.3.7
 
 include $(TOP)/Make-config
 
index 90b7f9d35ff2a469586304923a69b6f2bfb68a2f..888aebd52cd2d03554c800b81dd9f8339725e8e3 100644 (file)
@@ -38,7 +38,7 @@ default:
        @echo "Specify a target configuration"
 
 clean:
-       -rm *.o *~
+       -rm -f *.o *~
 
 targets: $(LIBDIR)/$(GLW_LIB) message
 
index 2e818f0b01703710a2394f1c7f955965d9ae7d07..115854393a730bec7bef1944ccf033c161c562c0 100644 (file)
@@ -71,7 +71,8 @@ tags:
 # Remove .o and backup files
 clean:
        -rm -f drmtest $(TOP)/lib/libGL.so*
-       -rm -f */*.o */*~ */*.o */*~
+       -rm -f libGL.so*
+       -rm -f *.o *~
 
 
 include $(TOP)/Make-config
index 12790a56b74dc54beee40c63abe39e6b5e963e06..373608a325de832992219ed7875befcb175758eb 100644 (file)
@@ -348,9 +348,9 @@ tags:
 
 # Remove .o and backup files
 clean:
-       -rm *.a
+       -rm -f *.a
        -rm -f */*.o */*~ */*.o */*~
-       -rm -f drivers/*/*.o
+       -rm -f drivers/*/*.o drivers/*/*/*.o
 
 
 include $(TOP)/Make-config
index 2c73f4d521249514bcfb8c9b1c4b1202489830e4..62f4b4b94c1b466b64e8f9acb9b8fb43ffaaa9a4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.X11,v 1.3 2003/09/30 10:29:15 alanh Exp $
+# $Id: Makefile.X11,v 1.4 2003/10/03 14:03:18 brianp Exp $
 
 # Mesa 3-D graphics library
 # Version:  5.0
@@ -133,6 +133,7 @@ tags:
 # Remove .o and backup files
 clean:
        -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
+       -rm -f $(SYMLINKS)
 
 
 include $(TOP)/Make-config