. ../config/system
. ../config/site

echo Building Makefile.local...
cat <<EOT >Makefile.local
# This Makefile was produced by running ./build in this directory.

SHELL=/bin/sh

FILES= config.h\\
       scheme.h\\
       cstring.h\\
       extern.h\\
       funcproto.h\\
       misc.h\\
       object.h\\
       param.h\\
       stkmem.h

config.h:	../config/system ../config/site
	./build-config

EOT
if [ _$inc_dir != _ ]; then
cat <<EOT >>Makefile.local
install:	\$(FILES)
	-@if [ ! -d $inc_dir ]; then \\
	    echo mkdir $inc_dir; \\
	    mkdir $inc_dir; \\
	fi
	@for i in \$(FILES) ;\\
	do \\
	    echo cp \$\$i $inc_dir; \\
	    cp \$\$i $inc_dir; \\
	done
EOT
else
cat <<EOT >>Makefile.local
install:
EOT
fi
cat <<EOT >>Makefile.local

localize:	config.h

distclean:
	rm -f Makefile.local config.h
EOT
