Command line options -prefix and -root-dir, as well as options file directives prefix and root-dir, allow to keep sources and resulting files separated. This is very useful, since you can move or archive the directory storing resulting files without including sources.
However, achieving this separation can be very difficult. Problems arise from the lack of a real difference between sources and output files. Of course, when you process a file through Cows, it's clear what's the source and what's the output. But what if you have a very simple page which doesn't need any Cows' feature ? You'll probably write the HTML file directly, and you'll end up with a file which someway is both a source and an output.
It's a source, since you wrote it, and should be kept with other sources; otherwise you should look in two different places when updating your site.
It's conceptually also an output, and should be kept with output files, otherwise you'd miss it when moving the files on the server.
The same problem arises with images and style sheets. A solution consist in placing these files within sources, and create symbolic links within output directory. This is a good solution when all these files are stored in a few directories like images, css etc. However, if you plan to transfer your site via ftp, you have to make sure that your ftp client can handle symbolic links. I've seen an ftp client able to send a whole directory tree which didn't follow links!
Otherwise, we can leave sources and targets n the same directory and rely on a simple way to pack our site in order to move it to a server without including the sources. Cows-mkgen, if neither -prefix nor -root-dir option is used (as well as corresponding options file directives) understands we are keeping sources and output together, and generate an additional target called sitedist.
So, simply type make sitedist to get an archive of the current directory without sources. Of course, carefully check the archive before publishing your site !
You can start building a site keeping sources and output file together (in other words you don't use neither -prefix nor -root-dir) and later decide to switch to another technique. In this case, you have to check carefully your site. If you use the inputfile () or outputfile () functions (e.g. for building links ) moving sources and output files into a new directory will affect file names returned by these functions.
The changes needed to fix these problems (if any) are trivial; the hard part is remembering that you need them. Of course you can also write your scripts so that they are not affected by these changes, but the time needed is probably not worth it.
This manual can be downloaded from http://www.g-cows.org/.