/* **********************************************************************
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved  
 *        For full copyright information see:'andrew/config/COPYRITE' 
 *
 * **********************************************************************
 *
 *	HOW TO CREATE AN AMS DEMONSTRATION FOLDER
 *
 *	This Imakefile will automatically create an AMS demonstration folder and store it
 *	in ${DESTDIR}/.MESSAGES/demo.  To read it, you will need to add the
 *	directory defined by ${DESTDIR}/.MESSAGES to your mspath preference.
 *	(Otherwise, you can type in its FULL path name to read it with "Read By Name"
 *	or ^X^V in Messages.)
 *
 *	Alternatively, you can also easily create a demo folder somewhere else.
 *	Using the "gendemo" script, found in this directory, type "gendemo folder-name" 
 *	where "folder-name" is the name of a creatable message folder.  For example, if 
 *	you've run an AMS application, you will have a .MESSAGES subdirectory in 
 *	your home directory, and can type "gendemo ~/.MESSAGES/amsdemo".  
 *	Be warned that if the directory you named already existed, it will be destroyed 
 *	and so will any subdirectories it had!!!
 *
 *	Also, if you want the folder subscription announcement demo to work, you should 
 *	make sure that the folder announcement referenced in d14.heads refers 
 *	to a real bboard/folder.  You should do this BEFORE running gendemo, or else 
 *	after you do it you should run gendemo again.
 *
 ************************************************************************ */

/*
	$Disclaimer: This software is part of version 7.2 of the 
* Andrew User Interface System and is the 
* property of IBM, Carnegie Mellon University, 
* and the other copyright holders.  The source 
* code of this version is for the sole use of 
* members of the Andrew Consortium with 
* memberships extending into calendar year 
* 1994.  This source code is not to be distributed 
* to non-members of the consortium nor beyond 
* a fifty-mile radius from the membership address.  
* Binary object code compiled or derived from 
* these sources is not to be distributed to non-
* members.  Members may have additional 
* distribution rights granted by prior written 
* permission of Carnegie Mellon University.
* 
* IBM, CARNEGIE MELLON UNIVERSITY, 
* AND THE OTHER COPYRIGHT HOLDERS
*  DISCLAIM ALL WARRANTIES WITH 
* REGARD TO THIS SOFTWARE, INCLUDING 
* ALL IMPLIED WARRANTIES OF MERCHANT-
* ABILITY AND FITNESS. IN 
* NO EVENT SHALL  IBM, CARNEGIE 
* MELLON UNIVERSITY, OR ANY OTHER 
* COPYRIGHT HOLDER BE LIABLE FOR 
* ANY SPECIAL, INDIRECT OR CONSE-
* QUENTIAL DAMAGES OR ANY DAMAGES 
* WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT 
* OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*  $
*/


InstallProgram(gendemo, ${DESTDIR}/etc)

DIRS = $(DESTDIR)/.MESSAGES $(DESTDIR)/.MESSAGES/demo

MkdirTarget($(DIRS))

install.time::
	-${DESTDIR}/bin/cui rebuild ${DESTDIR}/.MESSAGES \; exit
	-${CSHELL} -f gendemo  -force -DESTDIR ${DESTDIR} ${DESTDIR}/.MESSAGES/demo

InstallDocs(gendemo.help, ${DESTDIR}/help)

install.time:: 
	@cat ./cshline > amsdemo
	@echo 'if !($$?ANDREWDIR) then' >> amsdemo
	@echo  "setenv ANDREWDIR " DEFAULT_ANDREWDIR_ENV >> amsdemo
	@echo 'set path=($$ANDREWDIR/bin $$path)' >> amsdemo
	@echo "endif" >> amsdemo
	@echo '$$ANDREWDIR/bin/messages $$ANDREWDIR/.MESSAGES/demo' >> amsdemo
	chmod +x amsdemo
	
InstallProgram(amsdemo, $(DESTDIR)/etc)

CleanTarget(amsdemo)
