Print this page
    
10080 smatch Makefile changes for usr/src/cmd
    
      
        | Split | Close | 
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/cmd/ed/Makefile
          +++ new/usr/src/cmd/ed/Makefile
   1    1  #
   2    2  # CDDL HEADER START
   3    3  #
   4    4  # The contents of this file are subject to the terms of the
   5    5  # Common Development and Distribution License (the "License").
   6    6  # You may not use this file except in compliance with the License.
   7    7  #
   8    8  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9  # or http://www.opensolaris.org/os/licensing.
  10   10  # See the License for the specific language governing permissions
  11   11  # and limitations under the License.
  12   12  #
  13   13  # When distributing Covered Code, include this CDDL HEADER in each
  14   14  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  
    | ↓ open down ↓ | 14 lines elided | ↑ open up ↑ | 
  15   15  # If applicable, add the following below this CDDL HEADER, with the
  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 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
       25 +# Copyright (c) 2018, Joyent, Inc.
  25   26  
  26   27  PROG= ed
  27   28  XPG4PROG= ed
  28   29  XPG6PROG= ed
  29   30  
  30   31  EDOBJ= ed.o compile.o
  31   32  XPG4EDOBJ= edobjs.xpg4/ed.o edobjs.xpg4/compile.o  values-xpg4.o
  32   33  XPG6EDOBJ= edobjs.xpg6/ed.o edobjs.xpg6/compile.o  values-xpg6.o
  33   34  OBJS= $(EDOBJ) $(XPG4EDOBJ) $(XPG6EDOBJ)
  34   35  SRCS= ./ed.c ../expr/compile.c 
  35   36  
  36   37  POFILES= $(EDOBJ:%.o=%.po)
  37   38  
  38   39  include ../Makefile.cmd
  39   40  
  40   41  CFLAGS += $(CCVERBOSE)
  41   42  CERRWARN += -_gcc=-Wno-parentheses
  42   43  CERRWARN += -_gcc=-Wno-unused-variable
  43   44  CERRWARN += -_gcc=-Wno-unused-function
  44   45  CERRWARN += -_gcc=-Wno-uninitialized
       46 +
       47 +# not linted
       48 +SMATCH=off
       49 +
  45   50  $(XPG4) := CFLAGS += -DXPG4  
  46   51  $(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc 
  47   52  lint := LDLIBS += -lgen -lcrypt
  48   53  LDLIBS += -lmapmalloc -lgen -lcrypt_i
  49   54  XGETFLAGS += -a -x ed.xcl
  50   55  
  51   56  MAPFILE.INT =   ../expr/mapfile-intf
  52   57  LDFLAGS +=      $(MAPFILE.INT:%=-M%)
  53   58  
  54   59  POFILE= ed_cmd.po
  55   60  
  56   61  %.po: ../expr/%.c
  57   62          $(COMPILE.cpp) $< > $*.c.i
  58   63          $(XGETTEXT) $(XGETFLAGS) $*.c.i
  59   64          $(MV) messages.po $@
  60   65  
  61   66  .KEEP_STATE:
  62   67  
  63   68  all:    $(PROG) $(XPG4) $(XPG6)
  64   69  
  65   70  $(PROG): $(EDOBJ) $(MAPFILE.INT)
  66   71          $(LINK.c) $(EDOBJ) -o $@ $(LDLIBS)
  67   72          $(POST_PROCESS)
  68   73  
  69   74  $(XPG4): edobjs.xpg4 $(XPG4EDOBJ) $(MAPFILE.INT) 
  70   75          $(LINK.c) $(XPG4EDOBJ) -o $@ $(LDLIBS)
  71   76          $(POST_PROCESS)
  72   77  
  73   78  $(XPG6): edobjs.xpg6 $(XPG6EDOBJ)  $(MAPFILE.INT)
  74   79          $(LINK.c) $(XPG6EDOBJ) -o $@ $(LDLIBS)
  75   80          $(POST_PROCESS)
  76   81  
  77   82  compile.o:      ../expr/compile.c 
  78   83          $(COMPILE.c) -o $@ ../expr/compile.c
  79   84  
  80   85  edobjs.xpg4/%.o:        %.c
  81   86          $(COMPILE.c) -o $@ $<
  82   87  
  83   88  edobjs.xpg4/%.o:        ../expr/compile.c
  84   89          $(COMPILE.c) -o $@ $<
  85   90  
  86   91  edobjs.xpg6/%.o:        %.c
  87   92          $(COMPILE.c) -o $@ $<
  88   93  
  89   94  edobjs.xpg6/%.o:        ../expr/compile.c
  90   95          $(COMPILE.c) -o $@ $<
  91   96  
  92   97  edobjs.xpg4:
  93   98          -@mkdir -p $@
  94   99  
  95  100  edobjs.xpg6:
  96  101          -@mkdir -p $@
  97  102  
  98  103  $(POFILE): $(POFILES)
  99  104          $(RM) $@
 100  105          cat $(POFILES) > $@
 101  106  
 102  107  install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTXPG6PROG)
 103  108          $(RM) $(ROOTBIN)/red
 104  109          $(LN) $(ROOTBIN)/ed $(ROOTBIN)/red
 105  110  
 106  111  values-xpg4.o: ../../lib/crt/common/values-xpg4.c
 107  112          $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c
 108  113  
 109  114  values-xpg6.o: ../../lib/crt/common/values-xpg6.c
 110  115          $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg6.c
 111  116  
 112  117  clean:
 113  118          -@rm -rf $(OBJS) $(XPG4) $(XPG6) edobjs.xpg4 edobjs.xpg6 \
 114  119                  compile.c.i
 115  120  
 116  121  lint:   lint_PROG
 117  122  
 118  123  include ../Makefile.targ
  
    | ↓ open down ↓ | 64 lines elided | ↑ open up ↑ | 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX