#!/bin/sh
-# $Id: makeinit.sh,v 1.4 2000/12/05 23:16:51 cph Exp $
+# $Id: makeinit.sh,v 1.5 2000/12/06 02:48:42 cph Exp $
#
# Copyright (c) 2000 Massachusetts Institute of Technology
#
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Script to create "config.h.in", "configure", and "Makefile.in".
+# Requires GCC and MIT Scheme.
+
+# generate "config.h.in" from "acconfig.h".
autoheader
+
+# generate "configure" from "configure.in".
autoconf
+
+# generate "config.h".
[ -f Makefile.in ] || touch Makefile.in
./configure
+
+# Generate "Makefile.in" from "Makefile.in.in". Requires "config.h",
+# because dependencies are generated by running GCC -M on the source
+# files, which refer to "config.h".
scheme -heap 2000 <<EOF
(load "makegen/makegen.scm")
(generate-makefile "makegen/Makefile.in.in"
"Makefile.deps"
"Makefile.in")
EOF
-rm -f Makefile config.h config.cache config.log config.status
-rm -f cmpauxmd.m4 cmpintmd.h
+
+# Generate "Makefile", then use distclean rule to clean up.
+./config.status
+make distclean