#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
#
# Starting with Juno, Horizon depends on a number of XStatic modules
# to deliver the required JavaScript modules. This delivery method
# may be changing in future releases, so the XStatic modules for now
# are built as part of Horizon rather than being stand alone
#
# XStatic itself is only used during the build process and so while it
# is downloaded and installed in the proto area, none of its
# components are delivered in the Horizon package itself.
#
# Odd django failures on S11; OpenStack is back-ported to 11.3 anyway, so no
# need to include it in evaluation builds.
# Since this is an app, and doesn't provide any public library interfaces, we
# only need to deliver one version. The manifest is parameterized, though.
# Copy the Oracle branding files, Django app customizations, and
# Horizon SMF service components into place
# Generate .pyc files for the files in the proto directory
# Collect the JavaScript files and compress the static assets
(set -e; \
collectstatic --noinput -v 0; \
./manage.py collectstatic --noinput -v 0; \
# Patch openstack_dashboard/settings.py to remove the xstatic imports
# and use. This is done after 'gmake prep' because we need the
# xstatic imports for static asset collection.
#
# The xstatic target builds each XStatic component alongside Horizon.
# This is done because the Django script which collects
# the JavaScript libraries and compresses the static assets
# (manage.py) requires the packages be "installed". Rather than
# forcing a CBE update for any revision of any XStatic module, we use
# what's specified above.
#
# This extra work is done at package build time rather than when the
# application runs because a) compressing the assets ahead of time
# makes things faster and b) this allows the package to be entirely
# contained in /usr rather than having a separate spot in /var for the
# webservd user to write compressed assets to as they get used.
#
cd $$xs_archive; \
--force \
cd ../; \
done
# common targets
build: $(BUILD_NO_ARCH)
# make sure all of the xstatic modules are built
test: $(NO_TESTS)
# Includes packages required by Django's manage.py during the Horizon build