Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. # Application installation
  19. # ========================
  20. # The apps/ directory contains all the opensource apps. The standard build
  21. # process installs all of them. You can use the `app_reg' tool for more
  22. # fine-grain control.
  23. #
  24. export ROOT := $(realpath ..)
  25. include $(ROOT)/Makefile.vars.priv
  26. default: env-install
  27. .PHONY: clean default distclean install
  28. APPS := about \
  29. beeswax \
  30. metastore \
  31. filebrowser \
  32. help \
  33. jobbrowser \
  34. jobsub \
  35. oozie \
  36. proxy \
  37. useradmin \
  38. impala \
  39. pig \
  40. search \
  41. hbase \
  42. sqoop \
  43. zookeeper \
  44. rdbms \
  45. spark \
  46. security
  47. ################################################
  48. # Install all applications into the Desktop environment
  49. ################################################
  50. EGG_INFO_TARGETS := $(APPS:%=.recursive-egg-info/%)
  51. .recursive-egg-info/%:
  52. @$(MAKE) -C $* egg-info ext-eggs
  53. .PHONY: env-install
  54. env-install: $(EGG_INFO_TARGETS)
  55. $(APP_REG) --install $(APPS) --relative-paths
  56. ################################################
  57. # Distribution
  58. ################################################
  59. INSTALL_BDIST_TARGETS := $(APPS:%=.recursive-install-bdist/%)
  60. .recursive-install-bdist/%: %
  61. INSTALL_DIR=$(INSTALL_DIR)/apps/$< $(MAKE) -C $< install-bdist
  62. .PHONY: install
  63. install: install-source-parts $(INSTALL_BDIST_TARGETS)
  64. #
  65. # install-source-parts:
  66. # Installs the non-app parts into the INSTALL_DIR
  67. #
  68. SOURCE_PARTS = Makefile
  69. .PHONY: install-source-parts
  70. install-source-parts:
  71. mkdir -p $(INSTALL_DIR)/apps
  72. tar cf - $(SOURCE_PARTS) | tar -C $(INSTALL_DIR)/apps -xf -
  73. ################################################
  74. # Clean all the apps
  75. ################################################
  76. CLEAN_TARGETS := $(APPS:%=.recursive-clean/%)
  77. DISTCLEAN_TARGETS := $(APPS:%=.recursive-distclean/%)
  78. EXT_CLEAN_TARGETS := $(APPS:%=.recursive-ext-clean/%)
  79. clean: $(CLEAN_TARGETS)
  80. .recursive-clean/%:
  81. @$(MAKE) -C $* clean
  82. @$(APP_REG) --remove $* ||:
  83. distclean: $(DISTCLEAN_TARGETS)
  84. .recursive-distclean/%:
  85. @$(MAKE) -C $* distclean
  86. @$(APP_REG) --remove $* ||:
  87. ext-clean: $(EXT_CLEAN_TARGETS)
  88. .recursive-ext-clean/%:
  89. @$(MAKE) -C $* ext-clean
  90. ################################################
  91. # Internationalization
  92. ################################################
  93. I18N_APPS := about \
  94. beeswax \
  95. metastore \
  96. filebrowser \
  97. jobbrowser \
  98. jobsub \
  99. useradmin \
  100. oozie \
  101. impala \
  102. pig \
  103. search \
  104. hbase \
  105. sqoop \
  106. zookeeper \
  107. rdbms \
  108. spark
  109. COMPILE_LOCALE_TARGETS := $(I18N_APPS:%=.recursive-compile-locales/%)
  110. compile-locales: $(COMPILE_LOCALE_TARGETS)
  111. .recursive-compile-locales/%:
  112. @$(MAKE) -C $* compile-locale