


building(cook)					   building(cook)


NAME
	cook - a file construction tool

SPACE REQUIREMENTS
	You will need about 5MB	to unpack and build the	cook
	program.  Your milage may vary.

SITE CONFIGURATION
	The cook package is configured using the configure
	program	included in this distribution.

	The configure shell script attempts to guess correct
	values for various system-dependent variables used during
	compilation, and creates the Makefile and common/config.h
	files.	It also	creates	a shell	script config.status that
	you can	run in the future to recreate the current
	configuration.

	Normally, you just cd to the directory containing cook's
	source code and	type
		% ./configure
		...lots	of output...
		%
	If you're using	csh on an old version of System	V, you
	might need to type
		% sh configure
		...lots	of output...
		%
	instead	to prevent csh from trying to execute configure
	itself.

	Running	configure takes	a minute or two.  While	it is
	running, it prints some	messages that tell what	it is
	doing.	If you don't want to see the messages, run
	configure with its standard output redirected to
	/dev/null; for example,
		% ./configure >	/dev/null
		%

	To compile the cook package in a different directory from
	the one	containing the source code, you	must use a
	version	of make	that supports the VPATH	variable, such as
	GNU make.  cd to the directory where you want the object
	files and executables to go and	run the	configure script.
	configure automatically	checks for the source code in the
	directory that configure is in and in ..  (the parent
	directory).  If	for some reason	configure is not in the
	source code directory that you are configuring,	then it
	will report that it can't find the source code.	 In that
	case, run configure with the option --srcdir=DIR, where
	DIR is the directory that contains the source code.

	By default, configure will arrange for the make	install
	command	to install the cook package's files in



								1





building(cook)					   building(cook)


	/usr/local/bin,	/usr/local/man,	etc.  You can specify an
	installation prefix other than /usr/local by giving
	configure the option --prefix=PATH.

	You can	specify	separate installation prefixes for
	architecture-specific files and	architecture-independent
	files.	If you give configure the option --exec-
	prefix=PATH the	cook package will use PATH as the prefix
	for installing programs	and libraries.	Data files and
	documentation will still use the regular prefix.
	Normally, all files are	installed using	the same prefix.

	configure ignores any other arguments that you give it.

	On systems that	require	unusual	options	for compilation
	or linking that	the cook package's configure script does
	not know about,	you can	give configure initial values for
	variables by setting them in the environment.  In Bourne-
	compatible shells, you can do that on the command line
	like this:
		$ CC='gcc -traditional'	LIBS=-lposix ./configure
		...lots	of output...
		$
	Here are the make variables that you might want	to
	override with environment variables when running
	configure.

	Variable: CC
		C compiler program.  The default is cc.

	Variable: INSTALL
		Program	to use to install files.  The default is
		install	if you have it,	cp otherwise.

	Variable: LIBS
		Libraries to link with,	in the form -lfoo -lbar.
		The configure script will append to this, rather
		than replace it.

	If you need to do unusual things to compile the	package,
	the author encourages you to figure out	how configure
	could check whether to do them,	and mail diffs or
	instructions to	the author so that they	can be included
	in the next release.

BUILDING COOK
	All you	should need to do is use the
		% make
		...lots	of output...
		%
	command	and wait.  When	this finishes you should see a
	directory called bin containing	nine files: c_incl, cook,
	cookfp,	cooktime, find_libs, find_sizes, make2cook,
	roffpp and txt2c.



								2





building(cook)					   building(cook)


	cook	cook program is	a file construction tool, and may
		invoke the following tools in some of its
		recipes.

	cookfp	The cookfp program is a	utility	distributed with
		cook which calculates the fingerprints of files.
		It uses	the same algorithm as the fingerprints
		used by	cook itself.  For more information, see
		cook(1)	and cookfp(1).

	cooktime
		The cooktime program is	a utility distributed
		with cook which	allows the time-last-modified and
		time-last-accessed stamps of files to be set to
		specific times.	 For more information, see
		cooktime(1).

	c_incl	The c_incl program is a	utility	distributed with
		cook which examines C files and	determines all
		the files it includes directly and indirectly.
		For more information, see c_incl(1).

	find_libs
		The find_libs program is a utility distributed
		with cook which	tracks down the	names of library
		files, given cc-style library options (-L and
		-l).  For more information, see	find_libs(1).

	find_sizes
		The find_sizes program is a utility used to build
		the cook package; it is	not intended for general
		use and	should not be installed.

	roffpp	The roffpp program is a	utility	distributed with
		cook which acts	as a proprocessor for *roff
		files, removing	source (.so) directives.  It
		accepts	include	search path command line options
		just as	/lib/cpp does.	For more information, see
		roffpp(1).

	make2cook
		The make2cook program is a utility to help
		convert	Makefiles into cookbooks.  An exact 1:1
		semantic mapping is not	possible, so some
		addition editing is often required.

	txt2c	The txt2c program is a utility used to build the
		cook package; it is not	intended for general use
		and should not be installed.








								3





building(cook)					   building(cook)


	You can	remove the program binaries and	object files from
	the source directory by	using the
		% make clean
		...lots	of output...
		%
	command.  To remove all	of the above files, and	also
	remove the Makefile and	common/config.h	and config.status
	files, use the
		% make distclean
		...lots	of output...
		%
	command.

	The file aux/configure.in is used to create configure by
	a GNU program called autoconf.	You only need to know
	this if	you want to regenerate configure using a newer
	version	of autoconf.

TESTING	COOK
	The cook program comes with a test suite.  To run this
	test suite, use	the command
		% make sure
		...lots	of output...
		Passed All Tests
		%

	The tests take a few seconds each, with	a few very fast,
	and a couple very slow,	but it varies greatly depending
	on your	CPU.

	If all went well, the message
		Passed All Tests
	should appear at the end of the	make.

INSTALLING COOK
	As explained in	the SITE CONFIGURATION section,	above,
	the cook package is installed under the	/usr/local tree
	by default.  Use the --prefix=PATH option to configure if
	you want some other path.

	All that is required to	install	the cook package is to
	use the
		% make install
		...lots	of output...
		%
	command.  Control of the directories used may be found in
	the first few lines of the Makefile file if you	want to
	bypass the configure script.

PRINTED	MANUALS
	This distribution contains the sources to all of the
	documentation for cook.	 The author used the GNU groff
	package	and a postscript printer to prepare the
	documentation.	If you do not have this	software, you



								4





building(cook)					   building(cook)


	will need to substitute	commands appropriate to	your
	site.

	To print copies	of the README and BUILDING files, the
	following commands may be used
		% cd aux
		% groff	-s -t -man *.man | lpr
		% cd ..
		%
	This will produce about	4 pages.  The "-s" flag	means
	preprocess with	soelim(1), and the "-t"	flag means
	preprocess with	tbl(1).

	To print copies	of the manual entries, the following
	commands may be	used
		% cd man1
		% groff	-s -t -man *.1 | lpr
		% cd ..
		%
	This will produce about	8 pages.  The "-s" flag	means
	preprocess with	soelim(1), and the "-t"	flag means
	preprocess with	tbl(1).

	To print a copy	of the Reference Manual, the following
	commands may be	used
		% cd doc
		% groff	-s -t -mm refman.t | lpr
		% cd ..
		%
	This will produce about	35 pages.  The "-s" flag means
	preprocess with	soelim(1), the "-t" flag means preprocess
	with tbl(1).  Alternatively, you could get a PostScript
	copy of	the Reference Manual from the archive site given
	in the README file.

GETTING	HELP
	If you need assistance with the	cook program, please do
	not hesitate to	contact	the author at
		Peter Miller <pmiller@bmr.gov.au>
	Any and	all feedback is	welcome.

	When reporting problems, please	include	the version
	number given by	the
		% cook -version
		cook version 1.7.D010
		...warranty disclaimer...
		%
	command.  Please do not	send this example; run the
	program	for the	exact version number.

	In the common/main.h file, there is a define of	DEBUG in
	comments.  If the comments are removed,	extensive
	debugging is turned on.	 This causes some performance
	loss, but performs much	run-time checking and adds the



								5





building(cook)					   building(cook)


	-TRACIng command line option.

	When the -TRACing option is followed by	one or more file
	names, it turns	on execution traces in those source
	files.	It is best to put this option on the end of the
	command, so that the names of the files	to be traced are
	not confused with any other filenames or strings on the
	command	line.

COPYRIGHT
	cook version 1.7
	Copyright (C) 1988, 1989, 1990,	1991, 1992, 1993, 1994,
	1995 Peter Miller; All rights reserved.

	The cook package 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.

	It should be in	the LICENSE file included with this
	distribution.

AUTHOR
	Peter Miller   UUCP	  uunet!munnari!bmr.gov.au!pmiller
	/\/\*	       Internet	  pmiller@bmr.gov.au































								6


