1 #
   2 # CDDL HEADER START
   3 #
   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.
   7 #
   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.
  12 #
  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]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  24 #
  25 
  26 include ../Makefile.master
  27 
  28 # Bootstrap problem --
  29 # 'cw' must be built before anything else can be built.
  30 
  31 BOOT_SUBDIRS= \
  32         cw
  33 
  34 COMMON_SUBDIRS= \
  35         codereview \
  36         codesign \
  37         cscope-fast \
  38         ctf \
  39         depcheck \
  40         env \
  41         findunref \
  42         ndrgen \
  43         onbld \
  44         pmodes \
  45         gk \
  46         install.bin \
  47         lintdump \
  48         protocmp \
  49         protolist \
  50         scripts
  51 
  52 #
  53 #  special versions of commands for use only in build
  54 #
  55 UNSHIPPED_SUBDIRS = \
  56         elfsign \
  57         mandoc
  58 
  59 sparc_SUBDIRS= \
  60         chk4ubin \
  61         stabs \
  62         tokenize
  63 
  64 i386_SUBDIRS=           \
  65         aw              \
  66         elfextract      \
  67         mbh_patch
  68 
  69 LINTSUBDIRS= \
  70         codereview \
  71         ctf \
  72         cw \
  73         findunref \
  74         lintdump \
  75         ndrgen \
  76         protocmp \
  77         protolist
  78 
  79 SUBDIRS= \
  80         $($(MACH)_SUBDIRS) \
  81         $(COMMON_SUBDIRS) \
  82         $(UNSHIPPED_SUBDIRS)
  83 
  84 include Makefile.tools
  85 
  86 ROOTDIRS= \
  87         $(ROOTOPT) \
  88         $(ROOTONBLD) \
  89         $(ROOTONBLD)/bin \
  90         $(ROOTONBLD)/bin/$(MACH) \
  91         $(ROOTONBLD)/lib \
  92         $(ROOTONBLD)/lib/$(MACH) \
  93         $(ROOTONBLD)/lib/perl \
  94         $(ROOTONBLD)/lib/python2.6 \
  95         $(ROOTONBLD)/lib/python2.6/onbld \
  96         $(ROOTONBLD)/lib/python2.6/onbld/Checks \
  97         $(ROOTONBLD)/lib/python2.6/onbld/hgext \
  98         $(ROOTONBLD)/lib/python2.6/onbld/Scm \
  99         $(ROOTONBLD)/env \
 100         $(ROOTONBLD)/etc \
 101         $(ROOTONBLD)/etc/exception_lists \
 102         $(ROOTONBLD)/gk \
 103         $(ROOTONBLD)/man \
 104         $(ROOTONBLD)/man/man1
 105 
 106 all :=          TARGET= install
 107 install :=      TARGET= install
 108 clean :=        TARGET= clean
 109 clobber :=      TARGET= clobber
 110 lint :=         TARGET= lint
 111 _msg :=         TARGET= _msg
 112 
 113 .KEEP_STATE:
 114 
 115 #
 116 # Only create directories in the tools proto area when doing an actual
 117 # build, not a clean or clobber.
 118 #
 119 DOROOTDIRS= $(ROOTDIRS)
 120 clobber:= DOROOTDIRS=
 121 clean:= DOROOTDIRS=
 122 
 123 all install: $(SUBDIRS)
 124 
 125 clean: $(SUBDIRS)
 126 
 127 clobber: $(SUBDIRS)
 128         $(RM) -rf $(TOOLS_PROTO)
 129 
 130 lint: $(LINTSUBDIRS)
 131 
 132 _msg: $(MSGSUBDIRS)
 133 
 134 .PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
 135 
 136 $(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
 137 
 138 $(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
 139         @cd $@; pwd; $(MAKE) $(TARGET)
 140 
 141 $(ROOTDIRS):
 142         $(INS.dir)
 143 
 144 $(ROOTONBLDLIBPY): $(ROOTDIRS)
 145         $(RM) -r $@; $(SYMLINK) python2.6 $@
 146 
 147 FRC: