Makefile (0ae9a84f82e18b30b7354ca5193afdbbb1cdc880) Makefile (2bd79b08f4b447d333b2b97efd7e4bf855f5d409)
1#
2# CDDL HEADER START
3#
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.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 10 unchanged lines hidden (view full) ---

19# CDDL HEADER END
20#
21
22#
23# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
25# Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
26# Copyright 2016 RackTop Systems.
1#
2# CDDL HEADER START
3#
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.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 10 unchanged lines hidden (view full) ---

19# CDDL HEADER END
20#
21
22#
23# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
25# Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
26# Copyright 2016 RackTop Systems.
27# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
27# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
28#
29
30include $(SRC)/Makefile.master
31include $(SRC)/Makefile.buildnum
32
33#
34# Make sure we're getting a consistent execution environment for the
35# embedded scripts.

--- 586 unchanged lines hidden (view full) ---

622clobber: clean
623 $(RM) -r $(CLOBBERFILES)
624
625#
626# This rule assumes that all links in the $PKGSTAT directories
627# point to valid manifests, and will fail the make run if one
628# does not contain an fmri.
629#
28#
29
30include $(SRC)/Makefile.master
31include $(SRC)/Makefile.buildnum
32
33#
34# Make sure we're getting a consistent execution environment for the
35# embedded scripts.

--- 586 unchanged lines hidden (view full) ---

622clobber: clean
623 $(RM) -r $(CLOBBERFILES)
624
625#
626# This rule assumes that all links in the $PKGSTAT directories
627# point to valid manifests, and will fail the make run if one
628# does not contain an fmri.
629#
630# We do this in the BEGIN action instead of using pattern matching
631# because we expect the fmri to be at or near the first line of each input
632# file, and this way lets us avoid reading the rest of the file after we
633# find what we need.
634#
635# We keep track of a failure to locate an fmri, so we can fail the
636# make run, but we still attempt to process each package in the
637# repo/pkgstat-specific subdir, in hopes of maybe giving some
638# additional useful info.
639#
640# The protolist is used for bfu archive creation, which may be invoked
641# interactively by the user. Both protolist and PKGLISTS targets
642# depend on $(PROC_PKGS), but protolist builds them recursively.
643# To avoid collisions, we insert protolist into the dependency chain
644# here. This has two somewhat subtle benefits: it allows bfu archive
645# creation to work correctly, even when -a was not part of NIGHTLY_OPTIONS,
646# and it ensures that a protolist file here will always correspond to the
647# contents of the processed manifests, which can vary depending on build
648# environment.
649#
630# The protolist is used for bfu archive creation, which may be invoked
631# interactively by the user. Both protolist and PKGLISTS targets
632# depend on $(PROC_PKGS), but protolist builds them recursively.
633# To avoid collisions, we insert protolist into the dependency chain
634# here. This has two somewhat subtle benefits: it allows bfu archive
635# creation to work correctly, even when -a was not part of NIGHTLY_OPTIONS,
636# and it ensures that a protolist file here will always correspond to the
637# contents of the processed manifests, which can vary depending on build
638# environment.
639#
650$(PKGLISTS): $(PROC_PKGS)
640$(PKGLISTS): scripts/pkglist.awk $(PROC_PKGS)
651 $(PKGDEBUG)sdotr=$(@F:packages.%=%); \
652 r=$${sdotr%.+(?)}; s=$${sdotr#+(?).}; \
653 print "Generating $$r $$s package list"; \
654 $(RM) $(@); $(TOUCH) $(@); \
641 $(PKGDEBUG)sdotr=$(@F:packages.%=%); \
642 r=$${sdotr%.+(?)}; s=$${sdotr#+(?).}; \
643 print "Generating $$r $$s package list"; \
644 $(RM) $(@); $(TOUCH) $(@); \
655 $(AWK) 'BEGIN { \
656 if (ARGC < 2) { \
657 exit; \
658 } \
659 retcode = 0; \
660 for (i = 1; i < ARGC; i++) { \
661 do { \
662 e = getline f < ARGV[i]; \
663 } while ((e == 1) && (f !~ /name=pkg.fmri/)); \
664 close(ARGV[i]); \
665 if (e == 1) { \
666 l = split(f, a, "="); \
667 print "depend fmri=" a[l], \
668 "type=$$(PKGDEP_TYPE)"; \
669 } else { \
670 print "no fmri in " ARGV[i] >> "/dev/stderr"; \
671 retcode = 2; \
672 } \
673 } \
674 exit retcode; \
675 }' `find $(PDIR) -type l -a \( $(PKGS:%=-name %.metadata.$$s.$$r -o) \
676 -name NOSUCHFILE \)` >> $(@)
645 $(AWK) -f scripts/pkglist.awk \
646 `find $(PDIR) -type l -a \( $(PKGS:%=-name %.metadata.$$s.$$r -o) \
647 -name NOSUCHFILE \)` >> $(@)
677
678#
679# rules to validate proto area against manifests, check for safe
680# file permission modes, and generate a faux proto list
681#
682# For the check targets, the dependencies on $(PROC_PKGS) is specified
683# as a subordinate make process in order to suppress output.
684#

--- 83 unchanged lines hidden ---
648
649#
650# rules to validate proto area against manifests, check for safe
651# file permission modes, and generate a faux proto list
652#
653# For the check targets, the dependencies on $(PROC_PKGS) is specified
654# as a subordinate make process in order to suppress output.
655#

--- 83 unchanged lines hidden ---