Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/fs.d/Makefile
+++ new/usr/src/cmd/fs.d/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 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
22 22 # Copyright (c) 2018, Joyent, Inc.
23 23 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
24 24 #
25 25
26 26 # The filesystem independent utilities clri, fsdb, dcopy, labelit, and mkfs
27 27 # are all built from the source file switchout.c. They are all then links
28 28 # to the same object. This is accomplished by:
29 29 # 1) building clri from switchout.c (had to choose one)
30 30 # 2) installing it in the target directory
31 31 # 3) linking the others to clri.
32 32 # In a similar manner, ncheck is linked to ff.
33 33
34 34 DFPROG= df
35 35 PROG= $(DFPROG) fsck volcopy ff
36 36 ROOTFS_PROG= mount umount
37 37 SPPROG= clri
38 38 MNTTAB= mnttab
39 39 DEFAULTFILES= fs.dfl
40 40
41 41 include ../Makefile.cmd
42 42
43 43 SUBDIR1= bootfs lofs zfs
44 44 SUBDIR2= dev fd pcfs nfs hsfs proc ctfs udfs ufs tmpfs \
45 45 autofs mntfs objfs sharefs smbclnt reparsed
46 46 SUBDIRS= $(SUBDIR1) $(SUBDIR2)
47 47 I18NDIRS= $(SUBDIR2)
48 48
49 49 CLEANFILES += deffs.o df.o ff.o fsck.o fssnapsup.o \
50 50 mount.o preenlib.o switchout.o umount.o volcopy.o
51 51
52 52 all:= TARGET= all
53 53 install:= TARGET= install
54 54 clean:= TARGET= clean
55 55 clobber:= TARGET= clobber
56 56 lint:= TARGET= lint
57 57 _msg:= TARGET= catalog
58 58
59 59 USRSBINF= df clri fsck volcopy ff
60 60 USRSBINCLRI= dcopy fsdb fssnap labelit mkfs
61 61 USRSBINFF= ncheck
62 62
63 63 ETC2SBIN= mount umount
64 64 ETC2USRSBIN= clri fsdb mkfs fsck labelit dcopy volcopy ff ncheck
65 65 USRBIN2USRSBIN= df
66 66 USRXPG4BIN2USRSBIN= df
67 67
68 68 FSLIB= fslib.o
69 69
70 70 ROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%)
71 71 ROOTUSRSBINLINKS = $(ROOTFS_PROG:%=$(ROOTUSRSBIN)/%)
72 72
73 73 ROOTUSRSBINF= $(USRSBINF:%=$(ROOTUSRSBIN)/%)
74 74 ROOTUSRSBINCLRI= $(USRSBINCLRI:%=$(ROOTUSRSBIN)/%)
75 75 ROOTUSRSBINFF= $(USRSBINFF:%=$(ROOTUSRSBIN)/%)
76 76 ROOTETCMNTTAB= $(MNTTAB:%=$(ROOTETC)/%)
77 77 SYMETC2SBIN = $(ETC2SBIN:%=$(ROOTETC)/%)
↓ open down ↓ |
77 lines elided |
↑ open up ↑ |
78 78 SYMETC2USRSBIN = $(ETC2USRSBIN:%=$(ROOTETC)/%)
79 79 SYMUSRBIN2USRSBIN= $(USRBIN2USRSBIN:%=$(ROOTBIN)/%)
80 80 SYMUSRXPG4BIN2USRSBIN= $(USRXPG4BIN2USRSBIN:%=$(ROOTXPG4BIN)/%)
81 81 SYMDEVNM= $(ROOTUSRSBIN)/devnm
82 82
83 83 CPPFLAGS += -D_LARGEFILE64_SOURCE
84 84
85 85 CERRWARN += -_gcc=-Wno-implicit-function-declaration
86 86 CERRWARN += -_gcc=-Wno-parentheses
87 87 CERRWARN += -_gcc=-Wno-unused-variable
88 -CERRWARN += -_gcc=-Wno-uninitialized
88 +CERRWARN += $(CNOWARN_UNINIT)
89 89 CERRWARN += -_gcc=-Wno-unused-function
90 90
91 91 # not linted
92 92 SMATCH=off
93 93
94 94 $(DFPROG) := LDLIBS += -lcmdutils
95 95 $(SPPROG) := LDLIBS += -lkstat
96 96
97 97 $(ROOTETCMNTTAB) := FILEMODE = 444
98 98
99 99 # for messaging catalog
100 100 #
101 101 POFILE= fs.d.po
102 102 POFILES1= $(PROG:%=%.po) $(ROOTFS_PROG:%=%.po) switchout.po fssnapsup.po
103 103 POFILES2= $(I18NDIRS:%=%/%.po)
104 104 POFILES= $(POFILES1) $(POFILES2)
105 105 volcopy.po := XGETFLAGS += -a -x volcopy.xcl
106 106 $(DFPROG).po := XGETFLAGS += -a -x df.xcl
107 107
108 108 .KEEP_STATE:
109 109
110 110 # This is too intense when building the whole world.
111 111 # .PARALLEL: $(SUBDIRS)
112 112
113 113 all: $(FSLIB) .WAIT $(SUBDIRS) .WAIT all_local
114 114
115 115 _msg: $(I18NDIRS) $(POFILES1)
116 116 $(RM) $(POFILE)
117 117 cat $(POFILES) > $(POFILE)
118 118 $(RM) $(MSGDOMAIN)/$(POFILE)
119 119 cp $(POFILE) $(MSGDOMAIN)
120 120
121 121 all_local: $(PROG) $(ROOTFS_PROG) $(SPPROG) $(MNTTAB) \
122 122 $(DEFAULTFILES)
123 123
124 124 ff volcopy: deffs.o $$(@F).o
125 125 $(LINK.c) -o $@ $@.o deffs.o $(LDLIBS)
126 126 $(POST_PROCESS)
127 127
128 128 df: deffs.o $(FSLIB) $$(@F).o
129 129 $(LINK.c) -o $@ $@.o deffs.o $(FSLIB) $(LDLIBS)
130 130 $(POST_PROCESS)
131 131
132 132 fsck: fsck.o deffs.o preenlib.o
133 133 $(LINK.c) -o $@ fsck.o deffs.o preenlib.o $(LDLIBS)
134 134 $(POST_PROCESS)
135 135
136 136 mount: deffs.o mount.o $(FSLIB)
137 137 $(LINK.c) -o $@ mount.o deffs.o $(FSLIB) $(LDLIBS)
138 138 $(POST_PROCESS)
139 139
140 140 umount: umount.o $(FSLIB)
141 141 $(LINK.c) -o $@ umount.o $(FSLIB) $(LDLIBS)
142 142 $(POST_PROCESS)
143 143
144 144 $(SPPROG): switchout.o deffs.o fssnapsup.o
145 145 $(LINK.c) -o $@ switchout.o deffs.o fssnapsup.o $(LDLIBS) -ldiskmgt
146 146 $(POST_PROCESS)
147 147
148 148 install: $(FSLIB) .WAIT $(SUBDIRS) .WAIT install_local
149 149
150 150 install_local: all_local $(ROOTSBINPROG) $(ROOTUSRSBINF) $(ROOTUSRSBINCLRI) \
151 151 $(ROOTUSRSBINFF) $(ROOTETCMNTTAB) $(ROOTETCDEFAULTFILES) \
152 152 $(SYMETC2SBIN) $(SYMETC2USRSBIN) \
153 153 $(SYMUSRBIN2USRSBIN) $(SYMUSRXPG4BIN2USRSBIN) $(SYMDEVNM) \
154 154 $(ROOTUSRSBINLINKS)
155 155
156 156 # Links from /etc to /sbin such as /etc/mount -> ../sbin/mount
157 157 $(SYMETC2SBIN):
158 158 -$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
159 159
160 160 # Links from /etc to /usr/sbin such as /etc/clri -> ../usr/sbin/clri
161 161 $(SYMETC2USRSBIN):
162 162 -$(RM) $@; $(SYMLINK) ../usr/sbin/$(@F) $@
163 163
164 164 # Links from /usr/bin to /usr/sbin such as /usr/bin/df -> ../sbin/df
165 165 $(SYMUSRBIN2USRSBIN):
166 166 -$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
167 167
168 168 # Links from /usr/xpg4/bin to /usr/sbin such as /usr/xpg4/bin/df -> ../sbin/df
169 169 $(SYMUSRXPG4BIN2USRSBIN):
170 170 -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
171 171
172 172 # Links from /usr/sbin to /sbin such as /usr/sbin/mount -> ../../sbin/mount
173 173 $(ROOTUSRSBINLINKS):
174 174 -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
175 175
176 176 # Symlink from devnm to df in /usr/sbin
177 177 $(SYMDEVNM):
178 178 -$(RM) $@; $(SYMLINK) ./df $@
179 179
180 180 # Multiple names for switchout (clri, dcopy, fsdb, labelit, mkfs)
181 181 $(ROOTUSRSBINCLRI): $(ROOTUSRSBIN)/clri
182 182 -$(RM) $@; $(SYMLINK) ./clri $@
183 183
184 184 $(MNTTAB):
185 185 touch $(MNTTAB)
186 186
187 187 fs.dfl:
188 188 $(RM) $@; $(ECHO) "LOCAL=ufs" >$@
189 189
190 190 # Multiple names for ff (ncheck)
191 191 $(ROOTUSRSBINFF): $(ROOTUSRSBIN)/ff
192 192 -$(RM) $@; $(SYMLINK) ./ff $@
193 193
194 194 clean: $(SUBDIRS) .WAIT clean_local
195 195 clean_local:
196 196 $(RM) $(CLEANFILES)
197 197
198 198 clobber: $(SUBDIRS) .WAIT clobber_local
199 199 clobber_local: clean_local
200 200 $(RM) $(PROG) $(ROOTFS_PROG) $(SPPROG) $(MNTTAB) $(DEFAULTFILES) \
201 201 $(CLOBBERFILES)
202 202
203 203 lint:
204 204
205 205 $(SUBDIRS): FRC
206 206 @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
207 207
208 208 FRC:
↓ open down ↓ |
110 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX