Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/vgrind/Makefile
+++ new/usr/src/cmd/vgrind/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 -# cmd/vgrind/Makefile
25 +# Copyright (c) 2018, Joyent, Inc.
26 26
27 27 #
28 28 # These are the objects associated with the overall vgrind command.
29 29 #
30 30 VFONTEDPR= vfontedpr
31 31 RETEST= retest
32 32 MACROS= tmac.vgrind
33 33 LANGDEFS= vgrindefs
34 34 KSHPROG= vgrind
35 35
36 36 #
37 37 # These macros captures objects that ultimately will be installed in
38 38 # (respectively) /usr/bin, /usr/lib, and /usr/share/lib.
39 39 #
40 40 # Note also that retest is used strictly as a test program and is never
41 41 # installed. We omit it here, so that the NSE doesn't spend cycles
42 42 # on it when acquiring and reconciling.
43 43 #
44 44 PROG= $(KSHPROG)
45 45 LIBPROG= $(VFONTEDPR) $(LANGDEFS)
46 46 TMACPROG= $(MACROS)
47 47
48 48 VFONTEDPROBJS= vfontedpr.o vgrindefs.o regexp.o
49 49 RETESTOBJS= retest.o regexp.o
50 50
51 51 RETESTSRC= $(RETESTOBJS:%.o=%.c)
52 52
53 53 OBJS= $(VFONTEDPROBJS) $(RETESTOBJS)
54 54 SRCS= $(OBJS:%.o=%.c)
55 55
56 56 #
57 57 # We can get away simply with omitting TMACPROGS to protect
58 58 # tmac.vgrind, since it's the only entry in that macro.
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
59 59 #
60 60 CLOBBERFILES= $(LIBPROG) $(RETEST)
61 61
62 62 include ../Makefile.cmd
63 63
64 64 CERRWARN += -_gcc=-Wno-implicit-function-declaration
65 65 CERRWARN += -_gcc=-Wno-parentheses
66 66 CERRWARN += -_gcc=-Wno-unused-variable
67 67 CERRWARN += -_gcc=-Wno-unused-function
68 68
69 +# not linted
70 +SMATCH=off
71 +
69 72 #
70 73 # Message catalog
71 74 #
72 75 POFILES= $(OBJS:%.o=%.po)
73 76 POFILE= vgrind.po
74 77 POFILE_KSH= vgrind_ksh.po
75 78
76 79 #
77 80 # Abbreviation for future use.
78 81 #
79 82 ROOTTMAC= $(ROOT)/usr/share/lib/tmac
80 83
81 84 #
82 85 # Override macro definitions from Makefile.cmd. Necessary because
83 86 # we're building targets for multiple destinations.
84 87 #
85 88 ROOTLIBPROG= $(LIBPROG:%=$(ROOT)/usr/lib/%)
86 89 ROOTTMACPROG= $(TMACPROG:%=$(ROOTTMAC)/%)
87 90
88 91 #
89 92 # Conditional assignments pertinent to installation.
90 93 #
91 94 $(ROOTLIB)/$(LANGDEFS) := FILEMODE= $(LIBFILEMODE)
92 95 $(ROOTTMACPROG) := FILEMODE= 0644
93 96
94 97 #
95 98 # The standard set of rules doesn't know about installing into
96 99 # subdirectories of /usr/share/lib, so we have to roll our own.
97 100 #
98 101 $(ROOTTMAC)/%: %
99 102 $(INS.file)
100 103
101 104 .KEEP_STATE:
102 105
103 106 #
104 107 # retest appears here only in source form; see comment above for PROG.
105 108 #
106 109 all: $(PROG) $(LIBPROG) $(TMACPROG) $(RETESTSRC)
107 110
108 111 #
109 112 # message catalog
110 113 #
111 114 $(POFILE): $(POFILES) $(POFILE_KSH)
112 115 rm -f $@
113 116 cat $(POFILES) $(POFILE_KSH) > $@
114 117
115 118 $(VFONTEDPR): $(VFONTEDPROBJS)
116 119 $(CC) -o $@ $(VFONTEDPROBJS) $(LDFLAGS) $(LDLIBS)
117 120 $(POST_PROCESS)
118 121
119 122 $(LANGDEFS): $(LANGDEFS).src
120 123 $(CP) $? $@
121 124
122 125 $(RETEST): $(RETESTOBJS)
123 126 $(CC) -o $@ $(RETESTOBJS) $(LDFLAGS) $(LDLIBS)
124 127 $(POST_PROCESS)
125 128
126 129 #
127 130 # We add all as a dependent to make sure that the install pattern
128 131 # matching rules see everything they should. (This is a safety net.)
129 132 #
130 133 # XXX: ROOTTMAC shouldn't appear as a dependent; it's here as a
131 134 # bandaid(TM) until /usr/lib/tmac becomes a symlink to
132 135 # /usr/share/lib/tmac.
133 136 #
134 137 install: all $(ROOTTMAC) $(ROOTPROG) $(ROOTLIBPROG) $(ROOTTMACPROG)
135 138
136 139 # XXX: see above.
137 140 $(ROOTTMAC):
138 141 $(INS.dir)
139 142
140 143 clean:
141 144 $(RM) $(OBJS)
142 145
143 146 #
144 147 # Don't worry about linting retest.
145 148 #
146 149 lint:= SRCS = $(VFONTEDPROBJS:%.o=%.c)
147 150 lint: lint_SRCS
148 151
149 152 include ../Makefile.targ
↓ open down ↓ |
71 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX