Print this page
6366 Allow ON_CLOSED_BINS to point to a directory with tarballs


   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
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  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]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2012 by Delphix. All rights reserved.
  25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>

  26 #
  27 
  28 #
  29 # Makefile for system source
  30 #
  31 # include global definitions
  32 include Makefile.master
  33 #
  34 # the Targetdirs file is the AT&T target.dirs file in a makefile format.
  35 # it defines TARGETDIRS and ROOTDIRS.
  36 include Targetdirs
  37 
  38 COMMON_SUBDIRS= uts lib cmd ucblib ucbcmd psm man test
  39 sparc_SUBDIRS= stand
  40 i386_SUBDIRS= grub
  41 
  42 #
  43 # sparc needs to build stand before psm
  44 #
  45 $(SPARC_BLD)psm: stand


 120 
 121 install1: mapfiles closedbins sgs
 122 
 123 install2: install1 $(SUBDIRS)
 124 
 125 _msg: _msgdirs rootdirs FRC
 126         @for m in $(MSGSUBDIRS); do \
 127                 cd $$m; pwd; $(MAKE) _msg; cd ..; \
 128         done
 129 
 130 mapfiles: bldtools
 131         @cd common/mapfiles; pwd; $(MAKE) install
 132 
 133 clean: $(SUBDIRS) head pkg
 134 clobber: $(SUBDIRS) head pkg clobber_local
 135 clobber_local:
 136         @cd tools; pwd; $(MAKE) clobber
 137         @cd common/mapfiles; pwd; $(MAKE) clobber
 138         @cd msg; pwd; $(MAKE) clobber
 139 



 140 closedbins: bldtools $(ROOTDIRS) FRC
 141         @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \






 142         if [ ! -d "$$CLOSED_ROOT" ]; then \
 143                 $(ECHO) "Error: ON_CLOSED_BINS must point to closed" \
 144                     "binaries."; \
 145                 $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
 146                     "present in $$ON_CLOSED_BINS."; \
 147                 exit 1; \
 148         fi; \
 149         $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
 150         (cd $$CLOSED_ROOT; \
 151             $(TAR) cfX - $(CODEMGR_WS)/exception_lists/closed-bins .) | \
 152             (cd $(ROOT); $(TAR) xBpf -); \
 153         ( cd $(ROOT); $(CTFSTRIP) $$(cd $$CLOSED_ROOT; $(FIND) \
 154             ./kernel ./usr/kernel ./platform/*/kernel -type f -a -perm -u+x | \
 155             $(EGREP) -vf $(CODEMGR_WS)/exception_lists/closed-bins) )
 156 
 157 #
 158 # Declare what parts can be built in parallel
 159 # DUMMY at the end is used in case macro expansion produces an empty string to
 160 # prevent everything going in parallel
 161 #




   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
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  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]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2012 by Delphix. All rights reserved.
  25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
  26 # Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
  27 #
  28 
  29 #
  30 # Makefile for system source
  31 #
  32 # include global definitions
  33 include Makefile.master
  34 #
  35 # the Targetdirs file is the AT&T target.dirs file in a makefile format.
  36 # it defines TARGETDIRS and ROOTDIRS.
  37 include Targetdirs
  38 
  39 COMMON_SUBDIRS= uts lib cmd ucblib ucbcmd psm man test
  40 sparc_SUBDIRS= stand
  41 i386_SUBDIRS= grub
  42 
  43 #
  44 # sparc needs to build stand before psm
  45 #
  46 $(SPARC_BLD)psm: stand


 121 
 122 install1: mapfiles closedbins sgs
 123 
 124 install2: install1 $(SUBDIRS)
 125 
 126 _msg: _msgdirs rootdirs FRC
 127         @for m in $(MSGSUBDIRS); do \
 128                 cd $$m; pwd; $(MAKE) _msg; cd ..; \
 129         done
 130 
 131 mapfiles: bldtools
 132         @cd common/mapfiles; pwd; $(MAKE) install
 133 
 134 clean: $(SUBDIRS) head pkg
 135 clobber: $(SUBDIRS) head pkg clobber_local
 136 clobber_local:
 137         @cd tools; pwd; $(MAKE) clobber
 138         @cd common/mapfiles; pwd; $(MAKE) clobber
 139         @cd msg; pwd; $(MAKE) clobber
 140 
 141 # If the tarballs are included inside ON_CLOSED_BINS, use those to extract and
 142 # preserve the permissions (in case a distro ships them).
 143 
 144 closedbins: bldtools $(ROOTDIRS) FRC
 145         @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
 146         if [ -f "$$ON_CLOSED_BINS/on-closed-bins$${RELEASE_BUILD+-nd}.$(MACH).tar.bz2" ]; then \
 147                 $(ECHO) "Extracting tarball $$ON_CLOSED_BINS/on-closed-bins$${RELEASE_BUILD+-nd}.$(MACH).tar.bz2"; \
 148                 (cd $(ROOT); \
 149                    $(TAR) xjpf $$ON_CLOSED_BINS/on-closed-bins$${RELEASE_BUILD+-nd}.$(MACH).tar.bz2); \
 150                 CLOSED_ROOT="$(ROOT)/closed/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
 151         fi; \
 152         if [ ! -d "$$CLOSED_ROOT" ]; then \
 153                 $(ECHO) "Error: ON_CLOSED_BINS must point to closed" \
 154                     "binaries."; \
 155                 $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
 156                     "present in $$ON_CLOSED_BINS."; \
 157                 exit 1; \
 158         fi; \
 159         $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
 160         (cd $$CLOSED_ROOT; \
 161             $(TAR) cfX - $(CODEMGR_WS)/exception_lists/closed-bins .) | \
 162             (cd $(ROOT); $(TAR) xBpf -); \
 163         ( cd $(ROOT); $(CTFSTRIP) $$(cd $$CLOSED_ROOT; $(FIND) \
 164             ./kernel ./usr/kernel ./platform/*/kernel -type f -a -perm -u+x | \
 165             $(EGREP) -vf $(CODEMGR_WS)/exception_lists/closed-bins) )
 166 
 167 #
 168 # Declare what parts can be built in parallel
 169 # DUMMY at the end is used in case macro expansion produces an empty string to
 170 # prevent everything going in parallel
 171 #