Fourier series is applied for periodic signals since they
violate Dirchilet's conditions. This will give the
fundamental and harmonic signal components for periodic
signals.
For non-periodic signals if we need frequency analysis as a
whole then fourier transform is applied for the entire
duration. Provided its energy is finite and follows other
conditions as laid out by Dirchilet.
If a finer time resolution is required then short-time
fourier transform is applied.
http://www.vinaymk.com