Module: Mesa
Branch: master
Commit: c3168e050eabff55e12485c8648f4cf0744182c1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3168e050eabff55e12485c8648f4cf0744182c1

Author: José Fonseca <jfons...@vmware.com>
Date:   Sun Feb 14 13:15:49 2010 +0000

makefiles: Don't complaint about changing configs if the same one is reselected.

Otherwise it creates unnecessary pain when automating builds in a build
server/farm.

---

 Makefile |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 3a9c92b..ea5751d 100644
--- a/Makefile
+++ b/Makefile
@@ -173,11 +173,14 @@ sunos5-v9 \
 sunos5-v9-static \
 sunos5-v9-cc-g++ \
 ultrix-gcc:
-       @ if test -f configs/current || test -L configs/current ; then \
-               echo "Please run 'make realclean' before changing configs" ; \
-               exit 1 ; \
+       @ if test -f configs/current -o -L configs/current; then \
+               if ! cmp configs/$@ configs/current > /dev/null; then \
+                       echo "Please run 'make realclean' before changing 
configs" ; \
+                       exit 1 ; \
+               fi ; \
+       else \
+               cd configs && rm -f current && ln -s $@ current ; \
        fi
-       (cd configs && rm -f current && ln -s $@ current)
        $(MAKE) default
 
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to