Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sort/Makefile.com
+++ new/usr/src/cmd/sort/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, Version 1.0 only
6 6 # (the "License"). You may not use this file except in compliance
7 7 # with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22 #
23 23 # Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 +# Copyright (c) 2018, Joyent, Inc.
26 27
27 28 #
28 29 # Debugging targets
29 30 # sort provides a number of debugging options to simplify failure analysis.
30 31 #
31 32 # debug provides symbol information and sets DEBUG; includes
32 33 # convert, invoke
33 34 # stats builds binaries with statistics reporting enabled
34 35 # convert builds convert binaries (converts input to collation
35 36 # vectors)
36 37 # invoke builds invoke binaries (allows inspection of options
37 38 # parser outcome)
38 39 #
39 40 # Debugging #defines
40 41 # DEBUG activate assertions; allow wider range of memory
41 42 # settings (-S)
42 43 # DEBUG_FORCE_WIDE force all i/o through wide streams
43 44 # DEBUG_DISALLOW_MMAP force all i/o through stdio or wide streams
44 45 # DEBUG_NO_CACHE_TEMP do not cache last sorted portion in memory; write all
45 46 # data to temporary files before merge
46 47 #
47 48
48 49 PROG = sort
49 50 XPG4PROG = sort
50 51
51 52 BASE_OBJS = \
52 53 check.o \
53 54 fields.o \
54 55 initialize.o \
55 56 internal.o \
56 57 merge.o \
57 58 options.o \
58 59 streams.o \
59 60 streams_array.o \
60 61 streams_mmap.o \
61 62 streams_stdio.o \
62 63 streams_wide.o \
63 64 utility.o
64 65 OBJS = main.o $(BASE_OBJS)
65 66 INVOKE_OBJS = invoke.o $(BASE_OBJS)
66 67 CONVERT_OBJS = convert.o $(BASE_OBJS)
67 68 STATS_OBJS = main.o statistics.o $(BASE_OBJS)
68 69
69 70 XPG4OBJS = $(OBJS:%.o=xpg4_%.o)
70 71 SRCS = $(OBJS:%.o=../common/%.c)
71 72 LNTS = $(OBJS:%.o=%.ln)
72 73 CLEANFILES = $(OBJS) $(XPG4OBJS) $(LNTS)
73 74
74 75 include ../../Makefile.cmd
75 76
76 77 SED = sed
77 78 DCFILE = $(PROG).dc
78 79
79 80 SPACEFLAG =
80 81 SPACEFLAG64 =
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
81 82
82 83 CFLAGS += $(CCVERBOSE) $(SORT_DEBUG)
83 84 CFLAGS64 += $(CCVERBOSE) $(SORT_DEBUG)
84 85 CPPFLAGS += -D_FILE_OFFSET_BITS=64
85 86 LINTFLAGS += -U_FILE_OFFSET_BITS
86 87
87 88 CERRWARN += -_gcc=-Wno-parentheses
88 89 CERRWARN += -_gcc=-Wno-uninitialized
89 90 CERRWARN += -_gcc=-Wno-unused-function
90 91
92 +# not linted
93 +SMATCH=off
94 +
91 95 $(XPG4) := CFLAGS += -DXPG4
92 96
93 97 debug := SORT_DEBUG = -g -DDEBUG $(ILDOFF)
94 98 debug := COPTFLAG =
95 99 debug := COPTFLAG64 =
96 100 stats := SORT_DEBUG = -g -DSTATS -DDEBUG $(ILDOFF)
97 101 stats := COPTFLAG =
98 102 stats := COPTFLAG64 =
99 103
100 104 .KEEP_STATE :
101 105
102 106 .PARALLEL : $(OBJS) $(XPG4OBJS) $(LNTS)
103 107
104 108 all : $(PROG) $(XPG4)
105 109
106 110 debug : $(PROG) convert invoke
107 111
108 112 lint : $(LNTS)
109 113 $(LINT.c) $(LINTFLAGS) $(LNTS) $(LDLIBS)
110 114
111 115 clean :
112 116 $(RM) $(CLEANFILES)
113 117
114 118 include ../../Makefile.targ
115 119
116 120 # rules for $(PROG) and $(XPG4)
117 121
118 122 $(PROG) : $(OBJS)
119 123 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
120 124 $(POST_PROCESS)
121 125
122 126 $(XPG4) : $(XPG4OBJS)
123 127 $(LINK.c) -o $@ $(XPG4OBJS) $(LDLIBS)
124 128 $(POST_PROCESS)
125 129
126 130 invoke: $(INVOKE_OBJS)
127 131 $(LINK.c) -o $@ $(INVOKE_OBJS) $(LDLIBS)
128 132
129 133 convert: $(CONVERT_OBJS)
130 134 $(LINK.c) -o $@ $(CONVERT_OBJS) $(LDLIBS)
131 135
132 136 stats: $(STATS_OBJS)
133 137 $(LINK.c) -o $@ $(STATS_OBJS) $(LDLIBS)
134 138
135 139 %.o : ../common/%.c
136 140 $(COMPILE.c) -o $@ $<
137 141 $(POST_PROCESS_O)
138 142
139 143 xpg4_%.o : ../common/%.c
140 144 $(COMPILE.c) -o $@ $<
141 145 $(POST_PROCESS_O)
142 146
143 147 %.o : ../common/%.h types.h
144 148
145 149 xpg4_%.o : ../common/%.h types.h
146 150
147 151 %.ln: ../common/%.c
148 152 $(LINT.c) $(LINTFLAGS) -c $<
↓ open down ↓ |
48 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX