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

Split Close
Expand all
Collapse all
          --- old/usr/src/Makefile
          +++ new/usr/src/Makefile
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  
  22   22  #
  23   23  # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24  # Copyright (c) 2012 by Delphix. All rights reserved.
  25   25  # Copyright 2014 Garrett D'Amore <garrett@damore.org>
       26 +# Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
  26   27  #
  27   28  
  28   29  #
  29   30  # Makefile for system source
  30   31  #
  31   32  # include global definitions
  32   33  include Makefile.master
  33   34  #
  34   35  # the Targetdirs file is the AT&T target.dirs file in a makefile format.
  35   36  # it defines TARGETDIRS and ROOTDIRS.
↓ open down ↓ 94 lines elided ↑ open up ↑
 130  131  mapfiles: bldtools
 131  132          @cd common/mapfiles; pwd; $(MAKE) install
 132  133  
 133  134  clean: $(SUBDIRS) head pkg
 134  135  clobber: $(SUBDIRS) head pkg clobber_local
 135  136  clobber_local:
 136  137          @cd tools; pwd; $(MAKE) clobber
 137  138          @cd common/mapfiles; pwd; $(MAKE) clobber
 138  139          @cd msg; pwd; $(MAKE) clobber
 139  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 +
 140  144  closedbins: bldtools $(ROOTDIRS) FRC
 141  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; \
 142  152          if [ ! -d "$$CLOSED_ROOT" ]; then \
 143  153                  $(ECHO) "Error: ON_CLOSED_BINS must point to closed" \
 144  154                      "binaries."; \
 145  155                  $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
 146  156                      "present in $$ON_CLOSED_BINS."; \
 147  157                  exit 1; \
 148  158          fi; \
 149  159          $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
 150  160          (cd $$CLOSED_ROOT; \
 151  161              $(TAR) cfX - $(CODEMGR_WS)/exception_lists/closed-bins .) | \
↓ open down ↓ 124 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX