Revert "gcc-6: drop documentation patches"
[unleashed-userland.git] / make-rules / environment.mk
blobd8f474c80140cf40b7037644ef5892bffe7529b3
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
25 PFEXEC = /usr/bin/pfexec
27 define separator-line
28 @$(PYTHON) -c 'l="="*(40-len("$1")/2); print("%s%s%s" % (l, "$1", l))'
29 endef
31 component-environment-check::
32 $(call separator-line,Workspace)
33 @echo " Path: $(WS_TOP)"
34 @echo " Branch: $$(git rev-parse --abbrev-ref HEAD)"
35 @echo " Changeset: $$(git rev-parse HEAD)"
36 $(call separator-line,System)
37 @/usr/bin/uname -a
38 @echo "Zone: $$(/usr/bin/zonename)"
39 @echo "Zone IP type: $$(/usr/bin/zonename -t)"
40 @/usr/sbin/psrinfo -vp
41 @/usr/sbin/ipadm show-addr
42 $(call separator-line,Required Packages)
43 @/usr/bin/pkg list -vH $(REQUIRED_PACKAGES:%=/%)
44 $(call separator-line)
46 component-environment-prep::
47 @echo "Adding required packages to build environment..."
48 @-echo $(REQUIRED_PACKAGES:%=/%) | xargs \
49 $(PFEXEC) /usr/bin/pkg install --accept -v
51 # Short aliases for user convenience
52 env-check:: component-environment-check
53 env-prep:: component-environment-prep