This is somewhat related to the question found at https://mathoverflow.net/questions/114090/what-is-the-dgla-controlling-the-deformation-theory-of-a-complex-submanifold, though not exactly the same, so I hope it's not duplicating too much.  There also seem to be a few threads about deformations of pairs where the sub-manifold is a hyper-surface, but this is not the case I'm interested in.

The basic question is: what are the basic obstructions to obtaining a deformation of a pair consisting of a complex, compact manifold $X$ and a compact, complex submanifold $M\subset X.$  Morally, I know this should involve the cohomology of the tangent sheaf to $X$ and the cohomology of the normal sheaf of $M\subset X.$

My current definition of a deformation of the pair $(X,M)$ is a tuple $(\mathcal{X},\mathcal{M},B,\pi,0)$
where $\mathcal{X}$ is a complex manifold, $\mathcal{M}\subset \mathcal{X}$ is a closed, complex submanifold, $B$ is a complex manifold and, 
\begin{align}
\pi:\mathcal{X}\rightarrow B,
\end{align}
is a proper, holomorphic submersion.  Furthermore, $\pi^{-1}(0)=X$ and $\pi^{-1}(0)\cap \mathcal{M}=M.$

The Kodaira-Spencer deformation theory tells us that if we don't care about $M,$ then a sufficient condition to obtain such a family is that the sheaf cohomology group vanishes; $H^2(X, TX)=0,$ where $TX$ is the sheaf of holomorphic vector fields.  In this case, the tangent space to the base is identified with the first sheaf cohomology group $H^{1}(X,TX)$ via the Kodaira-Spencer map.  On a related note, if we wish to deform $M$ inside of a fixed $X,$ then the first order obstruction comes from the first sheaf cohomology of $M$ with coefficients in the normal bundle of $M$ inside of $X.$  Nonetheless, I can't seem to find any basic references governing the deformation theory of the pair $(X,M),$ though I imagine to the right crowd this is very basic stuff.  

So, perhaps to just give one very specific question, is there a basic condition in addition to $H^2(X,TX)=0$ which guarantees that the deformation of $X$ induces a deformation of $M.$  Contrarily, when does a deformation of $M$ as a complex manifold extend to a deformation of $X?$

In the simplest case of a complex torus $X$ of dimension greater than $1,$ and some ellipctic curve $M\subset X,$ it seems likely that every deformation of $X$ gives rise to a deformation of $M$ and vice-versa.  But, at the moment I'm having some trouble fishing out what the necessary objects for this problem are. 

Thank you for your help.