Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ed/Makefile
+++ new/usr/src/cmd/ed/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 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright (c) 2018, Joyent, Inc.
26 26
27 27 PROG= ed
28 28 XPG4PROG= ed
29 29 XPG6PROG= ed
30 30
31 31 EDOBJ= ed.o compile.o
32 32 XPG4EDOBJ= edobjs.xpg4/ed.o edobjs.xpg4/compile.o values-xpg4.o
33 33 XPG6EDOBJ= edobjs.xpg6/ed.o edobjs.xpg6/compile.o values-xpg6.o
34 34 OBJS= $(EDOBJ) $(XPG4EDOBJ) $(XPG6EDOBJ)
↓ open down ↓ |
34 lines elided |
↑ open up ↑ |
35 35 SRCS= ./ed.c ../expr/compile.c
36 36
37 37 POFILES= $(EDOBJ:%.o=%.po)
38 38
39 39 include ../Makefile.cmd
40 40
41 41 CFLAGS += $(CCVERBOSE)
42 42 CERRWARN += -_gcc=-Wno-parentheses
43 43 CERRWARN += -_gcc=-Wno-unused-variable
44 44 CERRWARN += -_gcc=-Wno-unused-function
45 -CERRWARN += -_gcc=-Wno-uninitialized
45 +CERRWARN += $(CNOWARN_UNINIT)
46 46
47 47 # not linted
48 48 SMATCH=off
49 49
50 50 $(XPG4) := CFLAGS += -DXPG4
51 51 $(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc
52 52 lint := LDLIBS += -lgen -lcrypt
53 53 LDLIBS += -lmapmalloc -lgen -lcrypt_i
54 54 XGETFLAGS += -a -x ed.xcl
55 55
56 56 MAPFILE.INT = ../expr/mapfile-intf
57 57 LDFLAGS += $(MAPFILE.INT:%=-M%)
58 58
59 59 POFILE= ed_cmd.po
60 60
61 61 %.po: ../expr/%.c
62 62 $(COMPILE.cpp) $< > $*.c.i
63 63 $(XGETTEXT) $(XGETFLAGS) $*.c.i
64 64 $(MV) messages.po $@
65 65
66 66 .KEEP_STATE:
67 67
68 68 all: $(PROG) $(XPG4) $(XPG6)
69 69
70 70 $(PROG): $(EDOBJ) $(MAPFILE.INT)
71 71 $(LINK.c) $(EDOBJ) -o $@ $(LDLIBS)
72 72 $(POST_PROCESS)
73 73
74 74 $(XPG4): edobjs.xpg4 $(XPG4EDOBJ) $(MAPFILE.INT)
75 75 $(LINK.c) $(XPG4EDOBJ) -o $@ $(LDLIBS)
76 76 $(POST_PROCESS)
77 77
78 78 $(XPG6): edobjs.xpg6 $(XPG6EDOBJ) $(MAPFILE.INT)
79 79 $(LINK.c) $(XPG6EDOBJ) -o $@ $(LDLIBS)
80 80 $(POST_PROCESS)
81 81
82 82 compile.o: ../expr/compile.c
83 83 $(COMPILE.c) -o $@ ../expr/compile.c
84 84
85 85 edobjs.xpg4/%.o: %.c
86 86 $(COMPILE.c) -o $@ $<
87 87
88 88 edobjs.xpg4/%.o: ../expr/compile.c
89 89 $(COMPILE.c) -o $@ $<
90 90
91 91 edobjs.xpg6/%.o: %.c
92 92 $(COMPILE.c) -o $@ $<
93 93
94 94 edobjs.xpg6/%.o: ../expr/compile.c
95 95 $(COMPILE.c) -o $@ $<
96 96
97 97 edobjs.xpg4:
98 98 -@mkdir -p $@
99 99
100 100 edobjs.xpg6:
101 101 -@mkdir -p $@
102 102
103 103 $(POFILE): $(POFILES)
104 104 $(RM) $@
105 105 cat $(POFILES) > $@
106 106
107 107 install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTXPG6PROG)
108 108 $(RM) $(ROOTBIN)/red
109 109 $(LN) $(ROOTBIN)/ed $(ROOTBIN)/red
110 110
111 111 values-xpg4.o: ../../lib/crt/common/values-xpg4.c
112 112 $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c
113 113
114 114 values-xpg6.o: ../../lib/crt/common/values-xpg6.c
115 115 $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg6.c
116 116
117 117 clean:
118 118 -@rm -rf $(OBJS) $(XPG4) $(XPG6) edobjs.xpg4 edobjs.xpg6 \
119 119 compile.c.i
120 120
121 121 lint: lint_PROG
122 122
123 123 include ../Makefile.targ
↓ open down ↓ |
68 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX