Christian Weiske has posted a guide to generate CHM files dynamically in in a Wine instance on a machine running some form of Linux.
The only way to generate .chm files is to use Microsoft's HTML Help Compiler hhc.exe from the HTML Help Workshop. It can be downloaded free of charge from their website. While the workshop tool is a GUI application, hhc.exe can run completely without any windowing environment on a server - ideal for an headless web server like pear.php.net. I already got it running on my Linux desktop at home using Wine, so I chose to go the same way on the server.
He actually starts out the post with a brief history of some of the work that's been done on the PhD tool to incorporate things like screenshots and image support as well as improvements to character set handling.
As far as installing the Help Complier, he offers two helpful tips on things to watch for - the need for X forwarding to display the windows for the installation and a need to install some extra DLL files to correct this bug with Wine.