Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. filebrowser \
  31. help \
  32. jobbrowser \
  33. jobsub \
  34. proxy \
  35. useradmin
  36. # <<<< SDK ONLY
  37. APPS += hello \
  38. jframegallery
  39. # END SDK ONLY >>>>
  40. ################################################
  41. # Install all applications into the Desktop environment
  42. ################################################
  43. EGG_INFO_TARGETS := $(APPS:%=.recursive-egg-info/%)
  44. .recursive-egg-info/%:
  45. @$(MAKE) -C $* egg-info ext-eggs
  46. .PHONY: env-install
  47. env-install: $(EGG_INFO_TARGETS)
  48. $(APP_REG) --install $(APPS)
  49. ################################################
  50. # Distribution
  51. ################################################
  52. INSTALL_BDIST_TARGETS := $(APPS:%=.recursive-install-bdist/%)
  53. .recursive-install-bdist/%: %
  54. INSTALL_DIR=$(INSTALL_DIR)/apps/$< \
  55. INSTALL_CONF_DIR=$(INSTALL_DIR)/desktop/conf \
  56. $(MAKE) -C $< install-bdist
  57. .PHONY: install
  58. install: install-source-parts $(INSTALL_BDIST_TARGETS)
  59. #
  60. # install-source-parts:
  61. # Installs the non-app parts into the INSTALL_DIR
  62. #
  63. SOURCE_PARTS = Makefile
  64. .PHONY: install-source-parts
  65. install-source-parts:
  66. mkdir -p $(INSTALL_DIR)/apps
  67. tar cf - $(SOURCE_PARTS) | tar -C $(INSTALL_DIR)/apps -xf -
  68. ################################################
  69. # Clean all the apps
  70. ################################################
  71. CLEAN_TARGETS := $(APPS:%=.recursive-clean/%)
  72. DISTCLEAN_TARGETS := $(APPS:%=.recursive-distclean/%)
  73. clean: $(CLEAN_TARGETS)
  74. .recursive-clean/%:
  75. @$(MAKE) -C $* clean
  76. @$(APP_REG) --remove $* ||:
  77. distclean: $(DISTCLEAN_TARGETS)
  78. .recursive-distclean/%:
  79. @$(MAKE) -C $* distclean
  80. @$(APP_REG) --remove $* ||: