Skip to content
This repository
tree: 3752cffdf5
Fetching contributors…

Cannot retrieve contributors at this time

file 113 lines (93 sloc) 3.142 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
#
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Application installation
# ========================
# The apps/ directory contains all the opensource apps. The standard build
# process installs all of them. You can use the `app_reg' tool for more
# fine-grain control.
#

export ROOT := $(realpath ..)
include $(ROOT)/Makefile.vars.priv

default: env-install

.PHONY: clean default distclean install

APPS := about \
beeswax \
filebrowser \
help \
jobbrowser \
jobsub \
proxy \
        shell \
useradmin

################################################
# Install all applications into the Desktop environment
################################################
EGG_INFO_TARGETS := $(APPS:%=.recursive-egg-info/%)
.recursive-egg-info/%:
@$(MAKE) -C $* egg-info ext-eggs

.PHONY: env-install
env-install: $(EGG_INFO_TARGETS)
$(APP_REG) --install $(APPS)


################################################
# Distribution
################################################
INSTALL_BDIST_TARGETS := $(APPS:%=.recursive-install-bdist/%)
.recursive-install-bdist/%: %
INSTALL_DIR=$(INSTALL_DIR)/apps/$< $(MAKE) -C $< install-bdist

.PHONY: install
install: install-source-parts $(INSTALL_BDIST_TARGETS)

#
# install-source-parts:
# Installs the non-app parts into the INSTALL_DIR
#
SOURCE_PARTS = Makefile

.PHONY: install-source-parts
install-source-parts:
mkdir -p $(INSTALL_DIR)/apps
tar cf - $(SOURCE_PARTS) | tar -C $(INSTALL_DIR)/apps -xf -


################################################
# Clean all the apps
################################################
CLEAN_TARGETS := $(APPS:%=.recursive-clean/%)
DISTCLEAN_TARGETS := $(APPS:%=.recursive-distclean/%)
EXT_CLEAN_TARGETS := $(APPS:%=.recursive-ext-clean/%)

clean: $(CLEAN_TARGETS)
.recursive-clean/%:
@$(MAKE) -C $* clean
@$(APP_REG) --remove $* ||:

distclean: $(DISTCLEAN_TARGETS)
.recursive-distclean/%:
@$(MAKE) -C $* distclean
@$(APP_REG) --remove $* ||:

ext-clean: $(EXT_CLEAN_TARGETS)
.recursive-ext-clean/%:
@$(MAKE) -C $* ext-clean


################################################
# Internationalization
################################################
I18N_APPS := about \
  beeswax \
  filebrowser \
  jobbrowser \
  jobsub \
  shell \
  useradmin

COMPILE_LOCALE_TARGETS := $(I18N_APPS:%=.recursive-compile-locales/%)
compile-locales: $(COMPILE_LOCALE_TARGETS)
.recursive-compile-locales/%:
@$(MAKE) -C $* compile-locale
Something went wrong with that request. Please try again.