1 BUILT_SOURCES = chess-auto.el
2 CLEANFILES = TAGS chess-auto.el auto-autoloads.el
3 EXTRA_DIST = autogen.sh chess-auto.el.in chess-eco.pos doc/chess.pdf
4 DISTCLEANFILES = chess-eco.fen doc/chess.info doc/chess.pdf $(TESTS)
5 info_TEXINFOS = doc/chess.texi
6 dist_lisp_DATA = _pkg.el chess-eco.fen
58 chess-auto.el: $(ELFILES)
59 echo ";;; DO NOT MODIFY THIS FILE" > $(top_builddir)/chess-auto.el
60 echo "(if (featurep 'chess-auto) (error \"Already loaded\"))" \
61 >> $(top_builddir)/chess-auto.el
62 $(EMACS) -batch -L $(srcdir) -l chess-maint.el \
63 -f chess-generate-autoloads \
64 $(top_builddir)/chess-auto.el $(srcdir)
65 echo "(provide 'chess-auto)" >> $(top_builddir)/chess-auto.el
66 ln -f $(top_builddir)/chess-auto.el $(top_builddir)/auto-autoloads.el
68 chess-eco.fen: chess-eco.pos chess-eco.el
69 $(EMACS) --no-init-file --no-site-file -batch \
70 -L $(srcdir) -l chess-eco -f chess-generate-fen-table \
71 chess-eco.pos chess-eco.fen
74 DATABASE = $(shell test -r test/largedb.sg3 && echo test/largedb || echo test/historic.pgn)
75 START = $(shell test -r test/largedb.sg3 && perl -e 'print int(rand(4000000)), "\n";' || echo 0)
78 # Note: There are 4,209,433 games in test/largedb, if you download the files
81 # ftp://ftp.newartisans.com/pub/chess/largedb.7z
83 # If you have a dual-core CPU (or more), you'll get the best performance by
84 # running a separate Emacs for each core. Here's how I run all the tests on
85 # my dual-core MacBook Pro: (Note, removing chess-test is just a precaution,
86 # since the Makefile will not regenerate it if you aborted a previous test
89 # chess1 $ rm -f chess-test; nice -n 20 make START=0 COUNT=2104715 check
90 # chess2 $ rm -f chess-test; nice -n 20 make START=2104715 COUNT=0 check
92 # I run both of these using `screen', with a vertical split so I can watch
93 # them both running. I type C-a H in each screen window before starting, so
94 # that all the output is logged to a file I can examine afterward.
96 # Note that these tests can take days to run. My MacBook Pro gets around
97 # 2,000 plies per second. If you're a Lisp hacker and want to improve the
98 # speed of that, the slowness is pretty much all in `chess-search-position',
99 # in the file chess-pos.el.
102 echo "$(EMACS) -batch -L $(srcdir) -l chess-test.el -f chess-test '$(DATABASE)' $(START) $(COUNT); rm -f $(top_builddir)/chess-test" > $@
106 (set -e; f=$$(pwd)/$@; tmp_dir=`mktemp -d`; \
108 lftp -c "open http://www.theweekinchess.com/zips/; mget twic*g.zip"; \
109 for zip in *.zip; do unzip $$zip; done; \
110 cat *.pgn > $$f; rm *.pgn)
112 check-twic: test/twic.pgn
113 $(MAKE) DATABASE=$< START=0 COUNT=0 check
115 TAGS: $(dist_lisp_LISP)
116 @etags $(dist_lisp_LISP)
119 # Makefile.am ends here