Makefile revision 1195
fb0951b02ebf51a93acf12721d8857d31ce57ba3Lennart Poettering# Makefile for X Consolidation
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# Permission is hereby granted, free of charge, to any person obtaining a
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# copy of this software and associated documentation files (the "Software"),
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# to deal in the Software without restriction, including without limitation
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# the rights to use, copy, modify, merge, publish, distribute, sublicense,
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# and/or sell copies of the Software, and to permit persons to whom the
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Software is furnished to do so, subject to the following conditions:
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# The above copyright notice and this permission notice (including the next
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# paragraph) shall be included in all copies or substantial portions of the
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón# DEALINGS IN THE SOFTWARE.
4e949c11a1df4547d5f102e4131e07b026369cd7Javier Jardón###############################################################################
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Choose options for branding, download sites, etc.
22be093ffb403a1c474037939ca9b88b1ee39f77Lennart Poettering# Makefile.options is created as a link to a file containing the desired
3e2147858f21943d5f4a781c60f33ac22c6096edKay Sievers# options, chosen by the first of these found in open-src/common:
8666abb452db73d9a11ead61251eec42bc531cceKay Sievers# 1) Makefile.options.$(X_BUILD_OPTIONS)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# 2) Makefile.options.<last two components of `domainname`, lowercased>
3d585edbb14b9705c80183aeb16dfd0a28df0ac9Lennart PoetteringMK_OPTS = open-src/common/Makefile.options
0fa2cac4f0cdefaf1addd7f1fe0fd8113db9360bKay Sievers @ if [[ -n "${X_BUILD_OPTIONS}" ]] ; then \
4c6abc93c708762ae3f377eab8dbd357262cc432Koen Kooi if [[ ! -f "$(MK_OPTS).$${X_BUILD_OPTIONS}" ]] ; then \
f15515b5e6a9ebe95c938cc670df6e576fcf9176Filipe Brandenburger print -u2 "Invalid X_BUILD_OPTIONS: " \
f15515b5e6a9ebe95c938cc670df6e576fcf9176Filipe Brandenburger awk -F. '{if (NF > 1) {printf "%s.%s", $$(NF-1), $$NF}}')" ; \
f15515b5e6a9ebe95c938cc670df6e576fcf9176Filipe Brandenburger if [[ ! -f "$(MK_OPTS).$${X_BUILD_OPTIONS}" ]] ; then \
2f96919bcdd0978164c801b21e053fb3b31e8bacFilipe Brandenburger print "Choosing build options from $(MK_OPTS).$${X_BUILD_OPTIONS}" ; \
2f96919bcdd0978164c801b21e053fb3b31e8bacFilipe Brandenburger ln -s "Makefile.options.$${X_BUILD_OPTIONS}" $@
2f96919bcdd0978164c801b21e053fb3b31e8bacFilipe Brandenburger# install & check are run in each subdir via Makefile.subdirs
2f96919bcdd0978164c801b21e053fb3b31e8bacFilipe Brandenburger### Include common definitions