Print this page
10080 smatch Makefile changes for usr/src/cmd

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/usr.bin/Makefile
          +++ new/usr/src/cmd/cmd-inet/usr.bin/Makefile
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  #
  22   22  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
  25   25  # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  26   26  # Copyright 2016 Toomas Soome <tsoome@me.com>
       27 +# Copyright (c) 2018, Joyent, Inc.
  27   28  #
  28   29  
  29   30  PROG=           finger rdate ruptime rwho whois
  30   31  SUIDPROG=       rcp rlogin rsh
  31   32  ALL=            $(PROG) $(SUIDPROG)
  32   33  SRCS=           $(ALL:%=%.c)
  33   34  KCMDPROGS=      rcp rlogin rsh
  34   35  
  35   36  SUBDIRS=        chat dns-sd ftp nc nca netstat \
  36   37                  pppd pppdump pppstats rdist talk telnet tftp
  37      -SUBDIR1=        talk 
       38 +SUBDIR1=        talk
  38   39  MSGSUBDIRS=     nca talk
  39   40  
  40   41  # As programs get lint-clean, add them here.  Eventually.
  41   42  # This hack should go away, and all in PROG should be lint-clean.
  42   43  LINTCLEAN=      rlogin.c rsh.c rcp.c rdate.c rwho.c whois.c
  43   44  
  44   45  # Likewise, as subdirs get lint-clean, add them here.  Once
  45   46  # they're all clean, replace the dependency of the lint target
  46   47  # with SUBDIRS.  Also (sigh) deal with the commented-out build lines
  47   48  # for the lint rule.
↓ open down ↓ 20 lines elided ↑ open up ↑
  68   69  _msg:=          TARGET= _msg
  69   70  
  70   71  ROOTSUIDPROG=   $(SUIDPROG:%=$(ROOTBIN)/%)
  71   72  $(ROOTSUIDPROG) :=      FILEMODE=       04555
  72   73  
  73   74  CPPFLAGS +=     -DSYSV -DSTRNET -DBSD_COMP -I$(CMDINETCOMMONDIR)
  74   75  CERRWARN +=     -_gcc=-Wno-parentheses
  75   76  CERRWARN +=     -_gcc=-Wno-uninitialized
  76   77  CERRWARN +=     -_gcc=-Wno-unused-function
  77   78  
       79 +ruptime :=     SMOFF += leaks
       80 +
  78   81  # Eventually just plain CFLAGS should be += -v, but not until all in
  79   82  # PROGS are lint clean.
  80   83  $(LINTCLEAN)    :=      CFLAGS += $(CCVERBOSE)
  81   84  
  82   85  finger :=       CFLAGS += $(CCVERBOSE)
  83   86  # Enable large file support for reading the lastlog file.
  84   87  finger :=       CPPFLAGS += -D_FILE_OFFSET_BITS=64
  85   88  
  86   89  finger :=               LDLIBS += -lnsl -lcurses -lsocket
  87   90  rcp lint-rcp :=         LDLIBS += -lsocket -lsec -lsendfile
↓ open down ↓ 53 lines elided ↑ open up ↑
 141  144          $(RM) $@
 142  145          sed "/^domain/d" < messages.po  > $@
 143  146          $(RM) messages.po $(@:.po=.c).i
 144  147  
 145  148  $(COMMONOBJS): $(COMMONSRCS)
 146  149          $(COMPILE.c) $(COMMONSRCS)
 147  150  
 148  151  rlogin: rlogin.o $(COMMONOBJS)
 149  152          $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
 150  153          $(POST_PROCESS)
 151      - 
      154 +
 152  155  rcp: rcp.o $(COMMONOBJS)
 153  156          $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
 154  157          $(POST_PROCESS)
 155  158  
 156  159  rsh: rsh.o $(COMMONOBJS)
 157  160          $(LINK.c) $@.o $(COMMONOBJS) -o $@ $(LDLIBS)
 158  161          $(POST_PROCESS)
 159      - 
      162 +
 160  163  $(ROOTSUNWRCP):
 161  164          $(RM) $@; $(SYMLINK) ../bin/rcp $@
 162  165  
 163  166  $(ROOTRSHSYMLINK):
 164  167          $(RM) $@; $(SYMLINK) ../bin/rsh $@
 165  168  
 166  169  $(ROOTREMSHSYMLINK):
 167  170          $(RM) $@; $(SYMLINK) rsh $@
 168  171  
 169  172  $(SUBDIRS): FRC
 170  173          @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
 171  174  
 172  175  FRC:
 173  176  
 174  177  clean: $(SUBDIRS) clean_local
 175  178  clean_local:
 176  179          $(RM) $(CLEANFILES)
 177  180  
 178  181  clobber: $(SUBDIRS) clobber_local
 179  182  clobber_local: clean_local
 180      -        $(RM) $(CLOBBERFILES) 
      183 +        $(RM) $(CLOBBERFILES)
 181  184  
 182  185  LINTLOCALS=     $(LINTCLEAN:%.c=lint-%)
 183  186  
 184  187  lint:   $(LINTSUBDIRS) $(LINTLOCALS)
 185  188  
 186  189  $(LINTLOCALS):
 187  190          $(LINT.c) $(@:lint-%=%.c) $(LINTXTRA) $(LDLIBS)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX