add optimalization if build is already done

It is needed for big convert as it otherwise cause multiple yast2 compilation
that takes ages.