Print this page
7627 Build should be smarter about how SGSPROTO is created
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/Makefile
+++ new/usr/src/cmd/sgs/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 (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright 2016 RackTop Systems.
24 24 #
25 25
26 26 include $(SRC)/cmd/Makefile.cmd
27 27
28 28 # Note: Why SUBDIRS-common isn't sorted alphabetically
29 29 #
30 30 # The items under SGS are not independent of each other.
31 31 # They must be built in an order that ensures that
32 32 # all dependencies of an item have been built before the
33 33 # item itself.
34 34 #
35 35 SUBDIRS-common= libconv \
36 36 .WAIT \
37 37 libdl \
38 38 libelf \
39 39 liblddbg \
40 40 .WAIT \
41 41 libld \
42 42 libldmake \
43 43 libldstab \
44 44 librtld \
45 45 libcrle \
46 46 .WAIT \
47 47 0@0 \
48 48 ld \
49 49 ldd \
50 50 lddstub \
51 51 rtld \
52 52 link_audit \
53 53 .WAIT \
54 54 librtld_db \
55 55 ldprof \
56 56 pvs \
57 57 crle \
58 58 ar \
59 59 dump \
60 60 elfdump \
61 61 elfedit \
62 62 elfwrap \
63 63 error \
64 64 gprof \
65 65 lari \
66 66 lex \
67 67 lorder \
68 68 m4 \
69 69 mcs \
70 70 moe \
71 71 nm \
72 72 prof \
73 73 ranlib \
74 74 size \
75 75 symorder \
76 76 tsort \
77 77 unifdef \
78 78 yacc
79 79
80 80 SUBDIRS-i386=
81 81 SUBDIRS-sparc= rtld.4.x
82 82
83 83 SUBDIRS= $(SUBDIRS-common) $(SUBDIRS-$(MACH))
84 84
85 85 # Messaging support
86 86 #
87 87 POSUBDIRS= m4 nm tsort yacc
88 88 POFILE= sgs.po
89 89 POFILES= $(POSUBDIRS:%=%/%.po)
90 90
91 91 MSGSUBDIRS= ld ldd libld liblddbg \
92 92 libldstab librtld rtld libelf \
93 93 ldprof libcrle pvs elfdump \
94 94 elfedit crle moe lari \
95 95 librtld_db elfwrap ar
96 96
97 97 MSGDIR= messages
98 98
99 99
100 100 all := TARGET= all
101 101 install := TARGET= install
102 102 clean := TARGET= clean
103 103 clobber := TARGET= clobber
104 104 delete := TARGET= delete
105 105 lint := TARGET= lint
106 106 _msg := TARGET= catalog
107 107 _msg_gettext := TARGET= catalog
108 108 _msg_sgsmsg := TARGET= catalog
109 109 chkmsg := TARGET= chkmsg
110 110
111 111
112 112 .KEEP_STATE:
113 113
114 114 .PARALLEL: $(SUBDIRS)
115 115
116 116 all install: native-add .WAIT $(SUBDIRS)
117 117
118 118 include $(SRC)/cmd/Makefile.targ
119 119
120 120 # Messaging support
121 121 #
122 122 _msg: _msg_gettext _msg_sgsmsg
123 123
124 124 _msg_gettext: $(MSGDOMAIN)/$(POFILE)
125 125
126 126 _msg_sgsmsg: $(MSGDIR)
127 127
128 128 $(MSGDOMAIN)/$(POFILE): \
129 129 $(MSGDOMAIN) $(POFILE)
130 130
131 131 $(POFILE): $(POSUBDIRS)
132 132 $(RM) $(POFILE)
133 133 cat $(POFILES) > $(POFILE)
134 134
135 135 $(MSGDIR): $(MSGSUBDIRS) FRC
136 136 @ cd $@; pwd; $(MAKE) $(TARGET)
137 137
138 138 chkmsg: libconv $(MSGSUBDIRS) FRC
139 139
140 140 check: chkmsg
141 141
142 142 # built from lib/Makefile
143 143 install_lib: FRC
144 144 @ cd lex; pwd; $(MAKE) $@
145 145 @ cd yacc; pwd; $(MAKE) $@
146 146
147 147 lint: $(SUBDIRS)
148 148
149 149 delete \
150 150 clean clobber: native-clobber .WAIT $(SUBDIRS) $(MSGDIR)
151 151
↓ open down ↓ |
151 lines elided |
↑ open up ↑ |
152 152 $(SUBDIRS): FRC
153 153 @ cd $@; pwd; $(MAKE) $(TARGET)
154 154
155 155
156 156 # Integration of ld and ld.so.1 in some developement cycles requires that both
157 157 # of these modules be built using the new ld. This `native' target allows us
158 158 # to build a local ld which will then be used to build the delivered version of
159 159 # itself and ld.so.1. Once this new functionality appears in the standard ld
160 160 # this target can be disabled.
161 161
162 -native-add: native-proto FRC
162 +native-add: FRC
163 163 @ cd tools/$(MACH); pwd; $(MAKE) native
164 164 @ cd libconv/$(MACH); pwd; $(MAKE)
165 165 @ cd libelf/$(MACH); pwd; $(MAKE) native
166 166 @ cd liblddbg/$(MACH); pwd; $(MAKE) native
167 167 @ cd libldstab/$(MACH); pwd; $(MAKE) native
168 168 @ cd libld/$(MACH); pwd; $(MAKE) native
169 169 @ cd ld/$(MACH); pwd; $(MAKE) native
170 170
171 171 native-clobber:
172 172 @ cd tools; pwd; $(MAKE) $(TARGET)
173 173 $(RM) -r proto/$(MACH)
174 -
175 -native-proto:
176 - -@mkdir -p proto/$(MACH)
177 - -@mkdir -p proto/$(MACH)/lib
178 - -@mkdir -p proto/$(MACH)/usr
179 - -@mkdir -p proto/$(MACH)/usr/bin
180 174
181 175 FRC:
182 176
183 177 #
184 178 # Cross-reference customization: ignore the directories named by XRPRUNE,
185 179 # and tweak the file globs slightly.
186 180 #
187 181 XRPRUNE= rtld.4.x packages abi
188 182 XRADD= *.msg mapfile* llib-[a-z]*
189 183 XRDEL= Makefile* kobj_*
190 184
191 185 #
192 186 # Establish a set of directories for xref to search. As there are duplicates
193 187 # of things like headers, and only one file will be added to the xref database,
194 188 # we want xref to list the source file.
195 189 #
196 190 XRDIRS= . \
197 191 ../../common/elfcap \
198 192 ../../head \
199 193 ../../uts/common/krtld \
200 194 ../../uts/common/sys \
201 195 ../../uts/sparc/sys \
202 196 ../../uts/sparc/krtld \
203 197 ../../uts/intel/ia32/krtld \
204 198 ../../uts/intel/amd64/krtld
205 199
206 200 xref: FRC
207 201 @ $(RM) cscope.*
208 202 xref -p -x cscope
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX