+# Section handling automated tests starts here
+
+SRCDIR=../src
+PROGNAME=xemacs
+blddir=$(MAKEDIR:\=\\)\\..
+temacs_loadup=temacs -batch -l $(SRCDIR)/../lisp/loadup.el
+dump_temacs = $(temacs_loadup) dump
+run_temacs = $(temacs_loadup) run-temacs
+## We have automated tests!!
+testdir=../tests/automated
+batch_test_emacs=-batch -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
+
+# .PHONY: check check-temacs
+
+check:
+ @cd $(SRCDIR)
+ $(PROGNAME) $(batch_test_emacs)
+
+check-temacs:
+ cd $(SRCDIR)
+ set EMACSBOOTSTRAPLOADPATH=$(LISP)
+ set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
+ $(run_temacs) $(batch_test_emacs)
+
+# Section handling automated tests ends here
+