Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 103 lines (88 sloc) 3.097 kb
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
1 #
2 # Licensed to Cloudera, Inc. under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. Cloudera, Inc. licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17
18
19 # <<<< DEV ONLY
20
21 PROD_INCLUDES := \
22 apps \
23 desktop \
24 ext/thirdparty \
25 LICENSE.txt \
26 Makefile* \
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
27 maven \
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
28 tools/app_reg \
29 tools/virtual-bootstrap \
863966f HUE-555. Build should not require a system python-setuptools
bc Wong authored
30 VERSION \
2a952c3 HUE-40. virtualenv_support missing setuptools for py2.6
bc Wong authored
31 VERSION_DATA
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
32
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
33 # Check for things in BDIST_EXCLUDES in various apps
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
34 PROD_EXCLUDES := \
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
35 apps/beeswax/thrift \
36 apps/hello \
37 apps/jframegallery \
38 build \
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
39 desktop/conf \
40 desktop/desktop.db \
41 desktop/devtools.mk \
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
42 desktop/libs/hadoop/regenerate-thrift.sh \
43 ext/thirdparty/js/manifest.json \
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
44 ext/thirdparty/README.md \
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
45 Makefile.tarball
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
46
47 # Macro to remove things we don't want to package
48 define remove_devtree_exclusions
49 @find $(1) \( -name '.git' -o \
50 -name '.gitignore' -o \
51 -name '.*~' -o \
52 -name '.#*' -o \
53 -name '.pylintrc' -o \
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
54 -name 'build' -o \
55 -name 'logs' -o \
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
56 -name 'tags' -o \
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
57 -name 'target' -o \
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
58 -name 'desktop.db' -o \
59 -name 'app.reg' -o \
60 -name '*.py[co]' -o \
61 -name '.*.sw?' \) -prune -exec rm -rf {} \;
62 endef
63
64
65 ###################################
66 # Packaging for production release
67 ###################################
68
69 # Make a tarball
70 .PHONY: prod
71 prod: $(BLD_DIR_PROD_TGZ)
72
73 $(BLD_DIR_PROD_TGZ): $(BLD_DIR_PROD)
74 @tar -C $(BLD_DIR_PROD)/.. -czf $(BLD_DIR_PROD_TGZ) hue-$(DESKTOP_VERSION)
75 @echo "--- Generated $(BLD_DIR_PROD_TGZ)"
76
77 .PHONY: $(BLD_DIR_PROD)
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
78 $(BLD_DIR_PROD): apps crepo docs
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
79 @echo "--- Preparing general distribution tree at $@"
80 @rm -rf $@
81 @mkdir -p $@
a03986b HUE-565. Hue tarball contains duplicated js libraries
bc Wong authored
82 tar -cf - $(PROD_INCLUDES) | tar -C $(BLD_DIR_PROD) -xf -
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
83
84 @echo "---- Removing exclusions"
85 @for i in $(PROD_EXCLUDES) ; do rm -rf $(BLD_DIR_PROD)/$$i ; done
86 $(call remove_devtree_exclusions,$(BLD_DIR_PROD))
87
88 @echo "---- Copying misc files"
89 @cp $(ROOT)/dist/* $(BLD_DIR_PROD)
90 @mv $(BLD_DIR_PROD)/desktop/conf{.dist,}
91 cp -r $(BLD_DIR_DOC) $(BLD_DIR_PROD)/docs
92
93 @echo "---- Stripping Makefiles"
94 @$(call STRIP_DEV, $(ROOT)/Makefile, $(BLD_DIR_PROD)/Makefile)
95 @$(call STRIP_DEV, $(ROOT)/Makefile.vars.priv, $(BLD_DIR_PROD)/Makefile.vars.priv)
96 @$(call STRIP_DEV, $(APPS_DIR)/Makefile, $(BLD_DIR_PROD)/apps/Makefile)
97 @$(call STRIP_DEV, $(DESKTOP_DIR)/Makefile, $(BLD_DIR_PROD)/desktop/Makefile)
10eb8ac HUE-449. tarball build changes after mavenization
bc Wong authored
98 @echo "---- Removing build directories"
99 find $(BLD_DIR_PROD) -name build -prune -exec rm -rf {} \;
100 @$(MAKE) -C $(BLD_DIR_PROD) ext-clean
ae333e4 hue (formerly Cloudera Desktop) from internal commit 4694ac0434dad851…
bcwalrus authored
101
102 # END DEV ONLY >>>>
Something went wrong with that request. Please try again.