test -f Makefile && make clean which is better, isn't it? It will fail (and stop the build) when Makefile does not exist. Maybe you want test ! -f Makefile || make clean?