MikTeXnicians,
 
I am writing a perl script that will take a metapost file and compile it and then generate appropriate .eps and .pdf files so that the resulting graphis is viewable in yap, gsview, and reader. I have a working script except for one technicality -- even if the metapost file has not been modified, the commands to generate the .eps and .pdf files still get executed. How can I test for whether or not the .mp has been modified or not since the last compilation? Would simply comparing to the .mpx file be sufficient? What if it doesn't exist -- or does it always exist?
 
The script is part of a winedt macro that compiles jobname.mp if it exists, generates the .eps and .pdf files, and then compiles the latex document jobname.tex and finally views through yap, gsview, or reader.
 
Walter Kehowski