#!/bin/sh

# @(#)TEMPLATE version 3.12 created 1/14/93
# @(#)Copyright (c), 1987, 1992 StatSci, Inc.  All rights reserved.

# create a template for an Smakefile in your current directory

fun=fun
if [ "$1" != "" ]
then
	fun=$1
	hfile=$1.d
	qfile=$1.q
fi 
if [ -f Smakefile ]
then
	echo "moved Smakefile to Smakefile.orig"
	mv Smakefile Smakefile.orig
fi

# this is a really kludgy way to do the next couple of lines
cat > Smakefile << !
# SCCS info %Z\
% %M\
% SCCS version %I\
% created on %G\
%
# %Z\
% %Q\
%

DEVS=
HFILES=$hfile
QFILES=$qfile
OBJS=
F_OBJ_NAMES=
C_OBJ_NAMES=

all : $(DEVS) $(QFILES) $(HFILES) $(OBJS)
$fun : funs
install : help install.funs update sload
install.funs : $(QFILES)
	QINSTALL $(DEST)/$(FUNS_DIR) $(QFILES)
help : $(HFILES)
	HINSTALL $(DEST)/$(FUNS_DIR)/$(HELP_DIR) $(HFILES)
update : $(OBJS)
	$(A)/LIB.SMAKE $(L)/$(SPLUS_LIBRARY) $(OBJS)
	sleep 1 ; touch update
virgin : clean virgin.std	
!
echo "Now edit Smakefile to set variables"
