8990 /opt/onbld/gk is useless
[unleashed.git] / usr / src / tools / Makefile
blobfaa8aa4705f705b2a5b8aa90e90bd903b8c18251
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 # Copyright 2016 Toomas Soome <tsoome@me.com>
26 # Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
29 include ../Makefile.master
31 # Bootstrap problem --
32 # 'cw' must be built before anything else can be built.
34 BOOT_SUBDIRS= \
37 COMMON_SUBDIRS= \
38 codereview \
39 codesign \
40 cscope-fast \
41 ctf \
42 depcheck \
43 env \
44 findunref \
45 install.bin \
46 lintdump \
47 make \
48 ndrgen \
49 onbld \
50 pmodes \
51 protocmp \
52 protolist \
53 scripts
56 # special versions of commands for use only in build
58 UNSHIPPED_SUBDIRS = \
59 localedef \
60 mandoc \
61 tic \
62 vtfontcvt \
63 zic
65 sparc_SUBDIRS= \
66 chk4ubin \
67 stabs \
68 tokenize
70 i386_SUBDIRS= \
71 aw \
72 elfextract \
73 mbh_patch \
74 btxld
76 LINTSUBDIRS= \
77 codereview \
78 ctf \
79 cw \
80 findunref \
81 lintdump \
82 ndrgen \
83 protocmp \
84 protolist
86 SUBDIRS= \
87 $($(MACH)_SUBDIRS) \
88 $(COMMON_SUBDIRS) \
89 $(UNSHIPPED_SUBDIRS)
91 include Makefile.tools
93 ROOTDIRS= \
94 $(ROOTOPT) \
95 $(ROOTONBLD) \
96 $(ROOTONBLD)/bin \
97 $(ROOTONBLD)/bin/$(MACH) \
98 $(ROOTONBLD)/lib \
99 $(ROOTONBLD)/lib/$(MACH) \
100 $(ROOTONBLD)/lib/$(MACH)/64 \
101 $(ROOTONBLD)/lib/perl \
102 $(ROOTONBLD)/lib/python$(PYTHON_VERSION) \
103 $(ROOTONBLD)/lib/python$(PYTHON_VERSION)/onbld \
104 $(ROOTONBLD)/lib/python$(PYTHON_VERSION)/onbld/Checks \
105 $(ROOTONBLD)/lib/python$(PYTHON_VERSION)/onbld/hgext \
106 $(ROOTONBLD)/lib/python$(PYTHON_VERSION)/onbld/Scm \
107 $(ROOTONBLD)/env \
108 $(ROOTONBLD)/etc \
109 $(ROOTONBLD)/etc/exception_lists \
110 $(ROOTONBLD)/share \
111 $(ROOTONBLD)/man \
112 $(ROOTONBLD)/man/man1onbld
114 all := TARGET= install
115 install := TARGET= install
116 clean := TARGET= clean
117 clobber := TARGET= clobber
118 lint := TARGET= lint
119 _msg := TARGET= _msg
121 .KEEP_STATE:
124 # Only create directories in the tools proto area when doing an actual
125 # build, not a clean or clobber.
127 DOROOTDIRS= $(ROOTDIRS)
128 clobber:= DOROOTDIRS=
129 clean:= DOROOTDIRS=
131 DOROOTONBLDLIBPY= $(ROOTONBLDLIBPY)
132 clobber:= DOROOTONBLDLIBPY=
133 clean:= DOROOTONBLDLIBPY=
135 all install: $(SUBDIRS)
137 clean: $(SUBDIRS)
139 clobber: $(SUBDIRS)
140 $(RM) -rf $(TOOLS_PROTO)
142 lint: $(LINTSUBDIRS)
144 _msg: $(MSGSUBDIRS)
146 .PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
148 $(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
150 $(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $$(DOROOTONBLDLIBPY) FRC
151 @cd $@; pwd; $(MAKE) $(TARGET)
153 $(ROOTDIRS):
154 $(INS.dir)
156 $(ROOTONBLDLIBPY): $(ROOTDIRS)
157 $(RM) -r $@; $(SYMLINK) python$(PYTHON_VERSION) $@
159 make: ctf
161 FRC: