  We study the thermodynamics of clean structures composed of superconductor
(S) and ferromagnet (F) layers and consisting of one or more SFS junctions. We
use fully self consistent numerical methods to compute the condensation free
energies of the possible order parameter configurations as a function of
temperature $T$. As $T$ varies, we find that there are phase transitions
between states characterized by different junction configurations (denoted as
``0'' or ``$\pi$'' according to the phase difference of the order parameter in
consecutive S layers). We show that these transitions are of first order. We
calculate the associated latent heats and find them to be measurable.
