Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/tnf/prex/Makefile.com
+++ new/usr/src/cmd/tnf/prex/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.
16 16 # If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
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 #
24 24 # Copyright 1989,2003 Sun Microsystems, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 -# cmd/tnf/prex/Makefile.com
28 -#
27 +# Copyright (c) 2018, Joyent, Inc.
29 28
30 29 PROG= prex
31 30
32 31 OBJS.c= source.o \
33 32 main.o \
34 33 util.o \
35 34 expr.o \
36 35 spec.o \
37 36 set.o \
38 37 queue.o \
39 38 cmd.o \
40 39 new.o \
41 40 list.o \
42 41 fcn.o \
43 42 prbk.o \
44 43 help.o
45 44
46 45 OBJS.yl= prexgram.o \
47 46 prexlex.o
48 47
49 48 OBJS= $(OBJS.yl) $(OBJS.c)
50 49
51 50 SRCS= $(OBJS.c:%.o=../%.c) $(OBJS.yl:%.o=%.c)
52 51
53 52 SRCS.yl = $(OBJS.yl:%.o=%.c)
54 53 CLEANFILES = $(SRCS.yl) y.tab.h
55 54
56 55 include ../../../Makefile.cmd
57 56
58 57 POFILE= prex.po
59 58 POFILES= $(OBJS.c:%.o=%.po)
60 59
61 60 #YFLAGS= -d -t -v
62 61 YFLAGS= -d
63 62 LFLAGS= -v
64 63 # FOR normal makefile, uncomment the next line
↓ open down ↓ |
26 lines elided |
↑ open up ↑ |
65 64 LDLIBS += -lgen -ltnfctl -lelf -lc
66 65 # Uncomment the following line for a debug build
67 66 # COPTFLAG = -g -DDEBUG
68 67
69 68 CFLAGS += $(CCVERBOSE)
70 69 CERRWARN += -_gcc=-Wno-unused-label
71 70 CERRWARN += -_gcc=-Wno-unused-variable
72 71 CERRWARN += -_gcc=-Wno-parentheses
73 72 CERRWARN += -_gcc=-Wno-uninitialized
74 73
74 +# not linted
75 +SMATCH=off
76 +
75 77 .KEEP_STATE:
76 78
77 79 .PARALLEL: $(OBJS)
78 80
79 81 all: $(PROG)
80 82
81 83 #OBJS can be built in parallel after all .c (and y.tab.h) are properly built
82 84 $(PROG): $(SRCS.yl) .WAIT $(OBJS)
83 85 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
84 86 $(POST_PROCESS)
85 87
86 88 #This also builds y.tab.h
87 89 prexgram.c: ../prexgram.y
88 90 $(YACC.y) ../prexgram.y
89 91 mv y.tab.c $@
90 92
91 93 prexlex.c: ../prexlex.l
92 94 $(RM) $@
93 95 $(LEX.l) ../prexlex.l > $@
94 96
95 97 #Use %.c in priority to ../%.c for prexgram.c and prexlec.c
96 98 %.o: %.c
97 99 $(COMPILE.c) $<
98 100
99 101 %.o: ../%.c
100 102 $(COMPILE.c) $<
101 103
102 104
103 105 $(ROOTBIN):
104 106 $(INS.dir)
105 107
106 108 $(POFILE): $(POFILES)
107 109 $(RM) $@
108 110 cat $(POFILES) > $@
109 111
110 112 clean:
111 113 $(RM) $(OBJS) $(CLEANFILES)
112 114
113 115 lint: $(OBJS)
114 116 $(LINT.c) $(SRCS)
115 117
116 118 include ../../../Makefile.targ
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX