2013-05-25 22:00:00 +00:00
|
|
|
# On OS X with "brew install sqlite3", you need PKG_CONFIG_PATH=/usr/local/Cellar/sqlite/3.7.17/lib/pkgconfig/
|
|
|
|
|
2013-06-10 22:55:17 +00:00
|
|
|
# TODO(bradfitz): rename "all" to "raw" and "newall" to "all", once
|
|
|
|
# make.go is finished. Then this text will remain and be accurate:
|
|
|
|
#
|
|
|
|
# The "raw" target is the old "all" way, using the "go" command
|
|
|
|
# directly. Assumes that the camlistore root is in
|
|
|
|
# $GOPATH/src/camlistore.org.
|
|
|
|
#
|
|
|
|
# The new "all" way (above) doesn't care where the directory is
|
|
|
|
# checked out, or whether you even have a GOPATH at all.
|
2011-02-04 01:32:34 +00:00
|
|
|
all:
|
2013-02-03 18:14:21 +00:00
|
|
|
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/...
|
2011-02-04 01:32:34 +00:00
|
|
|
|
2013-06-10 22:55:17 +00:00
|
|
|
newall:
|
|
|
|
go run make.go
|
|
|
|
|
2013-01-20 21:35:37 +00:00
|
|
|
# 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/...
|
|
|
|
|
2011-03-05 21:44:19 +00:00
|
|
|
presubmit:
|
2013-01-28 16:35:53 +00:00
|
|
|
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
|
2011-03-05 21:44:19 +00:00
|
|
|
|
2012-02-28 03:51:34 +00:00
|
|
|
embeds:
|
2013-05-24 21:19:29 +00:00
|
|
|
go install ./pkg/fileembed/genfileembed/ && genfileembed ./server/camlistored/ui && genfileembed ./server/camlistored/newui && genfileembed ./pkg/server
|
2013-01-25 23:13:30 +00:00
|
|
|
|
2013-01-29 15:41:02 +00:00
|
|
|
getclosure:
|
2013-01-25 23:13:30 +00:00
|
|
|
perl -e 'require "misc/get_closure.pl"; get_closure_lib(); get_closure_compiler();'
|
2013-01-29 15:41:02 +00:00
|
|
|
|
2013-02-11 01:11:50 +00:00
|
|
|
UIDIR = server/camlistored/ui
|
|
|
|
|
2013-01-29 15:41:02 +00:00
|
|
|
NEWUIDIR = server/camlistored/newui
|
|
|
|
|
2013-02-11 04:06:42 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(NEWUIDIR)/all.js $(NEWUIDIR)/all.js.map
|
|
|
|
|
2013-01-29 15:41:02 +00:00
|
|
|
minijs: $(NEWUIDIR)/all.js
|
|
|
|
|
2013-05-24 21:19:29 +00:00
|
|
|
$(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
|
2013-01-25 23:13:30 +00:00
|
|
|
tmp/closure-lib/closure/bin/build/closurebuilder.py\
|
|
|
|
--root tmp/closure-lib/ \
|
|
|
|
--root server/camlistored/newui/ \
|
2013-05-24 21:19:29 +00:00
|
|
|
--namespace="camlistore.BlobPage" \
|
2013-06-08 22:21:45 +00:00
|
|
|
--namespace="camlistore.DebugPage" \
|
2013-05-24 21:19:29 +00:00
|
|
|
--namespace="camlistore.FiletreePage" \
|
|
|
|
--namespace="camlistore.GalleryPage" \
|
2013-01-25 23:13:30 +00:00
|
|
|
--namespace="camlistore.IndexPage" \
|
2013-05-24 21:19:29 +00:00
|
|
|
--namespace="camlistore.PermanodePage" \
|
|
|
|
--namespace="camlistore.SearchPage" \
|
2013-01-25 23:13:30 +00:00
|
|
|
--output_mode=compiled \
|
|
|
|
--compiler_jar=tmp/closure-compiler/compiler.jar \
|
2013-02-11 02:02:06 +00:00
|
|
|
--compiler_flags="--compilation_level=SIMPLE_OPTIMIZATIONS" \
|
2013-01-29 15:41:02 +00:00
|
|
|
--compiler_flags="--jscomp_warning=checkTypes" \
|
|
|
|
--compiler_flags="--debug" \
|
|
|
|
--compiler_flags="--formatting=PRETTY_PRINT" \
|
2013-02-11 01:39:18 +00:00
|
|
|
--compiler_flags="--create_source_map=$(NEWUIDIR)/all.js.map" \
|
2013-01-29 15:41:02 +00:00
|
|
|
> $(NEWUIDIR)/all.js
|