ensure config.status is available before calling make clean
[ctsim.git] / debian / rules
index 411b28cc6acc3ce630475dcd3b9dbdcdb8e9bf4b..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
@@ -71,7 +71,7 @@ install: DH_OPTIONS=
 install: build
        dh_testdir
        dh_testroot
-       dh_clean -k
+       dh_prep
        dh_installdirs
        #
        dh_installdirs -p $(pkg-help) $(ctsim-shared)
@@ -119,8 +119,8 @@ binary-arch: build install
        dh_fixperms -a
        dh_installmenu -a
        dh_installdeb -a
-       dh_gencontrol -a
        dh_shlibdeps -a
+       dh_gencontrol -a
        dh_md5sums -a
        dh_builddeb -a