Sometimes, single source files need a special treatment; of course Cows-mkgen can't guess exactly what you want and you can't provide more informations from the command line because these options would apply to the whole site.
So, we need an easy way to give more hints to Cows-mkgen.
If you don't want to create an html file from a source (i.e. if a source is meant to be included from other files and not used directly), you have to tell Cows-mkgen about it. Simply place the following directive within a comment (so Cows won't raise an error when it finds the unknown token):
__NO_OUTPUT__
Please note that you can also use a different extension (e.g. .foo) in order to hide the script from Cows-mkgen but I find this directive much more elegant.
To exclude whole directories see Section 6.7.
Cows-mkgen generates a makefile whose targets have .html extension; this can be changed with command line options (see Section 6.4.1) or via the options file (see Section 6.4.2).
This is not enough since sites often consist in files with different extensions (css for Style Sheets, php or phtml for php, js for JavaScript and so on) so you need a way to choose extensions file by file. Simply place the following directive within a comment (so Cows won't raise an error when it finds the unknown token):
__EXT__ extension
Extension must be provided without the trailing dot (phtml, not .phtml) as in:
__EXT__ phtml
Sources containing the __ALWAYS__ directive will be processed every time you run Make, regardless to dependencies. This can be useful when Cows-mkgen is unable to track dependencies: (see Section 24.1 for further details).
Warnings about missing dependency in a given source file will be correctly suppressed when the __ALWAYS__ directive is used.
Sometimes, Cows is not able to track all dependencies: as an example, this happens when you execute an external scripts (Section 23.3) which itself introduce a dependency. The __DEP__ directive allow to manually specify a dependency:
__DEP__ file
Let's say that file foo.cws contain the directive __DEP__ some.txt. Cows-mkgen, when generating makefile, will create a list of files foo.html depends on, and add some.txt to the list.
File name must be relative to the current directory: if file /site-root/a/b/foo.cws depend upon /site-root/a/some.txt, the correct directive is: __DEP__ ../some.txt
Note: Directives for Cows-mkgen are not part of Cows language (that's why they must be commented out) so they have a very simple syntax. __DEP__, in particular, accept a single argument (no whitespaces). __DEP__ foo.sh bar.sh won't work (only foo.sh will be added to the list). The following will do the trick: __DEP__ foo.sh __DEP__ bar.sh.
However, expressions like __DEP__ images/*.jpg are OK, since images/*.jpg is a single word.
This manual can be downloaded from http://www.g-cows.org/.