components/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 09 Dec 2013 23:00:29 -0800
changeset 1589 f9f1e8f54c5a
parent 1558 6cdada0dd56a
child 1591 24aca88f3e99
permissions -rw-r--r--
Added tag s12-37 for changeset 8117331776d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     1
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     2
# CDDL HEADER START
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     3
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     7
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    11
# and limitations under the License.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    12
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    18
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    19
# CDDL HEADER END
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    20
#
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1038
diff changeset
    21
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    22
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    23
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    24
include ../make-rules/shared-macros.mk
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    25
23
e7ed56b7c498 autogenerate components to build
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 21
diff changeset
    26
# for now, the assumption is we build any directory with a Makefile.  This may
e7ed56b7c498 autogenerate components to build
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 21
diff changeset
    27
# not always be the case. If we build a new make-like tool to drive the upper
e7ed56b7c498 autogenerate components to build
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 21
diff changeset
    28
# level build, it may make different decisions and will need to include
e7ed56b7c498 autogenerate components to build
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 21
diff changeset
    29
# appropriate dependency information.
e7ed56b7c498 autogenerate components to build
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 21
diff changeset
    30
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
    31
# components.mk is auto-generated by the build tools.  It populates the
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
    32
# COMPONENT_DIRS macro with a list of all directories in the workspace that
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
    33
# contain a component.
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    34
components.mk:	# Makefile # $(WS_TOP)/components
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
    35
	@echo "Generating component list..."
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    36
	@$(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
    37
		| sed -e 's;^$(shell pwd)/;COMPONENT_DIRS += ;g' >$@
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
    38
58
d8024c042a00 7011369 gmake complains about fresh userland bits
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 53
diff changeset
    39
-include components.mk
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
    40
225
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    41
# depends.mk is auto-generated by concatenating 'depend.mk' files in each
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    42
# component directory.
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    43
depends.mk:     components.mk
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    44
	@echo "Generating component dependencies..."
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    45
	@cat $(shell $(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    46
		| sed -e 's;^$(shell pwd)/;;g' -e 's;$$;/depend.mk;g') >$@ \
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    47
		2>/dev/null
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    48
 
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    49
-include depends.mk
2f3e03a69313 7040199 Update tcl to 8.5.9
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents: 145
diff changeset
    50
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    51
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    52
download:		TARGET = download
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    53
prep:			TARGET = prep
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    54
build:			TARGET = build
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    55
install:		TARGET = install
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    56
publish:		TARGET = publish
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    57
clean:			TARGET = clean
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    58
clobber:		TARGET = clobber
83
9ab0deb97868 7017671 move patch to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 70
diff changeset
    59
test:			TARGET = test
1038
3b4d8f56a1bf 15804658 SUNBT7185081-12.0 Userland could use component-hook target from SFW
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 827
diff changeset
    60
component-hook:		TARGET = component-hook
83
9ab0deb97868 7017671 move patch to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 70
diff changeset
    61
prep build install publish test:	TEMPLATE_ZONE=$(ZONE)
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 92
diff changeset
    62
prep build install publish test:	LOG = >$(WS_LOGS)/$(@F).$(TARGET).log 2>&1
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    63
92
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
    64
# turn off pkglint for the individual component builds.
623
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
    65
ifeq   ($(strip $(PKGLINT_COMPONENT)),)
92
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
    66
publish:		MAKEFLAGS += PKGLINT=/bin/true
623
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
    67
endif
92
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
    68
1416
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
    69
# In order to work around an IPS simultaneous publication issue and to improve
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
    70
# top level build performance, we postpone catalog and index updates until the
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
    71
# end of the build.  Individual component builds postpone the updates until
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
    72
# they have published all of their packages.
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
    73
publish:		MAKEFLAGS += DISABLE_IPS_CATALOG_AND_INDEX_UPDATES=yes
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
    74
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
    75
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    76
.DEFAULT:	publish
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    77
313
e30cc0dc4e8b 7053576 canonical source location for beanshell, gcc3, and tidy is changing
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 225
diff changeset
    78
build install publish test: $(COMPONENT_DIRS)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    79
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    80
COMPONENT_DIRS.nosetup =	$(COMPONENT_DIRS:%=%.nosetup)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    81
313
e30cc0dc4e8b 7053576 canonical source location for beanshell, gcc3, and tidy is changing
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 225
diff changeset
    82
download prep:	$(COMPONENT_DIRS.nosetup)
e30cc0dc4e8b 7053576 canonical source location for beanshell, gcc3, and tidy is changing
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 225
diff changeset
    83
1038
3b4d8f56a1bf 15804658 SUNBT7185081-12.0 Userland could use component-hook target from SFW
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 827
diff changeset
    84
component-hook:	$(COMPONENT_DIRS.nosetup)
3b4d8f56a1bf 15804658 SUNBT7185081-12.0 Userland could use component-hook target from SFW
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 827
diff changeset
    85
313
e30cc0dc4e8b 7053576 canonical source location for beanshell, gcc3, and tidy is changing
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 225
diff changeset
    86
clean:		$(COMPONENT_DIRS.nosetup)
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    87
	$(RM) components.mk depends.mk .profile
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    88
313
e30cc0dc4e8b 7053576 canonical source location for beanshell, gcc3, and tidy is changing
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 225
diff changeset
    89
clobber:	$(COMPONENT_DIRS.nosetup) clean
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 623
diff changeset
    90
	@cd ../tools ; echo "clobbering tools..." ; $(GMAKE) clobber
53
e398cb2c4b45 7004049 SUNWa2ps should move to userland with a2ps
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
    91
	$(RM) -r $(WS_REPO) $(WS_LOGS) $(WS_LINT_CACHE)
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    92
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 623
diff changeset
    93
70
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
    94
setup:	$(WS_LOGS) $(WS_REPO) tools $(WS_LINT_CACHE)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    95
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    96
$(WS_LOGS):
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    97
	$(MKDIR) $@
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    98
70
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
    99
$(WS_REPO):
105
da9e87a40aec 7021891 repo created by build should be v4, not v3
Danek Duvall <danek.duvall@oracle.com>
parents: 99
diff changeset
   100
	$(PKGREPO) create $(PKG_REPO)
da9e87a40aec 7021891 repo created by build should be v4, not v3
Danek Duvall <danek.duvall@oracle.com>
parents: 99
diff changeset
   101
	$(PKGREPO) add-publisher -s $(PKG_REPO) $(PUBLISHER)
827
0944d8c0158b 7169052 Integrate Visual Panels into Userland
Dan Labrecque <dan.labrecque@oracle.com>
parents: 774
diff changeset
   102
	$(PKGREPO) add-publisher -s $(PKG_REPO) $(PUBLISHER_LOCALIZABLE)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   103
623
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
   104
DUMMYPKG =  "set name=fmri value=pkg:/dummy@0,$(BUILD_VERSION)\n"
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
   105
DUMMYPKG += "set pkg.summary=dummy\n"
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
   106
DUMMYPKG += "set org.opensolaris.consolidation=userland\n"
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
   107
DUMMYPKG += "set info.classification=org.opensolaris.category.2008:System/Core"
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
   108
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1038
diff changeset
   109
$(WS_LINT_CACHE):	$(WS_LOGS) tools
70
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
   110
ifdef CANONICAL_REPO
1558
6cdada0dd56a 17747240 gmake setup is masking pkglint failures
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 1416
diff changeset
   111
	@echo "Generating pkglint(1) cache from CANONICAL_REPO $(CANONICAL_REPO)..."
623
15f87c23a86e 7109831 userland pkglint should audit runpaths
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 528
diff changeset
   112
	@(echo $(DUMMYPKG) | $(PKGLINT) \
70
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
   113
		-c $(WS_LINT_CACHE) -r $(CANONICAL_REPO) /dev/fd/0 \
1558
6cdada0dd56a 17747240 gmake setup is masking pkglint failures
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 1416
diff changeset
   114
		>$(WS_LOGS)/naughty-canonical-repo-actions 2>&1 || \
6cdada0dd56a 17747240 gmake setup is masking pkglint failures
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 1416
diff changeset
   115
		( echo "pkglint(1) failed, please see $(WS_LOGS)/naughty-canonical-repo-actions"; \
6cdada0dd56a 17747240 gmake setup is masking pkglint failures
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 1416
diff changeset
   116
		  exit 1 ) \
6cdada0dd56a 17747240 gmake setup is masking pkglint failures
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 1416
diff changeset
   117
	)
70
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
   118
else
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
   119
	$(MKDIR) $(WS_LINT_CACHE)
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
   120
endif
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 58
diff changeset
   121
6
20f80c019d73 add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2
diff changeset
   122
tools:
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 623
diff changeset
   123
	@cd ../tools ; echo "building tools..." ; $(GMAKE) clean setup
6
20f80c019d73 add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2
diff changeset
   124
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   125
# $(WS_COMPONENTS) is the home directory for the zone user, so create a profile
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   126
# to pass a few things on to zone based builds
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   127
.profile:
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   128
	echo "PATH=$(PATH)" >>$@
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   129
	echo "WS_TOP=$(WS_TOP)" >>$@
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   130
	echo "export PATH WS_TOP" >>$@
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   131
313
e30cc0dc4e8b 7053576 canonical source location for beanshell, gcc3, and tidy is changing
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 225
diff changeset
   132
$(COMPONENT_DIRS):	$(WS_LOGS) setup FORCE
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
   133
	@cd $@ && echo "$(TARGET) $@" && \
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   134
	 $(BASS_O_MATIC) $(TEMPLATE_ZONE:%=--template-zone %) \
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
   135
			 $(@:%=--component %) --make $(TARGET) $(LOG)
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   136
92
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   137
publish:
1416
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
   138
	$(PKGREPO) refresh -s $(PKG_REPO)
500
3d451539794b 7064724 userland should deliver a consolidation incorporation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 313
diff changeset
   139
	$(WS_TOOLS)/userland-incorporator --repository $(PKG_REPO) \
3d451539794b 7064724 userland should deliver a consolidation incorporation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 313
diff changeset
   140
	  -p pkg:/consolidation/$(CONSOLIDATION)/$(CONSOLIDATION)-incorporation@0.$(OS_VERSION),$(BUILD_VERSION) \
3d451539794b 7064724 userland should deliver a consolidation incorporation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 313
diff changeset
   141
	  -s "$(CONSOLIDATION) consolidation incorporation" \
3d451539794b 7064724 userland should deliver a consolidation incorporation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 313
diff changeset
   142
	  -d "This incorporation constrains packages from the $(CONSOLIDATION) consolidation" \
3d451539794b 7064724 userland should deliver a consolidation incorporation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 313
diff changeset
   143
	  -c $(CONSOLIDATION) >$(WS_LOGS)/$(CONSOLIDATION)-incorporation.p5m
3d451539794b 7064724 userland should deliver a consolidation incorporation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 313
diff changeset
   144
	$(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest \
3d451539794b 7064724 userland should deliver a consolidation incorporation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 313
diff changeset
   145
	  $(WS_LOGS)/$(CONSOLIDATION)-incorporation.p5m
1416
a87a9e85090e 17231570 full userland build sporadically fails during 'pkgsend publish'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 1188
diff changeset
   146
	$(PKGREPO) refresh -s $(PKG_REPO)
92
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   147
# pkglint all of the published manifests in one batch.
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   148
ifdef CANONICAL_REPO
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   149
	@echo 'pkglinting all package manifests...'
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   150
	@$(ENV) PYTHONPATH=$(WS_TOOLS)/python $(PKGLINT) \
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   151
			-c $(WS_LINT_CACHE) -f $(WS_TOOLS)/pkglintrc \
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   152
			$(shell find . -name 'manifest-*.published')
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   153
endif
b4be50cb7106 7020081 userland parallel builds break in pkglint
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 83
diff changeset
   154
313
e30cc0dc4e8b 7053576 canonical source location for beanshell, gcc3, and tidy is changing
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 225
diff changeset
   155
$(COMPONENT_DIRS.nosetup):	$(WS_LOGS) FORCE
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
   156
	@cd $(@:%.nosetup=%) && echo "$(TARGET) $(@:%.nosetup=%)" && \
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   157
	 $(BASS_O_MATIC) $(TEMPLATE_ZONE:%=--template-zone %) \
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
   158
			 $(@:%.nosetup=--component %) --make $(TARGET) $(LOG)
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 23
diff changeset
   159
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   160
FORCE: