loader: use snprintf() with variable length error messages
[unleashed.git] / usr / src / tools / Makefile
blob653af4f1889ec6fe3b7d1694b65a1b8e8ffd1cad
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>
28 include ../Makefile.master
30 # Bootstrap problem --
31 # 'cw' must be built before anything else can be built.
33 BOOT_SUBDIRS= \
36 COMMON_SUBDIRS= \
37 codereview \
38 cscope-fast \
39 ctf \
40 depcheck \
41 env \
42 findunref \
43 install.bin \
44 ndrgen \
45 onbld \
46 pmodes \
47 protocmp \
48 protolist \
49 scripts
52 # special versions of commands for use only in build
54 UNSHIPPED_SUBDIRS = \
55 mandoc
57 sparc_SUBDIRS= \
58 chk4ubin \
59 stabs \
60 tokenize
62 i386_SUBDIRS= \
63 elfextract \
64 mbh_patch \
65 btxld
67 SUBDIRS= \
68 $($(MACH)_SUBDIRS) \
69 $(COMMON_SUBDIRS) \
70 $(UNSHIPPED_SUBDIRS)
72 include Makefile.tools
74 ROOTDIRS= \
75 $(ROOTOPT) \
76 $(ROOTONBLD) \
77 $(ROOTONBLD)/bin \
78 $(ROOTONBLD)/bin/$(MACH) \
79 $(ROOTONBLD)/lib \
80 $(ROOTONBLD)/lib/$(MACH) \
81 $(ROOTONBLD)/lib/perl \
82 $(ROOTONBLD)/lib/python2.6 \
83 $(ROOTONBLD)/lib/python2.6/onbld \
84 $(ROOTONBLD)/lib/python2.6/onbld/Checks \
85 $(ROOTONBLD)/lib/python2.6/onbld/hgext \
86 $(ROOTONBLD)/lib/python2.6/onbld/Scm \
87 $(ROOTONBLD)/env \
88 $(ROOTONBLD)/etc \
89 $(ROOTONBLD)/etc/exception_lists \
90 $(ROOTONBLD)/man \
91 $(ROOTONBLD)/man/man1onbld
93 all := TARGET= install
94 install := TARGET= install
95 clean := TARGET= clean
96 clobber := TARGET= clobber
97 _msg := TARGET= _msg
99 .KEEP_STATE:
102 # Only create directories in the tools proto area when doing an actual
103 # build, not a clean or clobber.
105 DOROOTDIRS= $(ROOTDIRS)
106 clobber:= DOROOTDIRS=
107 clean:= DOROOTDIRS=
109 all install: $(SUBDIRS)
111 clean: $(SUBDIRS)
113 clobber: $(SUBDIRS)
114 $(RM) -rf $(TOOLS_PROTO)
116 _msg: $(MSGSUBDIRS)
118 .PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
120 $(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
122 $(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
123 @cd $@; pwd; $(MAKE) $(TARGET)
125 $(ROOTDIRS):
126 $(INS.dir)
128 $(ROOTONBLDLIBPY): $(ROOTDIRS)
129 $(RM) -r $@; $(SYMLINK) python2.6 $@
131 FRC: