<commit_before>SHELL = bash

docs = $(shell find doc -name '*.md' \
				|sed 's|.md|.1|g' \
				|sed 's|doc/|man1/|g' )

doc_subfolders = $(shell find doc -type d \
									|sed 's|doc/|man1/|g' )

# This is the default make target.
# Since 'make' typically does non-installation build stuff,
# it seems appropriate.
submodules:
	! [ -d .git ] || git submodule update --init --recursive

latest: submodules
	@echo "Installing latest published npm"
	@echo "Use 'make install' or 'make link' to install the code"
	@echo "in this folder that you're looking at right now."
	node cli.js install -g -f npm

install: submodules
	node cli.js install -g -f

# backwards compat
dev: install

link: uninstall
	node cli.js link -f

clean: uninstall
	node cli.js cache clean

uninstall: submodules
	node cli.js rm npm -g -f

man: man1

man1: $(doc_subfolders)
	[ -d man1 ] || mkdir -p man1

doc: man1 $(docs)

# use `npm install ronn` for this to work.
man1/%.1: doc/%.md
	@[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
	./node_modules/.bin/ronn --roff $< > $@

man1/%/: doc/%/
	@[ -d $@ ] || mkdir -p $@<commit_msg>Updated Makefile to enable building of api-docs into man3<commit_after>SHELL = bash

cli_docs = $(shell find doc -name '*.md' \
				|sed 's|.md|.1|g' \
				|sed 's|doc/|man1/|g' )

api_docs = $(shell find api-doc -name '*.md' \
				|sed 's|.md|.3|g' \
				|sed 's|api-doc/|man3/|g' )

cli_doc_subfolders = $(shell find doc -type d \
									|sed 's|doc/|man1/|g' )

api_doc_subfolders = $(shell find api-doc -type d \
									|sed 's|api-doc/|man3/|g' )

# This is the default make target.
# Since 'make' typically does non-installation build stuff,
# it seems appropriate.
submodules:
	! [ -d .git ] || git submodule update --init --recursive

latest: submodules
	@echo "Installing latest published npm"
	@echo "Use 'make install' or 'make link' to install the code"
	@echo "in this folder that you're looking at right now."
	node cli.js install -g -f npm

install: submodules
	node cli.js install -g -f

# backwards compat
dev: install

link: uninstall
	node cli.js link -f

clean: uninstall
	node cli.js cache clean

uninstall: submodules
	node cli.js rm npm -g -f

man: man1 man3

man1: $(cli_doc_subfolders)
	[ -d man1 ] || mkdir -p man1

man3: $(api_doc_subfolders)
	[ -d man3 ] || mkdir -p man3

doc: man1 $(cli_docs) man3 $(api_docs)

# use `npm install ronn` for this to work.
man1/%.1: doc/%.md
	@[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
	./node_modules/.bin/ronn --roff $< > $@

man1/%/: doc/%/
	@[ -d $@ ] || mkdir -p $@

man3/%.3: api-doc/%.md
	@[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
	./node_modules/.bin/ronn --roff $< > $@

man3/%/: api-doc/%/
	@[ -d $@ ] || mkdir -p $@
{'fraction_non_alphanumeric': 0.16241806263656228, 'fraction_numerical': 0.012381646030589949, 'mean_word_length': 2.9131054131054133, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, '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': '5403386', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1090, 'n_words': 339}