Here's a way that uses the fabulous arara tool to implement @egreg's solution
main.tex
% arara: makechapters: {items: [lions, zebras]}
\documentclass{report}
\begin{document}
\include{lions}
\include{zebras}
\end{document}
When you call
arara main.tex
you will get lions.pdf and zebras.pdf. You can list any number of chapter files in the items argument, and you can also choose to set compileAll: off if you don't want to compile main.tex first. The default is compileAll: on, and I'd recommend only turning it off if you are 100% sure that the necessary .aux files are up to date.
For a big document, it'll take a while, but it's the kind of thing that you set running before stepping away from your desk for a bit.
makechapters.yaml
!config
# Make chapter files rule for arara
# author: Chris Hughes
# last edited by: cmh, May 20th 2013
# http://tex.stackexchange.com/questions/31334/how-to-create-individual-chapter-pdfs
# requires arara 3.0+
#
# Sample usage: Assume you have the following directives in main.tex, with chapter files
# lions.tex, zebras.tex
#
# % arara: makechapters: {items: [lions]}
# % arara: makechapters: {items: [lions, zebras]}
# % arara: makechapters: {items: [lions, zebras], compileAll: no}
# % arara: makechapters: {items: [lions, zebras], compileAll: yes}
#
# which will create lions.pdf, zebras.pdf
#
# Note that, by default, this compiles main.tex first so that all of the necessary .aux
# files are generated- this is vital for cross referencing to work, particularly in
# the case of a *forward* cross reference (e.g chapter 2 refers to chapter 3).
#
# If you set compileAll to false/no/off, then it will *not* compile the main file
# first- be careful with this one, as the necessary .aux files may not be present, and
# your cross references may break.
identifier: makechapters
name: MakeChapters
commands:
- <arara> @{ isTrue( compileAll, engine.concat(' "').concat(file).concat('"') )}
- <arara> @{engine} -jobname=tmpCMH "\includeonly{@{item}}\input{@{file}}"
- <arara> @{engine} -jobname=tmpCMH "\includeonly{@{item}}\input{@{file}}"
- <arara> @{ isWindows( "cmd /c move", "mv" ) } tmpCMH.pdf @{item}.pdf
arguments:
- identifier: engine
flag: <arara> @{parameters.engine}
default: pdflatex
- identifier: compileAll
flag: <arara> @{parameters.compileAll}
default: true
hyperrefpackage, that is perhaps less work. – Torbjørn T. Oct 12 '11 at 14:41