github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/Makefile (about) 1 # The normal way to build Camlistore is just "go run make.go", which 2 # works everywhere, even on systems without Make. The rest of this 3 # Makefile is mostly historical and should hopefully disappear over 4 # time. 5 all: 6 go run make.go 7 8 # On OS X with "brew install sqlite3", you need PKG_CONFIG_PATH=/usr/local/Cellar/sqlite/3.7.17/lib/pkgconfig/ 9 full: 10 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/... ./dev/... 11 12 13 # Workaround Go bug where the $GOPATH/pkg cache doesn't know about tag changes. 14 # Useful when you accidentally run "make" and then "make presubmit" doesn't work. 15 # See https://code.google.com/p/go/issues/detail?id=4443 16 forcefull: 17 go install -a --tags=with_sqlite ./pkg/... ./server/... ./cmd/... ./third_party/... ./dev/... 18 19 presubmit: 20 SKIP_DEP_TESTS=1 go test `pkg-config --libs sqlite3 1>/dev/null 2>/dev/null && echo "--tags=with_sqlite"` -short ./pkg/... ./server/camlistored/... ./server/appengine ./cmd/... ./dev/... && echo PASS 21 22 embeds: 23 go install ./pkg/fileembed/genfileembed/ && genfileembed ./server/camlistored/ui && genfileembed ./pkg/server 24 25 UIDIR = server/camlistored/ui 26 27 NEWUIDIR = server/camlistored/newui 28 29 clean: 30 rm -f $(NEWUIDIR)/all.js $(NEWUIDIR)/all.js.map 31 32 genclosuredeps: $(UIDIR)/deps.js 33 34 $(UIDIR)/deps.js: $(UIDIR)/blobinfo.js $(UIDIR)/blob_item.js $(UIDIR)/blob_item_container.js $(UIDIR)/create_item.js $(UIDIR)/filetree.js $(UIDIR)/index.js $(UIDIR)/permanode.js $(UIDIR)/pics.js $(UIDIR)/server_connection.js $(UIDIR)/server_connection.js $(UIDIR)/search.js $(UIDIR)/server_type.js $(UIDIR)/sigdebug.js $(UIDIR)/toolbar.js $(UIDIR)/base64.js $(UIDIR)/Crypto.js $(UIDIR)/SHA1.js 35 go install ./pkg/misc/closure/genclosuredeps && genclosuredeps ./server/camlistored/ui \ 36 > $(UIDIR)/deps.js 37 38 #TODO(mpl): make it output somewhere else 39 minijs: $(NEWUIDIR)/all.js 40 41 $(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 42 tmp/closure-lib/closure/bin/build/closurebuilder.py\ 43 --root tmp/closure-lib/ \ 44 --root server/camlistored/newui/ \ 45 --namespace="camlistore.BlobPage" \ 46 --namespace="camlistore.DebugPage" \ 47 --namespace="camlistore.FiletreePage" \ 48 --namespace="camlistore.GalleryPage" \ 49 --namespace="camlistore.IndexPage" \ 50 --namespace="camlistore.PermanodePage" \ 51 --namespace="camlistore.SearchPage" \ 52 --output_mode=compiled \ 53 --compiler_jar=tmp/closure-compiler/compiler.jar \ 54 --compiler_flags="--compilation_level=SIMPLE_OPTIMIZATIONS" \ 55 --compiler_flags="--jscomp_warning=checkTypes" \ 56 --compiler_flags="--debug" \ 57 --compiler_flags="--formatting=PRETTY_PRINT" \ 58 --compiler_flags="--create_source_map=$(NEWUIDIR)/all.js.map" \ 59 > $(NEWUIDIR)/all.js