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