#include <stdio.h>
#define VERSION_ON_FILE 1
#define VERSION_FILE_BUILD 1
#include "version.c"

void
#ifdef PROTOTYPES
main (int argc, char *argv[])
#else
main (argc, argv)
int argc;
char *argv[];
#endif
{
char file[256];

	if (argc < 2)	{
		printf ("mkvers: syntax error - no TNOS root directory given\n");
		exit (0);
	}
	sprintf (file, "%s/spool/help/version.hlp", argv[1]);
	if (freopen (file, "w", stdout) == NULL)	{
		fprintf (stderr, "mkvers: can't open version file '%s'\n", file);
		exit (errno);
	}
	fprintf (stderr, "Creating new TNOS "VERSION" VersionFile....\n");
	fflush (stderr);
	doversion (0, (char **) 0, (void *) 0);
}
