In this paper we establish necessary and sufficient conditions which an arbitrary minimal and complete system of eigenfunctions and associated functions of a Sturm--Liouville operator with discontinuous coefficients must satisfy in order to have the basis property in the sense of V.A.~Il'in [1].