<commit_before>SHELL = /bin/bash

VERSION = $(shell cat version.txt;)

COMPILER = /usr/local/bin/closure-compiler.jar

ICH = ICanHaz.js
ICH_MIN = ICanHaz.min.js

BASE_FILES = source/mustache.js \
	source/main.js

all: normal min

normal: $(ICH)

min: $(ICH_MIN)

$(ICH): $(BASE_FILES)
	@@echo
	@@echo "Building" $(ICH) "..."
	@@cat source/intro.js | sed -e 's/@VERSION@/$(VERSION)/' > $(ICH)
	@@echo "(function ($$) {" >> $(ICH)
	@@cat $(BASE_FILES) | sed -e 's/@VERSION@/$(VERSION)/' >> $(ICH)
	@@echo "})();" >> $(ICH)
	@@echo $(ICH) "built."
	@@echo


$(ICH_MIN): $(ICH)
	@@echo
	@@echo "Building" $(ICH_MIN) "..."
ifdef COMPILER
	@@java -jar $(COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --js=$(ICH) > $(ICH_MIN)
	@@echo $(ICH_MIN) "built."
else
	@@echo $(ICH_MIN) "not built."
	@@echo "    Google Closure complier required to build minified version."
	@@echo "    Please point COMPILER variable in 'makefile' to the jar file."
endif
	@@echo<commit_msg>Update Makefile:   - min.js general rule   - added clean rule   - make COMPILER and MUSTACHE_FILE overridable on command line<commit_after>SHELL = /bin/bash

VERSION = $(shell cat version.txt;)

COMPILER ?= /usr/local/bin/closure-compiler.jar

ICH = ICanHaz.js
ICH_MIN = ICanHaz.min.js

MAIN_FILE = source/main.js
MUSTACHE_FILE ?= source/mustache.js
BASE_FILES = $(MUSTACHE_FILE) $(MAIN_FILE)

all: $(ICH) $(ICH_MIN)
%.min.js: %.js
	@@echo
	@@echo "Building" $@ "..."
ifdef COMPILER
	@@java -jar $(COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --js=$< > $@
	@@echo $@ "built."
else
	@@echo $@ "not built."
	@@echo "    Google Closure complier required to build minified version."
	@@echo "    Please point COMPILER variable in 'makefile' to the jar file."
endif
	@@echo

$(ICH): $(BASE_FILES)
	@@echo
	@@echo "Building" $(ICH) "..."
	@@cat source/intro.js | sed -e 's/@VERSION@/$(VERSION)/' > $(ICH)
	@@echo "(function ($$) {" >> $(ICH)
	@@cat $(BASE_FILES) | sed -e 's/@VERSION@/$(VERSION)/' >> $(ICH)
	@@echo "})();" >> $(ICH)
	@@echo $(ICH) "built."
	@@echo

clean:
	@rm -f $(ICH) $(ICH_MIN)
{'fraction_non_alphanumeric': 0.2108579738245274, 'fraction_numerical': 0.0, 'mean_word_length': 3.9734939759036143, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 19, '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': '2778254', 'n_tokens_mistral': 848, 'n_tokens_neox': 789, 'n_words': 203}