/*
 *	recite - english text speech synthesizer
 *	Copyright (C) 1991, 1992, 1993 Peter Miller.
 *	All rights reserved.
 *
 *	This program is free software; you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation; either version 1, or (at your option)
 *	any later version.
 *
 *	This program is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with this program; if not, write to the Free Software
 *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * MANIFEST: instructions to aegis, per-project configuration
 */

/*
 * how to build the project
 */
build_command = "cook -b ${s aux/Howto.cook} project=$p change=$c version=$v -nl";

/*
 * When do -Integrate_Begin, link the baseline to the integration directory,
 * rather than copying it.  This should be much faster.
 *
 * There is a gotcha: all the recipes in Howto.cook must unlink their targets
 * before re-creating them, otherwise the baseline will be trashed.
 */
link_integration_directory = true;

/*
 * create a new history
 */
history_create_command = "fhist ${b $h} -create -i $in -p ${d $h} -r";

/*
 * get a file from history
 */
history_get_command = "fhist ${b $h} -e '$edit' -o $out -p ${d $h} -v 0";

/*
 * add a new change to the history
 */
history_put_command = "fhist ${b $h} -u -i $in -p ${d $h} -r";

/*
 * query the topmost edit of a history file
 * Result to be printed on stdout.
 */
history_query_command = "fhist ${b $h} -l 0 -p ${d $h} -q";

/*
 * difference of 2 files
 */
diff_command = "fcomp -w -s $orig $in -o $out";

/*
 * difference of 3 files
 */
diff3_command = "fmerge $orig $mr $in -o $out -c /dev/null";

/*
 * whenever files are added to or removed from the change,
 * execute the following command.
 */
change_file_command = "rm -f .c_inclrc";

/*
 * new file templates
 */
file_template =
[
	{
		pattern = [ "*.[cyl]" ];
		body ="\
/*\n\
 *	recite - english text speech synthesizer\n\
 *	Copyright (C) ${date %Y} Peter Miller.\n\
 *	All rights reserved.\n\
 *\n\
 *	This program is free software; you can redistribute it and/or modify\n\
 *	it under the terms of the GNU General Public License as published by\n\
 *	the Free Software Foundation; either version 1, or (at your option)\n\
 *	any later version.\n\
 *\n\
 *	This program is distributed in the hope that it will be useful,\n\
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
 *	GNU General Public License for more details.\n\
 *\n\
 *	You should have received a copy of the GNU General Public License\n\
 *	along with this program; if not, write to the Free Software\n\
 *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
 *\n\
 * MANIFEST: functions to manipulate ${basename $fn .c}s\n\
 */\n\
\n\
#include <${b $fn .c}.h>\n";
	},
	{
		pattern = [ "*.h" ];
		body = "\
/*\n\
 *	recite - english text speech synthesizer\n\
 *	Copyright (C) ${date %Y} Peter Miller.\n\
 *	All rights reserved.\n\
 *\n\
 *	This program is free software; you can redistribute it and/or modify\n\
 *	it under the terms of the GNU General Public License as published by\n\
 *	the Free Software Foundation; either version 1, or (at your option)\n\
 *	any later version.\n\
 *\n\
 *	This program is distributed in the hope that it will be useful,\n\
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
 *	GNU General Public License for more details.\n\
 *\n\
 *	You should have received a copy of the GNU General Public License\n\
 *	along with this program; if not, write to the Free Software\n\
 *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
 *\n\
 * MANIFEST: interface definition for ${b $fn .h}.c\n\
 */\n\
\n\
#ifndef ${upcase ${id $fn}}\n\
#define ${upcase ${id $fn}}\n\
\n\
#include <main.h>\n\
\n\
#endif /* ${upcase ${id $fn}} */\n";
	},
	{
		pattern = [ "test/*/*.sh" ];
		body = "\
#! /bin/sh\n\
#\n\
#	recite - english text speech synthesizer\n\
#	Copyright (C) ${date %Y} Peter Miller.\n\
#	All rights reserved.\n\
#\n\
#	This program is free software; you can redistribute it and/or modify\n\
#	it under the terms of the GNU General Public License as published by\n\
#	the Free Software Foundation; either version 1, or (at your option)\n\
#	any later version.\n\
#\n\
#	This program is distributed in the hope that it will be useful,\n\
#	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
#	GNU General Public License for more details.\n\
#\n\
#	You should have received a copy of the GNU General Public License\n\
#	along with this program; if not, write to the Free Software\n\
#	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
#\n\
# MANIFEST: Test the ??? functionality\n\
#\n\
\n\
work=/tmp/$$$$\n\
PAGER=cat\n\
export PAGER\n\
\n\
here=`pwd`\n\
if test $$? -ne 0 ; then exit 1; fi\n\
\n\
fail()\n\
{\n\
	set +x\n\
	echo FAILED test of ... 1>&2\n\
	rm -rf $$work\n\
	exit 1\n\
}\n\
pass()\n\
{\n\
	set +x\n\
	cd $$here\n\
	rm -rf $$work\n\
	exit 0\n\
}\n\
trap \"fail\" 1 2 3 15\n\
\n\
mkdir $$work\n\
if test $$? -ne 0 ; then exit 1; fi\n\
cd $$work\n\
if test $$? -ne 0 ; then fail; fi\n\
\n\
#\n\
# put your test here\n\
#\n\
$$here/myprog\n\
if test $$? -ne 0 ; then fail; fi\n\
\n\
#\n\
# Only definite negatives are possible.\n\
# The functionality exercised by this test appears to work,\n\
# no other guarantees are made.\n\
#\n\
pass\n";
	},
	{
		pattern = [ "*.sh" ];
		body = "\
#! /bin/sh\n\
#\n\
#	recite - english text speech synthesizer\n\
#	Copyright (C) ${date %Y} Peter Miller.\n\
#	All rights reserved.\n\
#\n\
#	This program is free software; you can redistribute it and/or modify\n\
#	it under the terms of the GNU General Public License as published by\n\
#	the Free Software Foundation; either version 1, or (at your option)\n\
#	any later version.\n\
#\n\
#	This program is distributed in the hope that it will be useful,\n\
#	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
#	GNU General Public License for more details.\n\
#\n\
#	You should have received a copy of the GNU General Public License\n\
#	along with this program; if not, write to the Free Software\n\
#	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
#\n\
# MANIFEST: shell script to ${b $fn .sh}\n\
#\n\
\n\
exit 0\n";
	},
	{
		pattern = [ "*.man", "*.[12345678]" ];
		body = "\
'\\\" t\n\
.\\\"	recite - english text speech synthesizer\n\
.\\\"	Copyright (C) ${date %Y} Peter Miller.\n\
.\\\"	All rights reserved.\n\
.\\\"\n\
.\\\"	This program is free software; you can redistribute it and/or modify\n\
.\\\"	it under the terms of the GNU General Public License as published by\n\
.\\\"	the Free Software Foundation; either version 1, or (at your option)\n\
.\\\"	any later version.\n\
.\\\"\n\
.\\\"	This program is distributed in the hope that it will be useful,\n\
.\\\"	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
.\\\"	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
.\\\"	GNU General Public License for more details.\n\
.\\\"\n\
.\\\"	You should have received a copy of the GNU General Public License\n\
.\\\"	along with this program; if not, write to the Free Software\n\
.\\\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
.\\\"\n\
.\\\" MANIFEST: manual page describing ${b $fn .1}\n\
.\\\"\n\
.TH recite 1\n\
.if n .ad l\n\
.if n .hy 0\n\
.SH NAME\n\
recite \\- english text speech synthesizer\n\
.SH SYNOPSIS\n\
.B recite\n\
[\n\
.IR option \\&...\n\
]\n\
.IR filename \\&...\n\
.br\n\
.B recite\n\
.B -Help\n\
.br\n\
.B recite\n\
.B -VERSion\n\
.SH DESCRIPTION\n\
The\n\
.I recite\n\
program is used to\n\
.SH OPTIONS\n\
The following options are understood:\n\
.TP 8n\n\
.B -Help\n\
.br\n\
Provide some help with using the\n\
.I recite\n\
program.\n\
.TP 8n\n\
.B -VERSion\n\
.br\n\
Print the version of the\n\
.I recite\n\
program being executed.\n\
.PP\n\
All other options will produce a diagnostic error.\n\
Options may be abbreviated,\n\
the minimum abbreviation is shown in upper-case.\n\
Options are case insensitive.\n\
Options and file names may be mixed arbitrarily on the command line.\n\
.SH EXIT STATUS\n\
The\n\
.I recite\n\
program will exit with a status of 1 on any error.\n\
The\n\
.I recite\n\
program will only exit with a status of 0 if there are no errors.\n\
.SH COPYRIGHT\n\
.if t .ds C) \\(co\n\
.if n .ds C) (C)\n\
The\n\
.I recite\n\
program is Copyright \\*(C) ${date %Y} Peter Miller.\n\
.br\n\
All rights reserved.\n\
.PP\n\
The\n\
.I recite\n\
program comes with ABSOLUTELY NO WARRANTY;\n\
for details use the '\\fIrecite -VERSion Warranty\\fP' command.\n\
This is free software\n\
and you are welcome to redistribute it under certain conditions;\n\
for details use the '\\fIrecite -VERSion Redistribution\\fP' command.\n\
.SH AUTHOR\n\
.nf\n\
.ta 8n 16n 24n\n\
Peter Miller\tUUCP\tuunet!munnari!bmr.gov.au!pmiller\n\
/\\e/\\e*\t\tInternet\tpmiller@bmr.gov.au\n\
.fi\n";
	},
	{
		pattern = [ "*.so", "*.ms", "*.me" ];
		body = "\
.\\\"\n\
.\\\"	recite - english text speech synthesizer\n\
.\\\"	Copyright (C) ${date %Y} Peter Miller.\n\
.\\\"	All rights reserved.\n\
.\\\"\n\
.\\\"	This program is free software; you can redistribute it and/or modify\n\
.\\\"	it under the terms of the GNU General Public License as published by\n\
.\\\"	the Free Software Foundation; either version 1, or (at your option)\n\
.\\\"	any later version.\n\
.\\\"\n\
.\\\"	This program is distributed in the hope that it will be useful,\n\
.\\\"	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
.\\\"	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
.\\\"	GNU General Public License for more details.\n\
.\\\"\n\
.\\\"	You should have received a copy of the GNU General Public License\n\
.\\\"	along with this program; if not, write to the Free Software\n\
.\\\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
.\\\"\n\
.\\\" MANIFEST: document describing ${b $fn .ms}\n\
.\\\"\n";
	},
	{
		pattern = [ "*" ];
		body = "\
#\n\
#	recite - english text speech synthesizer\n\
#	Copyright (C) ${date %Y} Peter Miller.\n\
#	All rights reserved.\n\
#\n\
#	This program is free software; you can redistribute it and/or modify\n\
#	it under the terms of the GNU General Public License as published by\n\
#	the Free Software Foundation; either version 1, or (at your option)\n\
#	any later version.\n\
#\n\
#	This program is distributed in the hope that it will be useful,\n\
#	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
#	GNU General Public License for more details.\n\
#\n\
#	You should have received a copy of the GNU General Public License\n\
#	along with this program; if not, write to the Free Software\n\
#	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
#\n\
# MANIFEST: $fn\n\
#\n";
	}
];

develop_begin_command = "ln -s $bl bl";
