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