Print this page
10063 basic support for smatch
10153 checkpaths shouldn't check packaging exceptions
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/geniconvtbl/Makefile.com
+++ new/usr/src/cmd/geniconvtbl/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
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
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 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
22 22 # Use is subject to license terms.
23 23 #
24 +# Copyright (c) 2018, Joyent, Inc.
25 +#
24 26
25 27 $(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN)
26 28
27 29 ITM = geniconvtbl.so
28 30 PROG = geniconvtbl
29 31
30 32 SRCSH1 = iconv_tm.h hash.h
31 33 SRCCH1 = itmcomp.h itm_util.h maptype.h
32 34 SRCSC1 = itmcomp.c assemble.c disassemble.c itm_util.c
33 35 SRCY1 = itm_comp.y
34 36 SRCL1 = itm_comp.l
35 37 SRCI1 = geniconvtbl.c
36 38
37 39
38 40 YTABC = y.tab.c
39 41 YTABH = y.tab.h
40 42 LEXYY = lex.yy.c
41 43 YOUT = y.output
42 44 MAPFILE = ../mapfile
43 45
44 46
45 47
46 48 SRCSH = $(SRCSH1:%.h=../%.h)
47 49 SRCCH = $(SRCCH1:%.h=../%.h)
48 50 SRCSC = $(SRCSC1:%.c=../%.c)
49 51 SRCI = $(SRCI1:%.c=../%.c)
50 52 SRCY = $(SRCY1:%.y=../%.y)
51 53 SRCL = $(SRCL1:%.l=../%.l)
52 54
53 55 SRCYC = $(SRCY:%.y=%.c)
54 56 SRCLC = $(SRCL:%.l=%.c)
55 57
56 58 SRCS = $(SRCSC) $(YTABC) $(LEXYY)
57 59 HDRS = $(SRCCH1) $(ERNOSTRH)
58 60
59 61
60 62
61 63 SED = sed
62 64 LEXSED = ../lex.sed
63 65 YACCSED = ../yacc.sed
64 66
65 67
66 68
67 69 # include ../../../lib/Makefile.lib
68 70 include ../../Makefile.cmd
69 71
70 72
71 73 ROOTDIRS32= $(ROOTLIB)/iconv
72 74 ROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64)
73 75 ROOTITM32 = $(ROOTDIRS32)/$(ITM)
74 76 ROOTITM64 = $(ROOTDIRS64)/$(ITM)
75 77
76 78 #
77 79 # definition for some useful target like clean,
78 80 OBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o)
79 81
80 82 CHECKHDRS = $(HDRS%.h=%.check)
81 83
82 84 CLOBBERFILES= $(ITM) $(SRCYC)
83 85 CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \
84 86 $(POFILES) $(POFILE)
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
85 87
86 88 CPPFLAGS += -I. -I..
87 89 CERRWARN += -_gcc=-Wno-uninitialized
88 90 CERRWARN += -_gcc=-Wno-unused-label
89 91 CERRWARN += -_gcc=-Wno-switch
90 92 CERRWARN += -_gcc=-Wno-unused-variable
91 93 CERRWARN += -_gcc=-Wno-implicit-function-declaration
92 94 YFLAGS += -d -v
93 95 CFLAGS += -D_FILE_OFFSET_BITS=64
94 96
95 -$(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h $@
97 +# dump_expr() is too hairy
98 +SMATCH=off
99 +
100 +$(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h$@
96 101 $(ITM) := CPPFLAGS += -D_REENTRANT
97 102 $(ITM) := sparc_CFLAGS += -xregs=no%appl
98 103 $(ITM) := sparcv9_CFLAGS += -xregs=no%appl
99 104
100 105 LDLIBS += -lgen
101 106
102 107 MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I..
103 108 MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
104 109 MY_NATIVE_LDLIBS = -lgen
105 110
106 111 #
107 112 # Message catalog
108 113 #
109 114 POFILES= $(SRCSC1:%.c=%.po) $(SRCI1:%.c=%.po) \
110 115 $(SRCY1:%.y=%.po) $(SRCL1:%.l=%.po)
111 116
112 117 POFILE= geniconvtbl_.po
113 118
114 119
115 120
116 121
117 122
118 123 .KEEP_STATE:
119 124
120 125 .PARALLEL: $(ITM) $(OBJS)
121 126
122 127 $(PROG): $(OBJS)
123 128 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
124 129 $(POST_PROCESS)
125 130
126 131 $(ITM): $(SRCI)
127 132 $(CC) $(CFLAGS) $(CPPFLAGS) -M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
128 133 $(POST_PROCESS_SO)
129 134
130 135 $(YTABC) $(YTABH): $(SRCY)
131 136 $(YACC) $(YFLAGS) $(SRCY)
132 137 @ $(MV) $(YTABC) $(YTABC)~
133 138 @ $(SED) -f $(YACCSED) $(YTABC)~ > $(YTABC)
134 139 @ $(RM) $(YTABC)~
135 140
136 141 $(LEXYY): $(SRCL) $(YTABH)
137 142 $(LEX) -t $(SRCL) | $(SED) -f $(LEXSED) > $(LEXYY)
138 143
139 144
140 145 $(POFILE): .WAIT $(POFILES)
141 146 $(RM) $@
142 147 $(CAT) $(POFILES) >$@
143 148
144 149 $(POFILES): $(SRCSC) $(SRCI) $(SRCY) $(SRCL)
145 150
146 151 %.po: ../%.c
147 152 $(COMPILE.cpp) $< > $<.i
148 153 $(BUILD.po)
149 154
150 155
151 156 lint : lint_SRCS1 lint_SRCS2
152 157
153 158
154 159 lint_SRCS1: $(SRCS)
155 160 $(LINT.c) $(SRCS) $(LDLIBS)
156 161
157 162 lint_SRCS2: $(SRCI)
158 163 $(LINT.c) $(SRCI) $(LDLIBS)
159 164
160 165
161 166
162 167 hdrchk: $(HDRCHECKS)
163 168
164 169 cstyle: $(SRCS)
165 170 $(DOT_C_CHECK)
166 171
167 172 clean:
168 173 $(RM) $(CLEANFILES)
169 174
170 175 debug:
171 176 $(MAKE) all COPTFLAG='' COPTFLAG64='' CFLAGS='-g -DDEBUG'
172 177
173 178
174 179 %.o: %.c
175 180 $(COMPILE.c) $<
176 181
177 182 %.o: ../%.c
178 183 $(COMPILE.c) $<
179 184
180 185
181 186
182 187 # install rule
183 188 #
184 189 $(ROOTDIRS32)/%: $(ROOTDIRS32) %
185 190 -$(INS.file)
186 191
187 192 $(ROOTDIRS64)/%: $(ROOTDIRS64) %
188 193 -$(INS.file)
189 194
190 195 $(ROOTDIRS32): $(ROOTLIB)
191 196 -$(INS.dir)
192 197
193 198 $(ROOTDIRS64): $(ROOTDIRS32)
194 199 -$(INS.dir)
195 200
196 201 $(ROOTLIB) $(ROOTBIN):
197 202 -$(INS.dir)
198 203
199 204 include ../../Makefile.targ
200 205
↓ open down ↓ |
95 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX