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