github.com/slspeek/camlistore_namedsearch@v0.0.0-20140519202248-ed6f70f7721a/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: fmt 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 fmt: 33 go fmt camlistore.org/cmd... camlistore.org/dev... camlistore.org/misc... camlistore.org/pkg... camlistore.org/server... 34 35 genclosuredeps: $(UIDIR)/deps.js 36 37 $(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 38 go install ./pkg/misc/closure/genclosuredeps && genclosuredeps ./server/camlistored/ui \ 39 > $(UIDIR)/deps.js 40 41 #TODO(mpl): make it output somewhere else 42 minijs: $(NEWUIDIR)/all.js 43 44 $(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 45 tmp/closure-lib/closure/bin/build/closurebuilder.py\ 46 --root tmp/closure-lib/ \ 47 --root server/camlistored/newui/ \ 48 --namespace="camlistore.BlobPage" \ 49 --namespace="camlistore.DebugPage" \ 50 --namespace="camlistore.FiletreePage" \ 51 --namespace="camlistore.GalleryPage" \ 52 --namespace="camlistore.IndexPage" \ 53 --namespace="camlistore.PermanodePage" \ 54 --namespace="camlistore.SearchPage" \ 55 --output_mode=compiled \ 56 --compiler_jar=tmp/closure-compiler/compiler.jar \ 57 --compiler_flags="--compilation_level=SIMPLE_OPTIMIZATIONS" \ 58 --compiler_flags="--jscomp_warning=checkTypes" \ 59 --compiler_flags="--debug" \ 60 --compiler_flags="--formatting=PRETTY_PRINT" \ 61 --compiler_flags="--create_source_map=$(NEWUIDIR)/all.js.map" \ 62 > $(NEWUIDIR)/all.js