Print this page
10079 smatch Makefile changes for usr/src/lib
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libcmd/Makefile.com
+++ new/usr/src/lib/libcmd/Makefile.com
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 #
23 23 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 #
25 +# Copyright (c) 2018, Joyent, Inc.
25 26
26 27
27 28 SHELL=/usr/bin/ksh93
28 29
29 30 LIBRARY = libcmd.a
30 31 VERS = .1
31 32 OBJECTS = \
32 33 basename.o \
33 34 cat.o \
34 35 chgrp.o \
35 36 cksum.o \
36 37 chmod.o \
37 38 chown.o \
38 39 cmdinit.o \
39 40 cmp.o \
40 41 comm.o \
41 42 cp.o \
42 43 cut.o \
43 44 date.o \
44 45 dirname.o \
45 46 expr.o \
46 47 grep.o \
47 48 fds.o \
48 49 fmt.o \
49 50 fold.o \
50 51 fts_fix.o \
51 52 getconf.o \
52 53 head.o \
53 54 id.o \
54 55 join.o \
55 56 ln.o \
56 57 logname.o \
57 58 md5sum.o \
58 59 mkdir.o \
59 60 mkfifo.o \
60 61 mktemp.o \
61 62 mv.o \
62 63 paste.o \
63 64 pathchk.o \
64 65 pids.o \
65 66 readlink.o \
66 67 rev.o \
67 68 revlib.o \
68 69 rm.o \
69 70 rmdir.o \
70 71 stty.o \
71 72 sum.o \
72 73 sync.o \
73 74 tail.o \
74 75 tee.o \
75 76 tty.o \
76 77 uname.o \
77 78 uniq.o \
78 79 vmstate.o \
79 80 wc.o \
80 81 wclib.o
81 82
82 83 include ../../Makefile.astmsg
83 84
84 85 include ../../Makefile.lib
85 86
86 87 # mapfile-vers does not live with the sources in in common/ to make
87 88 # automated code updates easier.
88 89 MAPFILES= ../mapfile-vers
89 90
90 91 # Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
91 92 include ../../../Makefile.ast
92 93
93 94 LIBS = $(DYNLIB) $(LINTLIB)
94 95
95 96 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
96 97
97 98 LDLIBS += \
98 99 -lsum \
99 100 -last \
100 101 -lsocket \
101 102 -lnsl \
102 103 -lc
103 104
104 105 SRCDIR = ../common
105 106
106 107 # We use "=" here since using $(CPPFLAGS.master) is very tricky in our
107 108 # case - it MUST come as the last element but future changes in -D options
108 109 # may then cause silent breakage in the AST sources because the last -D
109 110 # option specified overrides previous -D options so we prefer the current
110 111 # way to explicitly list each single flag.
111 112 # Notes:
112 113 # - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
113 114 CPPFLAGS = \
114 115 $(DTEXTDOM) $(DTS_ERRNO) \
115 116 -I../common \
116 117 -Isrc/lib/libcmd \
117 118 -I$(ROOT)/usr/include/ast \
118 119 -I$(ROOT)/usr/include \
119 120 -D_BLD_cmd \
120 121 -D_PACKAGE_ast \
121 122 -D_BLD_DLL \
122 123 '-DERROR_CATALOG="libcmd"' \
123 124 '-DUSAGE_LICENSE=\
124 125 "[-author?Glenn Fowler <gsf@research.att.com>]"\
125 126 "[-author?David Korn <dgk@research.att.com>]"\
126 127 "[-copyright?Copyright (c) 1992-2010 AT&T Intellectual Property]"\
127 128 "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
128 129 "[--catalog?libcmd]"'
129 130
130 131 CFLAGS += \
↓ open down ↓ |
96 lines elided |
↑ open up ↑ |
131 132 $(ASTCFLAGS)
132 133 CFLAGS64 += \
133 134 $(ASTCFLAGS64)
134 135
135 136 CERRWARN += -_gcc=-Wno-unused-value
136 137 CERRWARN += -_gcc=-Wno-parentheses
137 138 CERRWARN += -_gcc=-Wno-uninitialized
138 139 CERRWARN += -_gcc=-Wno-unused-variable
139 140 CERRWARN += -_gcc=-Wno-implicit-function-declaration
140 141
142 +# not linted
143 +SMATCH=off
144 +
141 145 pics/cut.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
142 146 pics/sync.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
143 147 pics/vmstate.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
144 148
145 149 .KEEP_STATE:
146 150
147 151 all: $(LIBS)
148 152
149 153 #
150 154 # libcmd is not lint-clean yet; fake up a target. (You can use
151 155 # "make lintcheck" to actually run lint; please send all lint fixes
152 156 # upstream (to AT&T) so the next update will pull them into ON.)
153 157 #
154 158 lint:
155 159 @ print "usr/src/lib/libcmd is not lint-clean: skipping"
156 160
157 161 include ../../Makefile.targ
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX