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 
  58 sparc_SUBDIRS= \
  59         chk4ubin \
  60         stabs \
  61         tokenize
  62 
  63 i386_SUBDIRS=           \
  64         aw              \
  65         elfextract      \
  66         mbh_patch
  67 
  68 LINTSUBDIRS= \
  69         codereview \
  70         ctf \
  71         cw \
  72         findunref \
  73         lintdump \
  74         ndrgen \
  75         protocmp \
  76         protolist
  77 
  78 SUBDIRS= \
  79         $($(MACH)_SUBDIRS) \
  80         $(COMMON_SUBDIRS) \
  81         $(UNSHIPPED_SUBDIRS)
  82 
  83 include Makefile.tools
  84 
  85 ROOTDIRS= \
  86         $(ROOTOPT) \
  87         $(ROOTONBLD) \
  88         $(ROOTONBLD)/bin \
  89         $(ROOTONBLD)/bin/$(MACH) \
  90         $(ROOTONBLD)/lib \
  91         $(ROOTONBLD)/lib/$(MACH) \
  92         $(ROOTONBLD)/lib/perl \
  93         $(ROOTONBLD)/lib/python2.6 \
  94         $(ROOTONBLD)/lib/python2.6/onbld \
  95         $(ROOTONBLD)/lib/python2.6/onbld/Checks \
  96         $(ROOTONBLD)/lib/python2.6/onbld/hgext \
  97         $(ROOTONBLD)/lib/python2.6/onbld/Scm \
  98         $(ROOTONBLD)/env \
  99         $(ROOTONBLD)/etc \
 100         $(ROOTONBLD)/etc/exception_lists \
 101         $(ROOTONBLD)/gk \
 102         $(ROOTONBLD)/man \
 103         $(ROOTONBLD)/man/man1
 104 
 105 all :=          TARGET= install
 106 install :=      TARGET= install
 107 clean :=        TARGET= clean
 108 clobber :=      TARGET= clobber
 109 lint :=         TARGET= lint
 110 _msg :=         TARGET= _msg
 111 
 112 .KEEP_STATE:
 113 
 114 #
 115 # Only create directories in the tools proto area when doing an actual
 116 # build, not a clean or clobber.
 117 #
 118 DOROOTDIRS= $(ROOTDIRS)
 119 clobber:= DOROOTDIRS=
 120 clean:= DOROOTDIRS=
 121 
 122 all install: $(SUBDIRS)
 123 
 124 clean: $(SUBDIRS)
 125 
 126 clobber: $(SUBDIRS)
 127         $(RM) -rf $(TOOLS_PROTO)
 128 
 129 lint: $(LINTSUBDIRS)
 130 
 131 _msg: $(MSGSUBDIRS)
 132 
 133 .PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
 134 
 135 $(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
 136 
 137 $(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
 138         @cd $@; pwd; $(MAKE) $(TARGET)
 139 
 140 $(ROOTDIRS):
 141         $(INS.dir)
 142 
 143 $(ROOTONBLDLIBPY): $(ROOTDIRS)
 144         $(RM) -r $@; $(SYMLINK) python2.6 $@
 145 
 146 FRC: