<commit_before>-include local.mk

#
# Customizable variables. Set them in a local.mk file rather than
# modify this file. What follows are the default values.
#

# saxon command
SAXON?=saxon

# jsdoc command.
JSDOC3?=jsdoc

# rst2html command.
RST2HTML?=rst2html

# Build a development version? Set to 1 if yes.
DEV?=0

# Parameters to pass to mocha, like "--grep foo".
MOCHA_PARAMS?=

# Parameters to pass to behave
BEHAVE_PARAMS?=

# Skip the semver check. You should NOT set this in local.mk but use
# it on the command line:
#
# $ make SKIP_SEMVER=1 test
#
SKIP_SEMVER?=

#
# End of customizable variables.
#

# Should be the last part of the URL beginning with
# https://rangy.googlecode.com/files/
RANGY_FILE=rangy-1.3alpha.772.tar.gz

JQUERY_FILE=jquery-1.9.1.js

BOOTSTRAP_URL=https://github.com/twbs/bootstrap/archive/v3.0.0.zip
BOOTSTRAP_BASE=bootstrap-$(notdir $(BOOTSTRAP_URL))
FONTAWESOME_PATH=http://fortawesome.github.io/Font-Awesome/assets/
FONTAWESOME_FILE=font-awesome.zip

TEXT_PLUGIN_FILE=https://raw.github.com/requirejs/text/latest/text.js
TEXT_PLUGIN_BASE=$(notdir $(TEXT_PLUGIN_FILE))

LOG4JAVASCRIPT_FILE=http://downloads.sourceforge.net/project/log4javascript/log4javascript/1.4.6/log4javascript-1.4.6.zip
LOG4JAVASCRIPT_BASE=$(notdir $(LOG4JAVASCRIPT_FILE))

BOOTSTRAP_GROWL_FILE=https://github.com/ifightcrime/bootstrap-growl/archive/v1.1.0.zip
BOOTSTRAP_GROWL_BASE=bootstrap-growl-$(notdir $(BOOTSTRAP_GROWL_FILE))

PURL_URL=https://github.com/allmarkedup/purl/archive/v2.3.1.zip
PURL_BASE=purl-$(notdir $(PURL_URL))

LIB_FILES:=$(shell find lib -type f -not -name "*_flymake.*")
STANDALONE_LIB_FILES:=$(foreach f,$(LIB_FILES),$(patsubst %.less,%.css,build/standalone/$f))
TEST_DATA_FILES:=$(shell find browser_test -type f -name "*.xml")
CONVERTED_TEST_DATA_FILES:=$(foreach f,$(TEST_DATA_FILES),$(patsubst browser_test/%.xml,build/test-files/%_converted.xml,$f))
# Use $(sort ...) to remove duplicates.
HTML_TARGETS:=$(patsubst %.rst,%.html,$(wildcard *.rst))
SCHEMA_TARGETS:=$(patsubst %,build/%,$(wildcard schemas/*.js))
SAMPLE_TARGETS:=$(patsubst sample_documents/%,build/samples/%,$(wildcard sample_documents/*.xml))

.DELETE_ON_ERROR:

.PHONY: all build-dir build
all: build

build-dir:
	-@[ -e build ] || mkdir build

gh-pages-build: build
	rm -rf gh-pages-build
	mkdir gh-pages-build
	cp -rp build/ks build/samples build/schemas build/standalone build/standalone-optimized $@
	for dist in standalone standalone-optimized; do \
		config=gh-pages-build/$$dist/requirejs-config.js; \
		mv $$config $$config.t; \
		node misc/modify_config.js -d config.wed/wed.ajaxlog -d config.wed/wed.save $$config.t > $$config; \
		rm $$config.t; \
	done

build: | build-standalone-optimized build-ks-files build-config build-schemas build-samples

build-config: $(CONFIG_TARGETS) | build/config

build/config: | build-dir
	mkdir $@

# See Makefile for the flip side of this.
include $(CONFIG_DEPS)

# Here are the actual targets that build the actual config files.
build/config/%:
	cp $< $@

build/config/nginx.conf:
	sed -e's;@PWD@;$(PWD);'g $< > $@
<commit_msg>Create the ajax directory when building.<commit_after>-include local.mk

#
# Customizable variables. Set them in a local.mk file rather than
# modify this file. What follows are the default values.
#

# saxon command
SAXON?=saxon

# jsdoc command.
JSDOC3?=jsdoc

# rst2html command.
RST2HTML?=rst2html

# Build a development version? Set to 1 if yes.
DEV?=0

# Parameters to pass to mocha, like "--grep foo".
MOCHA_PARAMS?=

# Parameters to pass to behave
BEHAVE_PARAMS?=

# Skip the semver check. You should NOT set this in local.mk but use
# it on the command line:
#
# $ make SKIP_SEMVER=1 test
#
SKIP_SEMVER?=

#
# End of customizable variables.
#

# Should be the last part of the URL beginning with
# https://rangy.googlecode.com/files/
RANGY_FILE=rangy-1.3alpha.772.tar.gz

JQUERY_FILE=jquery-1.9.1.js

BOOTSTRAP_URL=https://github.com/twbs/bootstrap/archive/v3.0.0.zip
BOOTSTRAP_BASE=bootstrap-$(notdir $(BOOTSTRAP_URL))
FONTAWESOME_PATH=http://fortawesome.github.io/Font-Awesome/assets/
FONTAWESOME_FILE=font-awesome.zip

TEXT_PLUGIN_FILE=https://raw.github.com/requirejs/text/latest/text.js
TEXT_PLUGIN_BASE=$(notdir $(TEXT_PLUGIN_FILE))

LOG4JAVASCRIPT_FILE=http://downloads.sourceforge.net/project/log4javascript/log4javascript/1.4.6/log4javascript-1.4.6.zip
LOG4JAVASCRIPT_BASE=$(notdir $(LOG4JAVASCRIPT_FILE))

BOOTSTRAP_GROWL_FILE=https://github.com/ifightcrime/bootstrap-growl/archive/v1.1.0.zip
BOOTSTRAP_GROWL_BASE=bootstrap-growl-$(notdir $(BOOTSTRAP_GROWL_FILE))

PURL_URL=https://github.com/allmarkedup/purl/archive/v2.3.1.zip
PURL_BASE=purl-$(notdir $(PURL_URL))

LIB_FILES:=$(shell find lib -type f -not -name "*_flymake.*")
STANDALONE_LIB_FILES:=$(foreach f,$(LIB_FILES),$(patsubst %.less,%.css,build/standalone/$f))
TEST_DATA_FILES:=$(shell find browser_test -type f -name "*.xml")
CONVERTED_TEST_DATA_FILES:=$(foreach f,$(TEST_DATA_FILES),$(patsubst browser_test/%.xml,build/test-files/%_converted.xml,$f))
# Use $(sort ...) to remove duplicates.
HTML_TARGETS:=$(patsubst %.rst,%.html,$(wildcard *.rst))
SCHEMA_TARGETS:=$(patsubst %,build/%,$(wildcard schemas/*.js))
SAMPLE_TARGETS:=$(patsubst sample_documents/%,build/samples/%,$(wildcard sample_documents/*.xml))

.DELETE_ON_ERROR:

.PHONY: all build-dir build
all: build

build-dir:
	-@[ -e build ] || mkdir build

gh-pages-build: build
	rm -rf gh-pages-build
	mkdir gh-pages-build
	cp -rp build/ks build/samples build/schemas build/standalone build/standalone-optimized $@
	for dist in standalone standalone-optimized; do \
		config=gh-pages-build/$$dist/requirejs-config.js; \
		mv $$config $$config.t; \
		node misc/modify_config.js -d config.wed/wed.ajaxlog -d config.wed/wed.save $$config.t > $$config; \
		rm $$config.t; \
	done

build: | build-standalone-optimized build-ks-files build-config build-schemas build-samples build/ajax

build-config: $(CONFIG_TARGETS) | build/config

build/config: | build-dir
	mkdir $@

# See Makefile for the flip side of this.
include $(CONFIG_DEPS)

# Here are the actual targets that build the actual config files.
build/config/%:
	cp $< $@

build/config/nginx.conf:
	sed -e's;@PWD@;$(PWD);'g $< > $@

{'fraction_non_alphanumeric': 0.14695456010312602, 'fraction_numerical': 0.01160167579761521, 'mean_word_length': 4.985535197685632, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '269146', 'n_tokens_mistral': 2452, 'n_tokens_neox': 2334, 'n_words': 468}