Unleashed v1.4
[unleashed.git] / usr / src / tools / Makefile
blob14b24d0abb7a990ee8bbcfdc7811b02827cb8baf
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>.
27 # Copyright (c) 2019, Joyent, Inc.
28 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
31 include ../Makefile.master
33 COMMON_SUBDIRS= \
34 codereview \
35 ctf \
36 makesoftcore \
37 ndrgen \
38 onbld \
39 protocmp \
40 protolist \
41 scripts
43 i386_SUBDIRS= \
44 elfextract \
45 btxld
47 SUBDIRS= \
48 $($(MACH)_SUBDIRS) \
49 $(COMMON_SUBDIRS)
51 include Makefile.tools
53 ROOTDIRS= \
54 $(ROOTOPT) \
55 $(ROOTONBLD) \
56 $(ROOTONBLD)/bin \
57 $(ROOTONBLD)/bin/$(MACH) \
58 $(ROOTONBLD)/lib \
59 $(ROOTONBLD)/lib/$(MACH) \
60 $(ROOTONBLD)/lib/perl \
61 $(ROOTONBLD)/etc \
62 $(ROOTONBLD)/etc/exception_lists \
63 $(ROOTONBLD)/man \
64 $(ROOTONBLD)/man/man1
66 $(BUILDPY2TOOLS)ROOTDIRS += \
67 $(ROOTONBLD)/lib/python$(PYTHON_VERSION) \
68 $(ROOTONBLD)/lib/python$(PYTHON_VERSION)/onbld \
69 $(ROOTONBLD)/lib/python$(PYTHON_VERSION)/onbld/Checks \
70 $(ROOTONBLD)/lib/python$(PYTHON_VERSION)/onbld/Scm
72 $(BUILDPY3TOOLS)ROOTDIRS += \
73 $(ROOTONBLD)/lib/python$(PYTHON3_VERSION) \
74 $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld \
75 $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/__pycache__ \
76 $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Checks \
77 $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Checks/__pycache__ \
78 $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Scm \
79 $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Scm/__pycache__
81 all := TARGET= install
82 install := TARGET= install
83 clean := TARGET= clean
84 clobber := TARGET= clobber
85 _msg := TARGET= _msg
87 .KEEP_STATE:
90 # Only create directories in the tools proto area when doing an actual
91 # build, not a clean or clobber.
93 DOROOTDIRS= $(ROOTDIRS)
94 clobber:= DOROOTDIRS=
95 clean:= DOROOTDIRS=
97 $(BUILDPY2TOOLS)DOROOTONBLDLIBPY= $(ROOTONBLDLIBPY)
98 clobber:= DOROOTONBLDLIBPY=
99 clean:= DOROOTONBLDLIBPY=
101 all install: $(SUBDIRS)
103 clean: $(SUBDIRS)
105 clobber: $(SUBDIRS)
106 $(RM) -rf $(TOOLS_PROTO)
108 _msg: $(MSGSUBDIRS)
110 .PARALLEL: $(SUBDIRS)
112 $(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $$(DOROOTONBLDLIBPY) FRC
113 @cd $@; pwd; $(MAKE) $(TARGET)
115 # Assume we don't have the install.bin available yet
116 $(ROOTDIRS):
117 $(MKDIR) -p -m $(DIRMODE) $@
119 $(ROOTONBLDLIBPY): $(ROOTDIRS)
120 $(RM) -r $@; $(SYMLINK) python$(PYTHON_VERSION) $@
122 FRC: