#  domakemake from ObjectProDSP 0.2
#  Copyright (C) 1994 1995, Mountain Math Software, All rights reserved.
#  Licensed for free use and distribution under version 2 of the Gnu General
#  Public License. Please see file COPYING for details and restrictions.
#  
#  ObjectProDSP is a trademark of Mountain Math Software.
#  
cp $OPD_ROOT/doc/mac/Makefile_preamble Makefile
#
echo -n "NODE_HELP=" >> Makefile
awk '{ if ( $1 != "#") print "\t${NODE_HELP_DIR}/" $1 ".tex \\" }' \
	< $OPD_ROOT/doc/roff/mmake/node_list >> Makefile
echo "	\${EXPAND_TO_NOTHING_TO_TERMINATE_LIST}" >> Makefile
echo >> Makefile
#
cat Makefile_head >> Makefile
echo >> Makefile
#
OPD_ROFF=`awk '{ if ( $1 != "#") printf "%s ",  $1}' \
	 < $OPD_ROOT/doc/roff/mmake/node_list`
#
for i in $OPD_ROFF ; do
	echo "\${NODE_HELP_DIR}/$i.tex: \${OPD_ROOT}/doc/roff/$i.roff" >> Makefile
	echo "	cd \${OPD_ROOT}/doc/roff ; make \$@" >> Makefile
done
echo >> Makefile
#
${OPD_SHELL} ${OPD_ROOT}/doc/scripts/xwd_to_ps.sh MAKEFILE >> Makefile
