outputfile ()
outputfile ("prefix
")
Return name of output file.
If constant string prefix
is provided, a concatenation of
prefix
and output file is returned. Generally, you can
simply use the former syntax and concatenate the strings (prefix
+ outputfile ()) but - if you use Cows-mkgen to create
makefiles - functions introducing dependencies (verbatim (), include (), fdate (), fsize ()) need a constant string or the inputfile () and outputfile ()
functions.
So, the expression fdate (outputfile ("../")) is safe, while fdate ("../" + outputfile ()) will result in a wrong dependency. Remember that Cows-mkgen tells you about this wrong dependency raising a warning.
This discussion is here in analogy with inputfile () features but is purely academical: I don't think you'll ever make some operation on output file since it has not been created yet ! This function is useful to get output file's name, but the file will be created after parsing so you can't do any operation on it.
This manual can be downloaded from http://www.g-cows.org/.