<commit_before>.POSIX:
EMACS   = emacs
BATCH   = $(EMACS) -batch -Q -L . -L tests
VERSION = 3.1.0

EL   = elfeed-csv.el elfeed-curl.el elfeed-db.el elfeed-lib.el	\
       elfeed-log.el elfeed-show.el elfeed.el xml-query.el	\
       elfeed-search.el elfeed-link.el
DOC  = README.md NEWS.md UNLICENSE elfeed-pkg.el
WEB  = web/elfeed-web-pkg.el web/elfeed-web.el web/elfeed.css	\
       web/elfeed.js web/index.html
TEST = tests/elfeed-db-tests.el tests/elfeed-lib-tests.el	\
       tests/elfeed-tests.el tests/xml-query-tests.el

compile: $(EL:.el=.elc) $(TEST:.el=.elc)

check: test
test: $(EL:.el=.elc) $(TEST:.el=.elc)
	$(BATCH) -l tests/elfeed-tests.elc -f ert-run-tests-batch

package: elfeed-$(VERSION).tar elfeed-web-$(VERSION).tar

clean:
	rm -f *.tar $(EL:.el=.elc) $(TEST:.el=.elc)

virtual: compile
	(mkdir tmp-$$$$; \
	 HOME=$$PWD/tmp-$$$$ $(EMACS) -L . -l elfeed.elc; \
	 trap "rm -rf tmp-$$$$" EXIT)

elfeed-$(VERSION).tar: $(EL) $(DOC)
	rm -rf elfeed-$(VERSION)/
	mkdir elfeed-$(VERSION)/
	cp $(EL) $(DOC) elfeed-$(VERSION)/
	tar cf $@ elfeed-$(VERSION)/
	rm -rf elfeed-$(VERSION)/

elfeed-web-$(VERSION).tar: $(WEB)
	rm -rf elfeed-web-$(VERSION)/
	mkdir elfeed-web-$(VERSION)/
	cp $(WEB) elfeed-web-$(VERSION)/
	tar cf $@ elfeed-web-$(VERSION)/
	rm -rf elfeed-web-$(VERSION)/

elfeed-csv.elc: elfeed-csv.el elfeed-db.elc
elfeed-curl.elc: elfeed-curl.el elfeed-lib.elc elfeed-log.elc
elfeed-db.elc: elfeed-db.el elfeed-lib.elc
elfeed-lib.elc: elfeed-lib.el
elfeed-log.elc: elfeed-log.el
elfeed-show.elc: elfeed-show.el elfeed.elc elfeed-db.elc elfeed-lib.elc \
    elfeed-search.elc
elfeed-link.elc: elfeed-link.el elfeed.elc elfeed-search.elc elfeed-show.elc
elfeed.elc: elfeed.el elfeed-lib.elc elfeed-log.elc elfeed-curl.elc \
    elfeed-db.elc xml-query.elc<commit_msg>Enhance "virtual" target<commit_after>.POSIX:
EMACS   = emacs
BATCH   = $(EMACS) -batch -Q -L . -L tests
VERSION = 3.1.0

EL   = elfeed-csv.el elfeed-curl.el elfeed-db.el elfeed-lib.el	\
       elfeed-log.el elfeed-show.el elfeed.el xml-query.el	\
       elfeed-search.el elfeed-link.el
DOC  = README.md NEWS.md UNLICENSE elfeed-pkg.el
WEB  = web/elfeed-web-pkg.el web/elfeed-web.el web/elfeed.css	\
       web/elfeed.js web/index.html
TEST = tests/elfeed-db-tests.el tests/elfeed-lib-tests.el	\
       tests/elfeed-tests.el tests/xml-query-tests.el

compile: $(EL:.el=.elc) $(TEST:.el=.elc)

check: test
test: $(EL:.el=.elc) $(TEST:.el=.elc)
	$(BATCH) -l tests/elfeed-tests.elc -f ert-run-tests-batch

package: elfeed-$(VERSION).tar elfeed-web-$(VERSION).tar

clean:
	rm -f *.tar $(EL:.el=.elc) $(TEST:.el=.elc)

virtual: compile
	(mkdir -p tmp-$$$$/.elfeed; \
	 cp ~/.elfeed/index tmp-$$$$/.elfeed/ 2>/dev/null || true; \
	 trap "rm -rf tmp-$$$$" INT EXIT; \
	 HOME=$$PWD/tmp-$$$$ $(EMACS) -L . -l elfeed.elc $(ARGS))

elfeed-$(VERSION).tar: $(EL) $(DOC)
	rm -rf elfeed-$(VERSION)/
	mkdir elfeed-$(VERSION)/
	cp $(EL) $(DOC) elfeed-$(VERSION)/
	tar cf $@ elfeed-$(VERSION)/
	rm -rf elfeed-$(VERSION)/

elfeed-web-$(VERSION).tar: $(WEB)
	rm -rf elfeed-web-$(VERSION)/
	mkdir elfeed-web-$(VERSION)/
	cp $(WEB) elfeed-web-$(VERSION)/
	tar cf $@ elfeed-web-$(VERSION)/
	rm -rf elfeed-web-$(VERSION)/

elfeed-csv.elc: elfeed-csv.el elfeed-db.elc
elfeed-curl.elc: elfeed-curl.el elfeed-lib.elc elfeed-log.elc
elfeed-db.elc: elfeed-db.el elfeed-lib.elc
elfeed-lib.elc: elfeed-lib.el
elfeed-log.elc: elfeed-log.el
elfeed-show.elc: elfeed-show.el elfeed.elc elfeed-db.elc elfeed-lib.elc \
    elfeed-search.elc
elfeed-link.elc: elfeed-link.el elfeed.elc elfeed-search.elc elfeed-show.elc
elfeed.elc: elfeed.el elfeed-lib.elc elfeed-log.elc elfeed-curl.elc \
    elfeed-db.elc xml-query.elc
{'fraction_non_alphanumeric': 0.19765539803707743, 'fraction_numerical': 0.0019083969465648854, 'mean_word_length': 3.169318181818182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6548687', 'n_tokens_mistral': 1670, 'n_tokens_neox': 1599, 'n_words': 291}