<commit_before># On OS X with "brew install sqlite3", you need PKG_CONFIG_PATH=/usr/local/Cellar/sqlite/3.7.17/lib/pkgconfig/

all:
	go install --ldflags="-X camlistore.org/pkg/buildinfo.GitInfo "`./misc/gitversion` `pkg-config --libs sqlite3 1>/dev/null 2>/dev/null && echo "--tags=with_sqlite"` ./pkg/... ./server/... ./cmd/... ./third_party/...

# Workaround Go bug where the $GOPATH/pkg cache doesn't know about tag changes.
# Useful when you accidentally run "make" and then "make presubmit" doesn't work.
# See https://code.google.com/p/go/issues/detail?id=4443
forcefull:
	go install -a --tags=with_sqlite ./pkg/... ./server/... ./cmd/... ./third_party/...

presubmit:
	SKIP_DEP_TESTS=1 go test `pkg-config --libs sqlite3 1>/dev/null 2>/dev/null && echo "--tags=with_sqlite"` -short ./pkg/... ./server/camlistored ./cmd/... && echo PASS

embeds:
	go install ./pkg/fileembed/genfileembed/ && genfileembed ./server/camlistored/ui && genfileembed ./server/camlistored/newui && genfileembed ./pkg/server

getclosure:
	perl -e 'require "misc/get_closure.pl"; get_closure_lib(); get_closure_compiler();'

UIDIR = server/camlistored/ui

NEWUIDIR = server/camlistored/newui

clean:
	rm -f $(NEWUIDIR)/all.js $(NEWUIDIR)/all.js.map

minijs: $(NEWUIDIR)/all.js

$(NEWUIDIR)/all.js: $(NEWUIDIR)/blobinfo.js $(NEWUIDIR)/blob_item.js $(NEWUIDIR)/blob_item_container.js $(NEWUIDIR)/create_item.js $(NEWUIDIR)/filetree.js $(NEWUIDIR)/index.js $(NEWUIDIR)/permanode.js $(NEWUIDIR)/pics.js $(NEWUIDIR)/server_connection.js $(NEWUIDIR)/server_connection.js $(NEWUIDIR)/search.js $(NEWUIDIR)/server_type.js $(NEWUIDIR)/sigdebug.js $(NEWUIDIR)/toolbar.js $(NEWUIDIR)/base64.js $(NEWUIDIR)/Crypto.js $(NEWUIDIR)/SHA1.js
	tmp/closure-lib/closure/bin/build/closurebuilder.py\
		--root tmp/closure-lib/ \
		--root server/camlistored/newui/ \
		--namespace="camlistore.BlobPage" \
		--namespace="camlistore.FiletreePage" \
		--namespace="camlistore.GalleryPage" \
		--namespace="camlistore.IndexPage" \
		--namespace="camlistore.PermanodePage" \
		--namespace="camlistore.SearchPage" \
		--output_mode=compiled \
		--compiler_jar=tmp/closure-compiler/compiler.jar \
		--compiler_flags="--compilation_level=SIMPLE_OPTIMIZATIONS" \
		--compiler_flags="--jscomp_warning=checkTypes" \
		--compiler_flags="--debug" \
		--compiler_flags="--formatting=PRETTY_PRINT" \
		--compiler_flags="--create_source_map=$(NEWUIDIR)/all.js.map" \
	> $(NEWUIDIR)/all.js<commit_msg>Makefile: added DebugPage namespace in all.js<commit_after># On OS X with "brew install sqlite3", you need PKG_CONFIG_PATH=/usr/local/Cellar/sqlite/3.7.17/lib/pkgconfig/

all:
	go install --ldflags="-X camlistore.org/pkg/buildinfo.GitInfo "`./misc/gitversion` `pkg-config --libs sqlite3 1>/dev/null 2>/dev/null && echo "--tags=with_sqlite"` ./pkg/... ./server/... ./cmd/... ./third_party/...

# Workaround Go bug where the $GOPATH/pkg cache doesn't know about tag changes.
# Useful when you accidentally run "make" and then "make presubmit" doesn't work.
# See https://code.google.com/p/go/issues/detail?id=4443
forcefull:
	go install -a --tags=with_sqlite ./pkg/... ./server/... ./cmd/... ./third_party/...

presubmit:
	SKIP_DEP_TESTS=1 go test `pkg-config --libs sqlite3 1>/dev/null 2>/dev/null && echo "--tags=with_sqlite"` -short ./pkg/... ./server/camlistored ./cmd/... && echo PASS

embeds:
	go install ./pkg/fileembed/genfileembed/ && genfileembed ./server/camlistored/ui && genfileembed ./server/camlistored/newui && genfileembed ./pkg/server

getclosure:
	perl -e 'require "misc/get_closure.pl"; get_closure_lib(); get_closure_compiler();'

UIDIR = server/camlistored/ui

NEWUIDIR = server/camlistored/newui

clean:
	rm -f $(NEWUIDIR)/all.js $(NEWUIDIR)/all.js.map

minijs: $(NEWUIDIR)/all.js

$(NEWUIDIR)/all.js: $(NEWUIDIR)/blobinfo.js $(NEWUIDIR)/blob_item.js $(NEWUIDIR)/blob_item_container.js $(NEWUIDIR)/create_item.js $(NEWUIDIR)/filetree.js $(NEWUIDIR)/index.js $(NEWUIDIR)/permanode.js $(NEWUIDIR)/pics.js $(NEWUIDIR)/server_connection.js $(NEWUIDIR)/server_connection.js $(NEWUIDIR)/search.js $(NEWUIDIR)/server_type.js $(NEWUIDIR)/sigdebug.js $(NEWUIDIR)/toolbar.js $(NEWUIDIR)/base64.js $(NEWUIDIR)/Crypto.js $(NEWUIDIR)/SHA1.js
	tmp/closure-lib/closure/bin/build/closurebuilder.py\
		--root tmp/closure-lib/ \
		--root server/camlistored/newui/ \
		--namespace="camlistore.BlobPage" \
		--namespace="camlistore.DebugPage" \
		--namespace="camlistore.FiletreePage" \
		--namespace="camlistore.GalleryPage" \
		--namespace="camlistore.IndexPage" \
		--namespace="camlistore.PermanodePage" \
		--namespace="camlistore.SearchPage" \
		--output_mode=compiled \
		--compiler_jar=tmp/closure-compiler/compiler.jar \
		--compiler_flags="--compilation_level=SIMPLE_OPTIMIZATIONS" \
		--compiler_flags="--jscomp_warning=checkTypes" \
		--compiler_flags="--debug" \
		--compiler_flags="--formatting=PRETTY_PRINT" \
		--compiler_flags="--create_source_map=$(NEWUIDIR)/all.js.map" \
	> $(NEWUIDIR)/all.js
{'fraction_non_alphanumeric': 0.18385469223007064, 'fraction_numerical': 0.007669021190716448, 'mean_word_length': 4.0212765957446805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '6447596', 'n_tokens_mistral': 1863, 'n_tokens_neox': 1779, 'n_words': 295}