Hi all, This is my first attempt at modifying the Makefile.am, to have some extra work done for me automatically.
I've been working on my documentation for CGDB lately, and found a nifty program called help2man which generates a simple man page. It looks at the output of both 'cgdb --version' and 'cgdb --help'. Parses the output, and generates a man page. I have moved the 'usage ()' function in my application to it's own file called usage.c. I would like to set it up so that whenever that file is modified, a new man page is generated with help2man. That way, the man page never get's out of sync with the actual usage of CGDB. One problem is, if the file usage.c is modified, then I have to set a flag somewhere to tell me that I need to run help2man. However, I can't run help2man until after the entire build is done. (CGDB needs to be linked in order to run it.) My doc directory is built after all others. I was thinking I could have a rule in the doc directory that would run help2man if usage.c has changed. However, if usage.c was changed, by this point, the usage.o has already been built, so I don't know how I would be able to determine I need to run this command. Any suggestions or help would be great. Thanks, Bob Rossi