Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/oawk/Makefile
+++ new/usr/src/cmd/oawk/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, 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 2005 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 include ../Makefile.cmd
28 29
29 30 PROG = oawk
30 31 LINKPROG = awk
31 32
32 33 SRCS = b.c lib.c main.c parse.c run.c tran.c
33 34
34 35 #TXTS = README EXPLAIN
35 36
36 37 OBJS = awk.g.o awk.lx.o proctab.o tmptoken.o \
37 38 $(SRCS:%.c=%.o)
38 39
39 40 #
40 41 # for message catalogue
41 42 #
42 43 POFILES= $(OBJS:%.o=%.po)
43 44 POFILE= oawk.po
44 45 XGETFLAGS += -a -x oawk.xcl
45 46
46 47 NATIVEDIR = native
47 48 MAKEPRCTAB = $(NATIVEDIR)/makeprctab
48 49
49 50 NATIVEOBJS = $(NATIVEDIR)/makeprctab.o $(NATIVEDIR)/tmptoken.o
50 51 $(MAKEPRCTAB) := CC = $(NATIVECC)
51 52 $(MAKEPRCTAB) := POST_PROCESS=
52 53 $(MAKEPRCTAB) := POST_PROCESS_O=
53 54
54 55 CLEANFILES = proctab.c y.tab.h y.tab.c awk.h awk.g.c \
55 56 tmptoken.c awk.lx.c $(NATIVEOBJS) $(MAKEPRCTAB) \
56 57 temp
57 58
58 59 YFLAGS = -d
59 60 XLDLIBS5CC += -lm
60 61 LDLIBS += -lm
61 62 CPPFLAGS = -I. $(CPPFLAGS.master)
↓ open down ↓ |
26 lines elided |
↑ open up ↑ |
62 63 CPPFLAGS += -D_FILE_OFFSET_BITS=64
63 64
64 65 ROOTLINK = $(LINKPROG:%=$(ROOTBIN)/%)
65 66
66 67 CERRWARN += -_gcc=-Wno-implicit-function-declaration
67 68 CERRWARN += -_gcc=-Wno-unused-label
68 69 CERRWARN += -_gcc=-Wno-unused-variable
69 70 CERRWARN += -_gcc=-Wno-extra
70 71 CERRWARN += -_gcc=-Wno-parentheses
71 72
73 +# missing type declarations
74 +SMATCH = off
75 +
72 76 .KEEP_STATE :
73 77
74 78 all : $(PROG) $(TXTS)
75 79
76 80 $(PROG) : $(OBJS)
77 81 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
78 82 $(POST_PROCESS)
79 83
80 84 $(POFILE): $(POFILES)
81 85 $(RM) $@
82 86 $(CAT) $(POFILES) > $@
83 87
84 88 awk.g.c + awk.h : awk.g.y
85 89 $(RM) awk.g.c awk.h
86 90 $(YACC.y) awk.g.y
87 91 $(MV) y.tab.c awk.g.c
88 92 $(MV) y.tab.h awk.h
89 93
90 94 awk.lx.c: awk.lx.l
91 95 $(LEX.l) -w awk.lx.l > awk.lx.c
92 96
93 97 tmptoken.c : tokenscript token.c
94 98 $(RM) $@
95 99 ed - < tokenscript
96 100
97 101 proctab.c : $(MAKEPRCTAB)
98 102 $(RM) $@
99 103 $(MAKEPRCTAB) > $@
100 104
101 105 $(MAKEPRCTAB) : $(NATIVEDIR) $(NATIVEOBJS)
102 106 $(LINK.c) $(NATIVEOBJS) -o $@ $(XLDLIBS5CC)
103 107
104 108 install : all $(ROOTPROG) $(ROOTLINK)
105 109
106 110 $(NATIVEDIR) :
107 111 -@mkdir -p $(NATIVEDIR)
108 112
109 113 $(NATIVEDIR)/%.o : %.c
110 114 $(COMPILE.c) -o $@ $<
111 115
112 116 $(ROOTLINK) : $(ROOTPROG)
113 117 $(RM) $@; $(LN) $(ROOTPROG) $@
114 118
115 119 clean:
116 120 $(RM) $(OBJS) $(CLEANFILES)
117 121
118 122 lint : lint_SRCS
119 123
120 124 strip:
121 125 $(STRIP) $(PROG)
122 126
123 127 include ../Makefile.targ
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX