--- a/Makefile.in
+++ b/Makefile.in
@@ -28,38 +28,39 @@
 #      everything deleted by distclean.
 
 SHELL = /bin/sh
-MACHINE = @MACHINE_VERSION@
+MAKE = make  # BSD doesn't have it as a default.
+MACHINE = @MACHINE@
 
 # ========================= Last release ================================
 
-VERSION=@PACKAGE_VERSION@
+VERSION=@ECLS_VERSION@
 WWW=http://ecls.sourceforge.net/
-ADDRESS=git://git.code.sf.net/p/ecls/ecl
 
 # ==================== Things `configure' Might Edit ====================
+
+CC=@CC@
+CPP=@CPP@
+LN_S=@LN_S@
+CFLAGS=@CFLAGS@
 
 #  Where to find the source code.
 #  This is set by the configure script's `--srcdir' option.
 srcdir=@srcdir@
 
-prefix=@prefix@
-exec_prefix=@exec_prefix@
 bindir=@bindir@
 infodir=@infodir@
 mandir=@mandir@
 libdir=@libdir@
 
 #  What to release
-TAR_CONTENTS=Makefile.in README.1st LGPL ANNOUNCEMENT Copyright doc \
-	configure src/c src/cmp src/clos src/CHANGELOG src/lsp src/doc \
-	src/h  src/gmp src/config* src/install.sh src/Makefile.in \
-	src/util contrib/ src/clx src/gc src/*.in src/*.m4 src/gabriel \
-	src/tests/Makefile.in src/ansi-tests/Makefile.in msvc examples
+TAR_CONTENTS=Makefile.in Copy* README.1st README.orig doc \
+	configure site.lsp src/c src/cmp src/crs src/clos src/lsp src/doc \
+	src/h src/etc src/gmp src/config* src/install.sh src/Makefile.in \
+	src/util contrib/ src/clx src/tk src/gc src/*.in src/gabriel
 
 # ==================== Utility Programs for the Build ====================
 
 #  Allow the user to specify the install program.
-@SET_MAKE@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
@@ -75,12 +76,17 @@
 
 # ==================== Installation ====================
 
-INSTALL_TARGET = @INSTALL_TARGET@
+install: build/Makefile
+	(cd build; make install)
+uninstall:
+	(cd build; make uninstall)
 
-install: build/Makefile
-	cd build; $(MAKE) $(INSTALL_TARGET)
-uninstall:
-	cd build; $(MAKE) uninstall
+# ==================== Documentation ====================
+
+info:
+	(cd ${srcdir}/doc; $(MAKE) info)
+dvi:
+	(cd ${srcdir}/doc; $(MAKE) dvi)
 
 # ==================== Cleaning up and miscellanea ====================
 
@@ -90,7 +96,7 @@
 #        record the configuration.  Also preserve files that could be made
 #        by building, but normally aren't because the distribution comes
 #        with them.
-#
+#   
 clean:
 	cd build; $(MAKE) clean
 
@@ -102,7 +108,8 @@
 #        distribution.
 
 distclean: clean
-	rm -rf build Makefile
+	rm -fr build/config.status
+	rm -f Makefile
 
 #   `realclean'
 #        Delete everything from the current directory that can be
@@ -114,68 +121,45 @@
 #        begin to build the program.
 realclean: distclean
 
+TAGS tags:
+	(cd ${srcdir}/src; \
+	 etags c/*.[cd] h/*.h)
+
 check:
-	cd build && $(MAKE) check
-recheck:
-	cd build && $(MAKE) recheck
+	@echo "We don't have any tests for ECL yet."
 
-# ==================== Various means of distribution ====================
-
-TAR_DIR=ecl-$(VERSION)
+TAR_DIR=ecls-$(VERSION)
 
 doc: build/doc/index.html
 	-mkdir doc
-	(cd build/doc; make html); cp build/doc/*.html doc
+	cp build/doc/*.html doc
 build/doc/index.html:
-	cd build/doc; $(MAKE)
+	cd build/doc; make
 
-source-dist: $(TAR_DIR).tgz
+source-dist: ecls.tgz ecls-tests.tgz
 
-rpmdir=$(shell rpm --showrc | grep '^-[0-9]*:.*[^{]_topdir' | sed 's,^.*topdir[ 	]*\(.*\)[ 	]*,\1,')
-rpmbuild=$(shell if [ -z `which rpmbuild` ]; then echo "rpm"; else echo "rpmbuild"; fi)
-
-# OBSOLETE!!!
-# rpm: doc
-# 	-rm -rf $(TAR_DIR)
-# 	mkdir $(TAR_DIR) $(TAR_DIR)/src \
-# 	$(TAR_DIR)/src/tests $(TAR_DIR)/src/ansi-tests && \
-# 	for i in $(TAR_CONTENTS); do cp -rf $$i $(TAR_DIR)/$$i; done && \
-# 	tar -cz --exclude '*~' --exclude '#*' --exclude 'CVS' -f $(rpmdir)/SOURCES/$(TAR_DIR).tgz $(TAR_DIR)
-# 	if [ -f /etc/SuSE-release ]; then HOST=SUSE; else HOST=REDHAT; fi; \
-# 	cat src/util/ecl.spec |\
-# 	sed 's,ECL_VERSION,$(VERSION),;s,^#% '$${HOST}' ,,g;'|\
-# 	grep -v '^#% ' > $(rpmdir)/SPECS/ecl.spec;
-# 	rpm -ba $(rpmdir)/SPECS/ecl.spec
-
-$(TAR_DIR).tgz:
-	git archive --format=tar.gz --prefix=$(TAR_DIR)/ HEAD > $@
+ecls.tgz: doc
+	-rm -rf $(TAR_DIR)
+	mkdir $(TAR_DIR) $(TAR_DIR)/src && \
+	for i in $(TAR_CONTENTS); do cp -rf $$i $(TAR_DIR)/$$i; done && \
+	tar -cz --exclude '*~' --exclude '#*' --exclude 'CVS' -f ecls.tgz $(TAR_DIR)
+	-rm -rf $(TAR_DIR)
+ecls-tests.tgz:
+	-rm -rf $(TAR_DIR)
+	mkdir $(TAR_DIR) && \
+	mkdir $(TAR_DIR)/src && \
+	cp -rf src/ansi-tests $(TAR_DIR)/src && \
+	tar -cz --exclude '*~' --exclude '#*' --exclude 'CVS' -f ecls-tests.tgz $(TAR_DIR);
+	-rm -rf $(TAR_DIR)
 
 binary-dist: all
 	su -c "rm -rf tmp"
 	mkdir tmp
-	for i in tmp$(bindir) tmp$(infodir) tmp$(mandir) tmp$(libdir); do \
-	(echo $$i; IFS="/"; \for k in $$i; do echo $$k; (test -d $$k || mkdir $$k); chmod 755 $$k; cd $$k; done); \
+	for i in $(bindir) $(infodir) $(mandir) $(libdir); do \
+	(echo $$i; IFS="/"; for k in tmp/$$i; do echo $$k; (test -d $$k || mkdir $$k); chmod 755 $$k; cd $$k; done); \
 	done
-	prefix=`pwd`/tmp; cd build; $(MAKE) install prefix=$(prefix)
-	su -c "chown -R root.root tmp && cd tmp; tar czf ../ecl-$(VERSION)-$(MACHINE).tgz * && cd .. && rm -rf tmp"
+	PREFIX=`pwd`/tmp; cd build; make install PREFIX="$${PREFIX}"
+	su -c "chown -R root.root tmp && cd tmp; tar czf ../ecls-$(VERSION)-$(MACHINE).tgz * && cd .. && rm -rf tmp"
 
-# This creates a ZIP file with a flattened directory structure
-windows-dist: all
-	cd build; rm -rf $(TAR_DIR); mkdir $(TAR_DIR); \
-	$(MAKE) flatinstall prefix=`pwd`/$(TAR_DIR); \
-	zip -r $(TAR_DIR).zip $(TAR_DIR)
-windows-nsi: all
-	cd build; rm -rf $(TAR_DIR); mkdir $(TAR_DIR); \
-	$(MAKE) flatinstall prefix=`pwd`/$(TAR_DIR)
-	`pwd`/src/util/ecl_nsi.sh `pwd`/src/util/ecl.nsi build/$(TAR_DIR)
-	makensis.exe build/$(TAR_DIR)/ecl.nsi
-	mv build/$(TAR_DIR)/Setup.exe ecl-$(VERSION).exe
-
-upload-frs:
-	ecldir=`echo $(VERSION) | sed -e 's,\([0-9]*\.[0-9]*\)\.[0-9]*,\1,'` && \
-	destdir=jjgarcia,ecls@frs.sourceforge.net:/home/frs/project/e/ec/ecls/ecls/ && \
-	test -d frs || mkdir frs && \
-	test -d frs/$$ecldir || mkdir frs/$$ecldir && \
-	cp $(TAR_DIR).tgz src/CHANGELOG frs/$$ecldir && \
-	cd frs && scp -rC $$ecldir $$destdir
-	rm -rf frs
+dist:
+	cd dist; make-dist