Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. ifeq ($(ROOT),)
  19. $(error "Error: Expect the environment variable $$ROOT to point to the Desktop installation")
  20. endif
  21. include $(ROOT)/Makefile.sdk
  22. default::
  23. @echo ' env-install : Install into virtual-env'
  24. #
  25. # env-install
  26. # Install app into the virtual environment.
  27. #
  28. .PHONY: env-install
  29. env-install: compile ext-env-install
  30. @echo '--- Installing $(APP_NAME) into virtual-env'
  31. @$(ENV_PYTHON) setup.py develop -N -q
  32. ###################################
  33. # Build Hadoop plugins
  34. ###################################
  35. PLUGIN_DIR := $(realpath .)
  36. PLUGIN_JAVA_LIB := $(PLUGIN_DIR)/java-lib
  37. PLUGIN_JAVA_DIR := $(PLUGIN_DIR)/java
  38. BLD_DIR_PLUGINS := $(PLUGIN_DIR)/java/target
  39. compile: $(DESKTOP_PLUGIN_JAR)
  40. # Build the plugin jar iff the source is present
  41. ifneq (,$(wildcard $(PLUGIN_JAVA_DIR)))
  42. $(DESKTOP_PLUGIN_JAR): $(shell find $(PLUGIN_JAVA_DIR) -type f)
  43. mkdir -p $(PLUGIN_JAVA_LIB)
  44. @echo "--- Building Hadoop plugins"
  45. cd $(PLUGIN_JAVA_DIR) && mvn clean install -DskipTests $(MAVEN_OPTIONS)
  46. cp $(BLD_DIR_PLUGINS)/hue-plugins-$(MAVEN_VERSION).jar $(DESKTOP_PLUGIN_JAR)
  47. clean::
  48. rm -rf $(PLUGIN_JAVA_LIB)
  49. cd $(PLUGIN_JAVA_DIR) && mvn clean $(MAVEN_OPTIONS) ||:
  50. else
  51. $(DESKTOP_PLUGIN_JAR):
  52. $(error Cannot build hadoop plugin without source)
  53. endif
  54. #
  55. # Tell the `bdist' target to exclude our java source.
  56. #
  57. BDIST_EXCLUDES += \
  58. --exclude=java \
  59. --exclude=regenerate-thrift.sh