diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-02-14 13:15:49 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-02-14 13:15:49 +0000 |
commit | c3168e050eabff55e12485c8648f4cf0744182c1 (patch) | |
tree | d06002b6d9bc53da089ceeff0c4880059598921b | |
parent | 4ab3f0edef438334d70d26381e3b2acdc48b176b (diff) |
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.
-rw-r--r-- | Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 |