<commit_before>VERSION := 0.1.$(shell git log --oneline | wc -l | sed -e "s/ //g")

DESTDIR := /usr/local

RONN := $(shell which ronn >/dev/null 2>&1 && echo "ronn -w --manual=direnv --organization=0x2a" || echo "@echo 'Could not generate manpage because ronn is missing. gem install ronn' || ")
MAN_PAGES := $(shell ls libexec | sed -e "s/\(.*\)/man\/\1.1/g")

.PHONY: all man test release install gh-pages
all: man test

%.1: %.1.ronn
	$(RONN) -r $<

man: $(MAN_PAGES)

test:
	./test/direnv-test.sh

release:
	git tag v$(VERSION)

gh-pages:
	git stash
	$(RONN) -h man/*.ronn
	git checkout gh-pages
	cp man/*.html .
	rm -rf man
	git add .
	git commit -m "$(VERSION)"
	git push
	git checkout master
	git stash pop

install:
	install -d bin $(DESTDIR)/bin
	install -d libexec $(DESTDIR)/libexec
	install -d man $(DESTDIR)/share/man/man1
	cp -R bin/* $(DESTDIR)/bin
	cp -R libexec/* $(DESTDIR)/libexec
	cp -R man/*.1 $(DESTDIR)/share/man/man1<commit_msg>Better docs<commit_after>VERSION := 0.1.$(shell git log --oneline | wc -l | sed -e "s/ //g")

DESTDIR := /usr/local

RONN := $(shell which ronn >/dev/null 2>&1 && echo "ronn -w --manual=direnv --organization=0x2a" || echo "@echo 'Could not generate manpage because ronn is missing. gem install ronn' || ")
RONNS = $(wildcard man/*.ronn)
ROFFS = $(RONNS:.ronn=)

.PHONY: all man test release install gh-pages
all: man test

%.1: %.1.ronn
	$(RONN) -r $<

man: $(ROFFS)

# Maybe use https://github.com/bmizerany/roundup
test:
	./test/direnv-test.sh

release:
	git tag v$(VERSION)

gh-pages:
	git stash
	$(RONN) -W5 -s toc man/*.ronn
	git checkout gh-pages
	cp man/*.html .
	rm -rf man
	git add .
	git commit -m "$(VERSION)"
	git push
	git checkout master
	git stash pop

install:
	install -d bin $(DESTDIR)/bin
	install -d libexec $(DESTDIR)/libexec
	install -d man $(DESTDIR)/share/man/man1
	cp -R bin/* $(DESTDIR)/bin
	cp -R libexec/* $(DESTDIR)/libexec
	cp -R man/*.1 $(DESTDIR)/share/man/man1
{'fraction_non_alphanumeric': 0.1768637532133676, 'fraction_numerical': 0.012853470437017995, 'mean_word_length': 3.158119658119658, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6823908', 'n_tokens_mistral': 824, 'n_tokens_neox': 792, 'n_words': 241}