ensure config.status is available before calling make clean
[ctsim.git] / debian / rules
index f3c8e882351b7418f58a7661b55783459e04e0ba..f462268329e0d7d99609e542363e130aa9fd4744 100755 (executable)
@@ -57,7 +57,7 @@ clean:
        dh_testdir
        dh_testroot
        rm -f build-arch-stamp build-indep-stamp configure-stamp
-       if [ -f Makefile ]; then $(MAKE) clean; fi
+       if [ -f Makefile -a -f config.status ]; then $(MAKE) clean; fi
        find . -type f -and -name \*~ -or -name .\*~ -exec rm -f {} \;
        rm -f debian/ctsim.postinst.* debian/ctsim.prerm.*
        # Ensure up-to-date versions of config.sub and config.guess