In LaTeX, the \includeonly statement exists to selectively add or exclude sub-documents.
One quirk in the whole process is that when sections are excluded, LaTeX decides to insert a page-break. The article at http://stackoverflow.com/questions/1209065/to-have-no-pagebreak-after-include-in-latex recommends using newclude to avoid this issue. This package defines \include* which provides a work-around by omitting the implied \clearpage.
I am occasionally seeing the behaviour where if I comment out lines of my \includeonly statement the sub-document still gets included. Has anyone else seen this behaviour?