<commit_before>
SRC_DIR = src
BUILD_DIR = build
DIST_DIR = dist
DEMOS_DIR = demos
OTHER_FILES = \
	changelog.txt \
	MIT-LICENSE.txt \
	GPL-LICENSE.txt

VER = $$(cat version.txt)
VER_SED = sed s/@VERSION/"${VER}"/
DATE = $$(git log -1 --pretty=format:%ad)
DATE_SED = sed s/@DATE/"${DATE}"/

JQ = $$(sed -n "s/.*JQUERY\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
JQUI = $$(sed -n "s/.*JQUERY_UI\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")

DEMO_FILES = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type f)
DEMO_SUBDIRS = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type d)
DEMO_RE = \(<script[^>]*_loader\.js[^>]*><\/script>\|<!--\[\[\|\]\]-->\)\s*
DEMO_SED = sed -n "1h;1!H;\$${;g;s/${DEMO_RE}//g;p;}"

JS_SED = sed -n "s/\s*js([\"']\(.*\)[\"']).*/\1/p"
CSS_SED = sed -n "s/\s*css([\"']\(.*\)[\"']).*/\1/p"

concat_js = \
	files=$$(cat "$(1)/_loader.js" | ${JS_SED}); \
	if [ -f "$(1)/intro.js" ]; then \
		files="intro.js $$files"; \
	fi; \
	if [ -f "$(1)/outro.js" ]; then \
		files="$$files outro.js"; \
	fi; \
	old=$$PWD; \
	(cd "$(1)"; cat $$files; cd "$$old") \
		| ${VER_SED} \
		| ${DATE_SED} \
		> "$(2)"
	
concat_css = \
	files=$$(cat "$(1)/_loader.js" | ${CSS_SED}); \
	if [ "$$files" ]; then \
		old=$$PWD; \
		(cd "$(1)"; cat $$files; cd "$$old") \
			| ${VER_SED} \
			| ${DATE_SED} \
			> "$(2)"; \
	fi
	<commit_msg>Makefile now works on a Mac<commit_after>
SRC_DIR = src
BUILD_DIR = build
DIST_DIR = dist
DEMOS_DIR = demos
OTHER_FILES = \
	changelog.txt \
	MIT-LICENSE.txt \
	GPL-LICENSE.txt

VER = $$(cat version.txt)
VER_SED = sed s/@VERSION/"${VER}"/
DATE = $$(git log -1 --pretty=format:%ad)
DATE_SED = sed s/@DATE/"${DATE}"/

JQ = $$(sed -nE "s/.*JQUERY[ \t]*=[ \t]*[\"'](.*)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
JQUI = $$(sed -nE "s/.*JQUERY_UI[ \t]*=[ \t]*[\"'](.*)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")

DEMO_FILES = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type f)
DEMO_SUBDIRS = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type d)
DEMO_RE = (<script[^>]*_loader\.js[^>]*><\/script>|<!--\[\[|\]\]-->)[^<]*
DEMO_SED = sed -nE '1h;1!H;$${;g;s/${DEMO_RE}//g;p;}'

JS_SED = sed -nE "s/[ \t]*js\([\"'](.*)[\"']\).*/\1/p"
CSS_SED = sed -nE "s/[ \t]*css\([\"'](.*)[\"']\).*/\1/p"

concat_js = \
	files=$$(cat "$(1)/_loader.js" | ${JS_SED}); \
	if [ -f "$(1)/intro.js" ]; then \
		files="intro.js $$files"; \
	fi; \
	if [ -f "$(1)/outro.js" ]; then \
		files="$$files outro.js"; \
	fi; \
	old=$$PWD; \
	(cd "$(1)"; cat $$files; cd "$$old") \
		| ${VER_SED} \
		| ${DATE_SED} \
		> "$(2)"
	
concat_css = \
	files=$$(cat "$(1)/_loader.js" | ${CSS_SED}); \
	if [ "$$files" ]; then \
		old=$$PWD; \
		(cd "$(1)"; cat $$files; cd "$$old") \
			| ${VER_SED} \
			| ${DATE_SED} \
			> "$(2)"; \
	fi
	
{'fraction_non_alphanumeric': 0.3352601156069364, 'fraction_numerical': 0.013728323699421965, 'mean_word_length': 2.889044943820225, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 17, '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': '839347', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1343, 'n_words': 245}