<commit_before>#
# Makefile - gather javascripts and compress it
#
VERSION_FILE_IN =  src/version.js.in
VERSION_FILE    =  src/version.js

BASIC_FILES =                                     \
  src/system/class.js                             \
  src/stackbase.js                                \
  src/system/set.js                               \
  src/system/write.js                             \
  src/system/pair.js                              \
  src/system/value.js                             \
  src/system/symbol.js                            \
  src/system/char.js                              \
  src/system/number.js                            \
  src/system/port.js                              \
  src/system/record.js                            \
  src/system/hashtable.js                         \
  src/system/syntax.js                            \
  src/system/types.js                             \
  src/system/parser.js                            \
  src/system/compiler.js                          \
  src/system/pause.js                             \
  src/system/call.js                              \
  src/system/interpreter.js                       \
  src/library/infra.js                            \
  src/library/r6rs_lib.js                         \
  src/library/js_interface.js                     \
  src/library/extra_lib.js                        \
  src/library/srfi.js

BROWSER_FILES =                                   \
  $(VERSION_FILE)                                 \
  src/deps/jquery.js                              \
  src/deps/underscore.js                          \
  src/deps/underscore.string.js                   \
  $(BASIC_FILES)                                  \
  src/library/webscheme_lib.js                    \
  src/platforms/browser/dumper.js                 \
  src/platforms/browser/console.js                \
  src/platforms/browser/release_initializer.js

CONSOLE_FILES =                                   \
  $(VERSION_FILE)                                 \
  $(BASIC_FILES)

all: build

build: lib/biwascheme.js lib/biwascheme-min.js lib/console_biwascheme.js node_modules/biwascheme/lib/biwascheme.js

$(VERSION_FILE): $(VERSION_FILE_IN) $(BROWSER_FILES) $(CONSOLE_FILES) VERSION Makefile
	cat $< | sed -e "s/@GIT_COMMIT@/`git log -1 --pretty=format:%H`/" | sed -e "s/@VERSION@/`cat VERSION`/" > $@

lib/biwascheme.js: $(BROWSER_FILES) Makefile
	cat $(BROWSER_FILES) > $@
	@echo "Wrote " $@

lib/biwascheme-min.js: lib/biwascheme.js
	java -jar bin/yuicompressor-2.4.2.jar lib/biwascheme.js -o $@
	@echo "Wrote " $@

lib/console_biwascheme.js: $(CONSOLE_FILES) Makefile
	cat $(CONSOLE_FILES) > $@
	@echo "Wrote " $@

node_modules/biwascheme/lib/biwascheme.js: src/platforms/node/module_preamble.js lib/console_biwascheme.js src/platforms/node/module_postamble.js
	cat src/platforms/node/module_preamble.js >> $@
	cat lib/console_biwascheme.js >> $@
	cat src/platforms/node/module_postamble.js >> $@
	@echo "Wrote " $@<commit_msg>Fixed circular dependency complaint in makefile.<commit_after>#
# Makefile - gather javascripts and compress it
#
VERSION_FILE_IN =  src/version.js.in
VERSION_FILE    =  src/version.js

BASIC_FILES =                                     \
  src/system/class.js                             \
  src/stackbase.js                                \
  src/system/set.js                               \
  src/system/write.js                             \
  src/system/pair.js                              \
  src/system/value.js                             \
  src/system/symbol.js                            \
  src/system/char.js                              \
  src/system/number.js                            \
  src/system/port.js                              \
  src/system/record.js                            \
  src/system/hashtable.js                         \
  src/system/syntax.js                            \
  src/system/types.js                             \
  src/system/parser.js                            \
  src/system/compiler.js                          \
  src/system/pause.js                             \
  src/system/call.js                              \
  src/system/interpreter.js                       \
  src/library/infra.js                            \
  src/library/r6rs_lib.js                         \
  src/library/js_interface.js                     \
  src/library/extra_lib.js                        \
  src/library/srfi.js

BROWSER_FILES =                                   \
  src/deps/jquery.js                              \
  src/deps/underscore.js                          \
  src/deps/underscore.string.js                   \
  $(BASIC_FILES)                                  \
  src/library/webscheme_lib.js                    \
  src/platforms/browser/dumper.js                 \
  src/platforms/browser/console.js                \
  src/platforms/browser/release_initializer.js

CONSOLE_FILES =                                   \
  $(BASIC_FILES)

all: build

build: lib/biwascheme.js lib/biwascheme-min.js lib/console_biwascheme.js node_modules/biwascheme/lib/biwascheme.js

$(VERSION_FILE): $(VERSION_FILE_IN) $(BROWSER_FILES) $(CONSOLE_FILES) VERSION Makefile
	cat $< | sed -e "s/@GIT_COMMIT@/`git log -1 --pretty=format:%H`/" | sed -e "s/@VERSION@/`cat VERSION`/" > $@

lib/biwascheme.js: $(VERSION_FILE) $(BROWSER_FILES) Makefile
	cat $(VERSION_FILE) > $@
	cat $(BROWSER_FILES) >> $@
	@echo "Wrote " $@

lib/biwascheme-min.js: lib/biwascheme.js
	java -jar bin/yuicompressor-2.4.2.jar lib/biwascheme.js -o $@
	@echo "Wrote " $@

lib/console_biwascheme.js: $(VERSION_FILE) $(CONSOLE_FILES) Makefile
	cat $(VERSION_FILE) > $@
	cat $(CONSOLE_FILES) >> $@
	@echo "Wrote " $@

node_modules/biwascheme/lib/biwascheme.js: src/platforms/node/module_preamble.js lib/console_biwascheme.js src/platforms/node/module_postamble.js
	cat src/platforms/node/module_preamble.js >> $@
	cat lib/console_biwascheme.js >> $@
	cat src/platforms/node/module_postamble.js >> $@
	@echo "Wrote " $@
{'fraction_non_alphanumeric': 0.10745723301777113, 'fraction_numerical': 0.0016608536787908986, 'mean_word_length': 1.1763642934586194, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3964611', 'n_tokens_mistral': 1951, 'n_tokens_neox': 1840, 'n_words': 225}