Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/vi/port/Makefile
+++ new/usr/src/cmd/vi/port/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.
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 #
23 23 # Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26 # Copyright (c) 2018, Joyent, Inc.
27 27
28 28 # cmd/vi/port/Makefile
29 29
30 30 PROG= ex
31 31 XPG4PROG= ex
32 32 XPG6PROG= ex
33 33 LIBPROGS= expreserve exrecover
34 34 XD4= exobjs.xpg4
35 35 XD6= exobjs.xpg6
36 36
37 37 EXOBJS= bcopy.o ex.o ex_addr.o ex_cmds.o ex_cmds2.o \
38 38 ex_cmdsub.o ex_data.o ex_extern.o ex_get.o \
39 39 ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o \
40 40 ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o \
41 41 ex_vget.o ex_vmain.o ex_voper.o ex_vops.o \
42 42 ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
43 43 printf.o
44 44 EXOBJS_XPG4= $(EXOBJS) compile.o values-xpg4.o
45 45 EXOBJS_XPG6= $(EXOBJS) compile.o values-xpg6.o
46 46 XPG4EXOBJS= ${EXOBJS_XPG4:%=$(XD4)/%}
47 47 XPG6EXOBJS= ${EXOBJS_XPG6:%=$(XD6)/%}
48 48 EXRECOVEROBJS= exrecover.o ex_extern.o
49 49 OBJS= $(EXOBJS) $(XPG4EXOBJS) $(XPG6EXOBJS) expreserve.o exrecover.o
50 50 SRCS= $(EXOBJS:%.o=%.c) expreserve.c exrecover.c
51 51 TXTS = READ_ME makeoptions asfix.c70 ex.news port.mk.370 port.mk.70 \
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
52 52 port.mk.c70 port.mk.usg ovdoprnt.s ovprintf.c rofix
53 53
54 54 include ../../Makefile.cmd
55 55
56 56 CERRWARN += -_gcc=-Wno-implicit-function-declaration
57 57 CERRWARN += -_gcc=-Wno-clobbered
58 58 CERRWARN += -_gcc=-Wno-parentheses
59 59 CERRWARN += -_gcc=-Wno-unused-variable
60 60 CERRWARN += -_gcc=-Wno-unused-label
61 61 CERRWARN += -_gcc=-Wno-unused-value
62 -CERRWARN += -_gcc=-Wno-uninitialized
62 +CERRWARN += $(CNOWARN_UNINIT)
63 63 CERRWARN += -_gcc=-Wno-address
64 64
65 65 # way too old
66 66 SMATCH=off
67 67
68 68 #
69 69 # For message catalogue files
70 70 #
71 71 POFILES= $(EXOBJS:%.o=%.po) expreserve.po exrecover.po
72 72 POFILE= port.po
73 73
74 74 # Include all XPG4 and XPG4ONLY changes in the XPG4 version
75 75 $(XPG4) := CFLAGS += -DXPG4 -DXPG4ONLY
76 76
77 77 # Include all XPG4 changes, but don't include XPG4ONLY in the XPG6 version
78 78 $(XPG6) := CFLAGS += -DXPG4 -DXPG6 -I$(SRC)/lib/libc/inc
79 79
80 80 CPPFLAGS += -DUSG -DSTDIO -DVMUNIX -DTABS=8 -DSINGLE -DTAG_STACK
81 81
82 82 # vi maintains its own versions of various routines from libc and libcurses,
83 83 # so localize all symbols to avoid name space collisions.
84 84 LDFLAGS += $(MAPFILE.NGB:%=-M%)
85 85
86 86 CLOBBERFILES += $(LIBPROGS)
87 87 ex := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt_i
88 88 $(XPG4) := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt_i
89 89 $(XPG6) := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt_i
90 90 exrecover := LDLIBS += -lmapmalloc -lcrypt_i
91 91 lint := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt
92 92
93 93 ROOTLIBPROGS= $(LIBPROGS:%=$(ROOTLIB)/%)
94 94
95 95 # hard links to ex
96 96 ROOTLINKS= $(ROOTBIN)/edit $(ROOTHASBIN)/edit $(ROOTBIN)/vedit \
97 97 $(ROOTHASBIN)/vedit $(ROOTHASBIN)/vi $(ROOTHASBIN)/view \
98 98
99 99 ROOTXPG4LINKS= $(ROOTXPG4BIN)/vi $(ROOTXPG4BIN)/view $(ROOTXPG4BIN)/edit \
100 100 $(ROOTXPG4BIN)/vedit
101 101 ROOTXPG6LINKS= $(ROOTXPG6BIN)/vi $(ROOTXPG6BIN)/view $(ROOTXPG6BIN)/edit \
102 102 $(ROOTXPG6BIN)/vedit
103 103 .KEEP_STATE:
104 104
105 105 .PARALLEL: $(OBJS)
106 106
107 107 all: $(PROG) $(XPG4) $(XPG6) $(LIBPROGS)
108 108
109 109 $(PROG): $(EXOBJS)
110 110 $(LINK.c) $(EXOBJS) -o $@ $(LDLIBS)
111 111 $(POST_PROCESS)
112 112
113 113 ex.xpg4: $(XD4) $(XPG4EXOBJS)
114 114 $(LINK.c) $(XPG4EXOBJS) -o $@ $(LDLIBS)
115 115 $(POST_PROCESS)
116 116
117 117 ex.xpg6: $(XD6) $(XPG6EXOBJS)
118 118 $(LINK.c) $(XPG6EXOBJS) -o $@ $(LDLIBS)
119 119 $(POST_PROCESS)
120 120
121 121 $(XD4)/compile.o $(XD6)/compile.o: ../../expr/compile.c
122 122 $(COMPILE.c) -o $@ ../../expr/compile.c
123 123
124 124 %values-xpg4.o: ../../../lib/crt/common/values-xpg4.c
125 125 $(COMPILE.c) -o $@ ../../../lib/crt/common/values-xpg4.c
126 126
127 127 %values-xpg6.o: ../../../lib/crt/common/values-xpg6.c
128 128 $(COMPILE.c) -o $@ ../../../lib/crt/common/values-xpg6.c
129 129
130 130 $(XPG4EXOBJS): $(XD4)
131 131
132 132 $(XPG6EXOBJS): $(XD6)
133 133
134 134 $(XD4)/%.o: %.c
135 135 $(COMPILE.c) -o $@ $<
136 136
137 137 $(XD6)/%.o: %.c
138 138 $(COMPILE.c) -o $@ $<
139 139
140 140 $(XD4):
141 141 -@mkdir -p $@
142 142
143 143 $(XD6):
144 144 -@mkdir -p $@
145 145
146 146 exrecover: $(EXRECOVEROBJS)
147 147 $(LINK.c) $(EXRECOVEROBJS) -o $@ $(LDLIBS)
148 148 $(POST_PROCESS)
149 149
150 150 catalog: $(MSGDOMAIN) $(POFILE)
151 151
152 152 $(POFILE): $(POFILES)
153 153 $(RM) $@
154 154 cat $(POFILES) > $@
155 155
156 156
157 157 install: all $(ROOTHASBINPROG) $(ROOTLIBPROGS) $(ROOTLINKS) \
158 158 $(ROOTXPG4PROG) $(ROOTXPG4LINKS) $(ROOTXPG6PROG) $(ROOTXPG6LINKS)
159 159
160 160 $(ROOTLINKS): $(ROOTHASBINPROG)
161 161 -$(RM) $@
162 162 -$(LN) -f $(ROOTHASBINPROG) $@
163 163
164 164 $(ROOTXPG4LINKS): $(ROOTXPG4PROG)
165 165 -$(RM) $@
166 166 -$(LN) -f $(ROOTXPG4PROG) $@
167 167
168 168 $(ROOTXPG6LINKS): $(ROOTXPG6PROG)
169 169 -$(RM) $@
170 170 -$(LN) -f $(ROOTXPG6PROG) $@
171 171
172 172 clean:
173 173 $(RM) $(OBJS)
174 174
175 175 lint: lint_SRCS
176 176
177 177 include ../../Makefile.targ
↓ open down ↓ |
105 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX