11PRODUCT =metacat
22BUILD_DIR =$(HOME ) /build/$(PRODUCT )
3- TARDIR =/tmp
3+ TARDIR =/tmp/ $( USER )
44LIBDIR =$(BUILD_DIR ) /lib
55MODULEDIR =$(LIBDIR ) /metacat
66SERVER_DIR =$(BUILD_DIR ) /server
77DOCSDIR =$(BUILD_DIR ) /docs
88DOCSREL =$(BUILD_DIR ) /docs
99UI_DIR =$(BUILD_DIR ) /ui
10+ DEPS_DIR =$(BUILD_DIR ) /dependencies
1011SERVER_TAR =$(TARDIR ) /$(PRODUCT ) _server_$(VERSION ) .tar
12+ CLIENT_TAR =$(TARDIR ) /$(PRODUCT ) _client_$(VERSION ) .tar
1113
12- all :
14+ CANNED_MODULES =pythreader jwt requests
15+ CANNED_PIP_MODULES="pythreader> =2.8.0" "pyjwt" "requests"
16+
17+ all :
1318 echo Use " make dune" or " make generic"
14-
19+
1520dune :
1621 make VERSION=` python metacat/version.py` _dune dune_with_version_defined
1722
1823generic :
1924 make VERSION=` python metacat/version.py` generic_with_version_defined
2025
21- dune_with_version_defined : build dune_specifics
22- make VERSION=$(VERSION ) tars
23-
24- generic_with_version_defined : build
25- make VERSION=$(VERSION ) tars
26+ dune_with_version_defined : dune_specifics tars
2627
27- tars : $(TARDIR )
28+ generic_with_version_defined : tars
29+
30+ tars : build $(TARDIR )
2831 cd $(BUILD_DIR ) ; tar cf $(SERVER_TAR ) lib server docs
2932 @echo \|
30- @echo \| tarfile is created: $(SERVER_TAR )
33+ @echo \| Server tarfile is created: $(SERVER_TAR )
3134 @echo \|
3235
36+ client :
37+ make VERSION=` python metacat/version.py` client_with_version_defined
38+
39+ client_with_version_defined : canned_client $(TARDIR )
40+ cd $(BUILD_DIR ) ; tar cf $(CLIENT_TAR ) lib dependencies docs ui canned_client_setup.sh
41+ @echo \|
42+ @echo \| Canned client tarfile is created: $(CLIENT_TAR )
43+ @echo \|
44+
45+ canned_client : build $(DEPS_DIR )
46+ pip install $(CANNED_PIP_MODULES )
47+ python tools/copy_modules.py -c $(CANNED_MODULES ) $(DEPS_DIR )
48+ rm -rf $(DEPS_DIR ) /* /__pycache__
49+ find $(DEPS_DIR ) -type f -name \* .pyc -exec rm -f {} \;
50+ cp canned_client_setup.sh $(BUILD_DIR )
51+
3352dune_specifics :
3453 cd DUNE_specials; make SERVER_DIR=$(SERVER_DIR ) build
3554
@@ -38,13 +57,17 @@ build: clean $(BUILD_DIR)
3857 cd metacat; make LIBDIR=$(LIBDIR ) VERSION=$(VERSION ) BINDIR=$(UI_DIR ) build
3958 cd webserver; make SERVER_DIR=$(SERVER_DIR ) LIBDIR=$(LIBDIR ) VERSION=$(VERSION ) build
4059 cd docs; make SERVER_DIR=$(SERVER_DIR ) DOCSDIR=$(DOCSDIR ) -f Makefile-product build
41-
60+ find $(BUILD_DIR ) -type d -name __pycache__ -print | xargs rm -rf
61+ find $(BUILD_DIR ) -type f -name \* .pyc -print -exec rm {} \;
62+
4263clean :
4364 rm -rf $(BUILD_DIR ) $(SERVER_TAR )
4465
4566$(TARDIR ) :
4667 mkdir -p $@
4768
69+ $(DEPS_DIR ) :
70+ mkdir -p $@
4871
4972$(BUILD_DIR ) :
5073 mkdir -p $@
0 commit comments