fixed conditional build when clean-all is specified first