Tools for automating document compilation
How do I handle building complicated and large LaTeX projects?
Is there a makefile system (like GNU Make) or should I just write my own shell scripts (what I'm doing now)?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
LaTeXMk is a Pearl script that is very intelligent about different TeX systems, whether or not you need
Give it a shot!