136 PKGVERS_COMPONENT= 0.$(RELEASE)
137 PKGVERS_BUILTON= $(RELEASE)
138 PKGVERS_BRANCH= 0.$(ONNV_BUILDNUM)
139 PKGVERS= $(PKGVERS_COMPONENT),$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
140
141 #
142 # The ARCH32 and ARCH64 macros are used in the manifests to express
143 # architecture-specific subdirectories in the installation paths
144 # for isaexec'd commands.
145 #
146 # We can't simply use $(MACH32) and $(MACH64) here, because they're
147 # only defined for the build architecture. To do cross-platform
148 # packaging, we need both values.
149 #
150 i386_ARCH32= i86
151 sparc_ARCH32= sparcv7
152 i386_ARCH64= amd64
153 sparc_ARCH64= sparcv9
154
155 OPENSSL = /usr/bin/openssl
156 OPENSSL10.cmd = $(OPENSSL) version | $(NAWK) '{if($$2<1){print "\043";}}'
157 OPENSSL10_ONLY = $(OPENSSL10.cmd:sh)
158
159 #
160 # macros and transforms needed by pkgmogrify
161 #
162 # If you append to this list using target-specific assignments (:=),
163 # be very careful that the targets are of the form $(PDIR)/pkgname. If
164 # you use a higher level target, or a package list, you'll trigger a
165 # complete reprocessing of all manifests because they'll fail command
166 # dependency checking.
167 #
168 PM_TRANSFORMS= common_actions publish restart_fmri facets defaults \
169 extract_metadata
170 PM_INC= transforms manifests
171
172 PKGMOG_DEFINES= \
173 i386_ONLY=$(POUND_SIGN) \
174 sparc_ONLY=$(POUND_SIGN) \
175 OPENSSL10_ONLY=$(OPENSSL10_ONLY) \
176 $(PKGMACH)_ONLY= \
593 # We keep track of a failure to locate an fmri, so we can fail the
594 # make run, but we still attempt to process each package in the
595 # repo/pkgstat-specific subdir, in hopes of maybe giving some
596 # additional useful info.
597 #
598 # The protolist is used for bfu archive creation, which may be invoked
599 # interactively by the user. Both protolist and PKGLISTS targets
600 # depend on $(PROC_PKGS), but protolist builds them recursively.
601 # To avoid collisions, we insert protolist into the dependency chain
602 # here. This has two somewhat subtle benefits: it allows bfu archive
603 # creation to work correctly, even when -a was not part of NIGHTLY_OPTIONS,
604 # and it ensures that a protolist file here will always correspond to the
605 # contents of the processed manifests, which can vary depending on build
606 # environment.
607 #
608 $(PKGLISTS): $(PROC_PKGS)
609 $(PKGDEBUG)sdotr=$(@F:packages.%=%); \
610 r=$${sdotr%.+(?)}; s=$${sdotr#+(?).}; \
611 print "Generating $$r $$s package list"; \
612 $(RM) $(@); $(TOUCH) $(@); \
613 $(NAWK) 'BEGIN { \
614 if (ARGC < 2) { \
615 exit; \
616 } \
617 retcode = 0; \
618 for (i = 1; i < ARGC; i++) { \
619 do { \
620 e = getline f < ARGV[i]; \
621 } while ((e == 1) && (f !~ /name=pkg.fmri/)); \
622 close(ARGV[i]); \
623 if (e == 1) { \
624 l = split(f, a, "="); \
625 print "depend fmri=" a[l], \
626 "type=$$(PKGDEP_TYPE)"; \
627 } else { \
628 print "no fmri in " ARGV[i] >> "/dev/stderr"; \
629 retcode = 2; \
630 } \
631 } \
632 exit retcode; \
633 }' `find $(PDIR) -type l -a \( $(PKGS:%=-name %.metadata.$$s.$$r -o) \
646
647 #
648 # The .lics files were created during pkgmogrification, and list the
649 # set of licenses to pull from $SRC for each package. Because
650 # licenses may be duplicated between packages, we uniquify them as
651 # well as aggregating them here.
652 #
653 license-list: makesilent
654 $(PKGDEBUG)( for l in `cat $(PROC_PKGS:%.mog=%.lics)`; \
655 do print $$l; done ) | sort -u > $@
656
657 #
658 # Staging the license and description files in the proto area allows
659 # us to do proper unreferenced file checking of both license and
660 # description files without blanket exceptions, and to pull license
661 # content without reference to $CODEMGR_WS during publication.
662 #
663 stage-licenses: license-list FRC
664 $(PKGDEBUG)$(MAKE) -e -f Makefile.lic \
665 PKGDEBUG=$(PKGDEBUG) LICROOT=$(PKGROOT)/licenses \
666 `$(NAWK) '{ \
667 print "$(PKGROOT)/licenses/" $$0; \
668 print "$(PKGROOT)/licenses/" $$0 ".descrip"; \
669 }' license-list` > /dev/null;
670
671 protocmp: makesilent
672 @validate_pkg -a $(PKGMACH) -v \
673 $(EXCEPTIONS:%=-e $(CODEMGR_WS)/exception_lists/%) \
674 -m $(PDIR) -p $(PKGROOT) -p $(TOOLSROOT)
675
676 pmodes: makesilent
677 @validate_pkg -a $(PKGMACH) -M -m $(PDIR) \
678 -e $(CODEMGR_WS)/exception_lists/pmodes
679
680 check: protocmp pmodes
681
682 protolist: proto_list_$(PKGMACH)
683
684 proto_list_$(PKGMACH): $(PROC_PKGS)
685 @validate_pkg -a $(PKGMACH) -L -m $(PDIR) > $(@)
686
|
136 PKGVERS_COMPONENT= 0.$(RELEASE)
137 PKGVERS_BUILTON= $(RELEASE)
138 PKGVERS_BRANCH= 0.$(ONNV_BUILDNUM)
139 PKGVERS= $(PKGVERS_COMPONENT),$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
140
141 #
142 # The ARCH32 and ARCH64 macros are used in the manifests to express
143 # architecture-specific subdirectories in the installation paths
144 # for isaexec'd commands.
145 #
146 # We can't simply use $(MACH32) and $(MACH64) here, because they're
147 # only defined for the build architecture. To do cross-platform
148 # packaging, we need both values.
149 #
150 i386_ARCH32= i86
151 sparc_ARCH32= sparcv7
152 i386_ARCH64= amd64
153 sparc_ARCH64= sparcv9
154
155 OPENSSL = /usr/bin/openssl
156 OPENSSL10.cmd = $(OPENSSL) version | $(AWK) '{if($$2<1){print "\043";}}'
157 OPENSSL10_ONLY = $(OPENSSL10.cmd:sh)
158
159 #
160 # macros and transforms needed by pkgmogrify
161 #
162 # If you append to this list using target-specific assignments (:=),
163 # be very careful that the targets are of the form $(PDIR)/pkgname. If
164 # you use a higher level target, or a package list, you'll trigger a
165 # complete reprocessing of all manifests because they'll fail command
166 # dependency checking.
167 #
168 PM_TRANSFORMS= common_actions publish restart_fmri facets defaults \
169 extract_metadata
170 PM_INC= transforms manifests
171
172 PKGMOG_DEFINES= \
173 i386_ONLY=$(POUND_SIGN) \
174 sparc_ONLY=$(POUND_SIGN) \
175 OPENSSL10_ONLY=$(OPENSSL10_ONLY) \
176 $(PKGMACH)_ONLY= \
593 # We keep track of a failure to locate an fmri, so we can fail the
594 # make run, but we still attempt to process each package in the
595 # repo/pkgstat-specific subdir, in hopes of maybe giving some
596 # additional useful info.
597 #
598 # The protolist is used for bfu archive creation, which may be invoked
599 # interactively by the user. Both protolist and PKGLISTS targets
600 # depend on $(PROC_PKGS), but protolist builds them recursively.
601 # To avoid collisions, we insert protolist into the dependency chain
602 # here. This has two somewhat subtle benefits: it allows bfu archive
603 # creation to work correctly, even when -a was not part of NIGHTLY_OPTIONS,
604 # and it ensures that a protolist file here will always correspond to the
605 # contents of the processed manifests, which can vary depending on build
606 # environment.
607 #
608 $(PKGLISTS): $(PROC_PKGS)
609 $(PKGDEBUG)sdotr=$(@F:packages.%=%); \
610 r=$${sdotr%.+(?)}; s=$${sdotr#+(?).}; \
611 print "Generating $$r $$s package list"; \
612 $(RM) $(@); $(TOUCH) $(@); \
613 $(AWK) 'BEGIN { \
614 if (ARGC < 2) { \
615 exit; \
616 } \
617 retcode = 0; \
618 for (i = 1; i < ARGC; i++) { \
619 do { \
620 e = getline f < ARGV[i]; \
621 } while ((e == 1) && (f !~ /name=pkg.fmri/)); \
622 close(ARGV[i]); \
623 if (e == 1) { \
624 l = split(f, a, "="); \
625 print "depend fmri=" a[l], \
626 "type=$$(PKGDEP_TYPE)"; \
627 } else { \
628 print "no fmri in " ARGV[i] >> "/dev/stderr"; \
629 retcode = 2; \
630 } \
631 } \
632 exit retcode; \
633 }' `find $(PDIR) -type l -a \( $(PKGS:%=-name %.metadata.$$s.$$r -o) \
646
647 #
648 # The .lics files were created during pkgmogrification, and list the
649 # set of licenses to pull from $SRC for each package. Because
650 # licenses may be duplicated between packages, we uniquify them as
651 # well as aggregating them here.
652 #
653 license-list: makesilent
654 $(PKGDEBUG)( for l in `cat $(PROC_PKGS:%.mog=%.lics)`; \
655 do print $$l; done ) | sort -u > $@
656
657 #
658 # Staging the license and description files in the proto area allows
659 # us to do proper unreferenced file checking of both license and
660 # description files without blanket exceptions, and to pull license
661 # content without reference to $CODEMGR_WS during publication.
662 #
663 stage-licenses: license-list FRC
664 $(PKGDEBUG)$(MAKE) -e -f Makefile.lic \
665 PKGDEBUG=$(PKGDEBUG) LICROOT=$(PKGROOT)/licenses \
666 `$(AWK) '{ \
667 print "$(PKGROOT)/licenses/" $$0; \
668 print "$(PKGROOT)/licenses/" $$0 ".descrip"; \
669 }' license-list` > /dev/null;
670
671 protocmp: makesilent
672 @validate_pkg -a $(PKGMACH) -v \
673 $(EXCEPTIONS:%=-e $(CODEMGR_WS)/exception_lists/%) \
674 -m $(PDIR) -p $(PKGROOT) -p $(TOOLSROOT)
675
676 pmodes: makesilent
677 @validate_pkg -a $(PKGMACH) -M -m $(PDIR) \
678 -e $(CODEMGR_WS)/exception_lists/pmodes
679
680 check: protocmp pmodes
681
682 protolist: proto_list_$(PKGMACH)
683
684 proto_list_$(PKGMACH): $(PROC_PKGS)
685 @validate_pkg -a $(PKGMACH) -L -m $(PDIR) > $(@)
686
|