Print this page
11224 nightly and bldenv should be usable directly

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/Makefile
          +++ new/usr/src/tools/scripts/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  # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23  #
  24   24  # Copyright 2010, Richard Lowe
  25   25  #
  26      -# Copyright 2018 Joyent, Inc.
       26 +# Copyright 2020 Joyent, Inc.
  27   27  
  28   28  SHELL=/usr/bin/ksh93
  29   29  
       30 +SCRIPTS= \
       31 +        bldenv \
       32 +        nightly
       33 +
  30   34  SHFILES= \
  31   35          Install \
  32      -        bldenv \
  33   36          build_cscope \
  34   37          bringovercheck \
  35   38          checkpaths \
  36   39          cstyle \
  37   40          elfcmp \
  38   41          flg.flp \
  39   42          genoffsets \
  40      -        nightly \
  41   43          onu \
  42   44          protocmp.terse \
  43   45          sccscheck \
  44   46          webrev \
  45   47          which_scm \
  46   48          ws \
  47   49          xref
  48   50  
  49   51  PERLFILES= \
  50   52          check_rtime \
↓ open down ↓ 72 lines elided ↑ open up ↑
 123  125  
 124  126  $(ROOTONBLDETCFILES)            := FILEMODE=    644
 125  127  $(ROOTONBLDEXCEPTFILES)         := FILEMODE=    644
 126  128  $(ROOTONBLDPERLMODULES)         := FILEMODE=    644
 127  129  $(ROOTONBLDMAKEFILES)           := FILEMODE=    644
 128  130  $(ROOTONBLDMAN1ONBLDFILES)      := FILEMODE=    644
 129  131  
 130  132  .KEEP_STATE:
 131  133  
 132  134  all:    $(SHFILES) $(PERLFILES) $(PERLMODULES) $(PYFILES) \
 133      -        $(MAN1ONBLDFILES) $(MAKEFILES)
      135 +        $(MAN1ONBLDFILES) $(MAKEFILES) $(SCRIPTS)
 134  136  
 135  137  onu.sh: onu.sh.in
 136  138          $(SED) -e "s:@PYTHON_VERSION@:$(PYTHON_VERSION):g" < onu.sh.in > $@
 137  139  
 138  140  $(ROOTONBLDBIN)/git-nits:
 139  141          $(RM) $(ROOTONBLDBIN)/git-nits
 140  142          $(SYMLINK) git-pbchk $(ROOTONBLDBIN)/git-nits
 141  143  
 142  144  $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld:
 143  145          $(RM) $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
 144  146          $(SYMLINK) git-pbchk.1onbld $(ROOTONBLDMAN1ONBLD)/git-nits.1onbld
 145  147  
 146  148  install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDPERLFILES)            \
 147  149                  $(ROOTONBLDPERLMODULES) $(ROOTONBLDPYFILES)             \
 148  150                  $(ROOTONBLDSCRIPTLINKS) $(ROOTONBLDMAN1ONBLDFILES)      \
 149  151                  $(ROOTONBLDMAKEFILES) $(ROOTONBLDETCFILES)              \
 150      -                $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS)
      152 +                $(ROOTONBLDEXCEPTFILES) $(ROOTONBLDMAN1ONBLDLINKS)      \
      153 +                $(ROOTONBLDSCRIPTS)
 151  154  
 152  155  clean:
 153  156          $(RM) $(CLEANFILES)
 154  157  
 155      -bldenv: bldenv.sh stdenv.sh
 156      -        $(RM) "$@"
 157      -        sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
 158      -        # Check for shell lint and fail if we hit warnings
 159      -        shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
 160      -                [[ "$${shlintout}" != "" ]] && \
 161      -                { print -r -- "$${shlintout}" ; false ; } || true
 162      -        $(CHMOD) +x "$@"
 163      -
 164  158  bldenv.1onbld: bldenv
 165  159          $(RM) "$@"
 166  160          (set +o errexit ; ksh93 $? --nroff ; true) 2>&1 | \
 167  161          sed -e 's/\.DS/.nf/g;s/\.DE/.fi/' \
 168  162          -e 's/\.TH BLDENV 1/.TH BLDENV 1ONBLD "September 4, 2018"/' \
 169  163          -e 's/.OP \([a-z]\) - flag -/.OP \\-\1/g' \
 170  164          -e 's/(1)/(1ONBLD)/' > "$@"
 171  165  
 172      -nightly: nightly.sh stdenv.sh
 173      -        $(RM) "$@"
 174      -        sed -e '/# STDENV_START/ r stdenv.sh' nightly.sh > nightly
 175      -        $(CHMOD) +x "$@"
 176      -
 177  166  #
 178  167  # Not run by default: bootstrap...
 179  168  check:
 180  169          $(ROOTONBLDBINMACH)/mandoc -Tlint -Wwarning $(MAN1ONBLDFILES)
 181  170  
 182  171  include ../Makefile.targ
 183  172  
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX