jdk/make/common/Subdirs.gmk
author mchung
Wed, 10 Feb 2010 17:51:07 -0800
changeset 4917 c98da2209f8c
child 5506 202f599c92aa
permissions -rw-r--r--
6915413: Module build: building of specified jdk components instead of all Summary: Define new SUBDIRS_* variables for specifying components for one group Reviewed-by: ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4917
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     1
# Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     3
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     4
# This code is free software; you can redistribute it and/or modify it
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     5
# under the terms of the GNU General Public License version 2 only, as
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     6
# published by the Free Software Foundation.  Sun designates this
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     7
# particular file as subject to the "Classpath" exception as provided
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     8
# by Sun in the LICENSE file that accompanied this code.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
     9
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    14
# accompanied this code).
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    15
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    16
# You should have received a copy of the GNU General Public License version
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    19
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    20
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    21
# CA 95054 USA or visit www.sun.com if you need additional information or
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    22
# have any questions
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    23
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    24
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    25
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    26
# Generic makefile for building subdirectories.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    27
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    28
# SUBDIRS variables to specify the subdirectories to build recursively.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    29
# Makefile has to include Subdirs.gmk AFTER all SUBDIRS variables are
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    30
# defined.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    31
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    32
# This file does not contain any rule.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    33
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    34
# WARNING: This file is shared with other workspaces.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    35
#          So when it includes other files, it must use JDK_TOPDIR.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    36
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    37
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    38
# SUBDIRS          subdirs for the base module always get built
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    39
# SUBDIRS_<group>  subdirs for the named group
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    40
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    41
# By default, subdirs specified in the SUBDIRS and all SUBDIRS_* 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    42
# variables will be built.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    43
# 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    44
# BUILD_MODULES variable can be used to specify one or more groups
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    45
# to be built (BUILD_MODULES=all will build all groups).
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    46
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    47
# Variables of the currently supported groups are:
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    48
#  SUBDIRS_desktop    
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    49
#  SUBDIRS_management
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    50
#  SUBDIRS_enterprise
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    51
#  SUBDIRS_misc
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    52
#  SUBDIRS_tools
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    53
# 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    54
# Change to the above list also need to update 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    55
# make/common/shared/Sanity.gmk.  NOTE: this list is subject
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    56
# to change till the JDK 7 SE profiles/modules are finalized.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    57
# 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    58
# Eventually we want to restructure the make directory
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    59
# according to these grouping (e.g. make/desktop/...) and
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    60
# the SUBDIRS_<group> variables would not be needed.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    61
# 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    62
# To build the desktop and tools groups only, you can do:
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    63
# gnumake BUILD_MODULES="desktop tools" ...
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    64
# 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    65
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    66
# Iterate the subdirectories specified in $1.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    67
# - cd into each subdir and make them
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    68
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    69
# Given a SUBDIRS* list (first argument), cd into them and make them
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    70
#   SUBDIRS_MAKEFLAGS      Make settings for a subdir make
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    71
#   SUBDIRS_MAKEFLAGS-$@   Make settings specific to this target
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    72
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    73
define subdirs-group-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    74
@$(ECHO) "Begin Processing SUBDIRS: $($1)"
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    75
@for i in DUMMY $($1) ; do \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    76
  if [ "$$i" != "DUMMY" ] ; then \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    77
    $(MAKE) -C $$i $@ $(SUBDIRS_MAKEFLAGS) $(SUBDIRS_MAKEFLAGS-$@) \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    78
            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    79
  fi ; \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    80
done
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    81
@$(ECHO) "Done Processing SUBDIRS: $($1)"
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    82
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    83
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    84
# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    85
#   OTHERSUBDIRS_MAKEFLAGS      Make settings for a subdir make
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    86
define OTHERSUBDIRS-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    87
@$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    88
@for i in DUMMY $(OTHERSUBDIRS) ; do \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    89
  if [ "$$i" != "DUMMY" ] ; then \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    90
    $(MAKE) -C $$i $@ $(OTHERSUBDIRS_MAKEFLAGS) \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    91
            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    92
  fi ; \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    93
done
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    94
@$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    95
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    96
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    97
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    98
# Iterate the list specified in SUBDIRS_<group> only if
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
    99
# SUBDIRS_<group> is set and <group> or "all" is specified
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   100
# in the BUILD_MODULES variable
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   101
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   102
ifdef SUBDIRS_desktop 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   103
  ifneq (,$(findstring desktop, $(BUILD_MODULES)))
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   104
      define subdirs-desktop-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   105
         @$(call subdirs-group-loop,SUBDIRS_desktop)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   106
      endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   107
  else
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   108
    define subdirs-desktop-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   109
    endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   110
  endif
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   111
else   
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   112
  define subdirs-desktop-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   113
  endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   114
endif   # SUBDIRS_desktop 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   115
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   116
ifdef SUBDIRS_enterprise 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   117
  ifneq (,$(findstring enterprise, $(BUILD_MODULES)))
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   118
      define subdirs-enterprise-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   119
         @$(call subdirs-group-loop,SUBDIRS_enterprise)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   120
      endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   121
  else
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   122
    define subdirs-enterprise-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   123
    endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   124
  endif
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   125
else   
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   126
define subdirs-enterprise-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   127
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   128
endif   # SUBDIRS_enterprise 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   129
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   130
ifdef SUBDIRS_management 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   131
  ifneq (,$(findstring management, $(BUILD_MODULES)))
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   132
      define subdirs-management-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   133
         @$(call subdirs-group-loop,SUBDIRS_management)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   134
      endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   135
  else
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   136
    define subdirs-management-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   137
    endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   138
  endif
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   139
else   
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   140
define subdirs-management-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   141
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   142
endif   # SUBDIRS_management 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   143
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   144
ifdef SUBDIRS_misc 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   145
  ifneq (,$(findstring misc, $(BUILD_MODULES)))
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   146
      define subdirs-misc-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   147
         @$(call subdirs-group-loop,SUBDIRS_misc)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   148
      endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   149
  else
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   150
    define subdirs-misc-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   151
    endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   152
  endif
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   153
else   
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   154
define subdirs-misc-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   155
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   156
endif   # SUBDIRS_misc 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   157
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   158
ifdef SUBDIRS_tools 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   159
  ifneq (,$(findstring tools, $(BUILD_MODULES)))
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   160
      define subdirs-tools-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   161
         @$(call subdirs-group-loop,SUBDIRS_tools)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   162
      endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   163
  else
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   164
    define subdirs-tools-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   165
    endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   166
  endif
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   167
else   
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   168
define subdirs-tools-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   169
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   170
endif   # SUBDIRS_tools 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   171
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   172
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   173
# If BUILD_MODULES is not set or it's set to "all",
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   174
# iterate all groups.
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   175
SUBDIRS_all = $(SUBDIRS) $(SUBDIRS_desktop) $(SUBDIRS_enterprise) \
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   176
	      $(SUBDIRS_management) $(SUBDIRS_misc) $(SUBDIRS_tools)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   177
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   178
ifndef BUILD_MODULES
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   179
define SUBDIRS-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   180
  @$(call subdirs-group-loop,SUBDIRS_all)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   181
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   182
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   183
else
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   184
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   185
ifneq (,$(findstring all, $(BUILD_MODULES)))
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   186
define SUBDIRS-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   187
  @$(call subdirs-group-loop,SUBDIRS_all)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   188
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   189
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   190
else # BUILD_MODULES set 
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   191
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   192
# Iterate SUBDIRS and the groups specified in BUILD_MODULES
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   193
#
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   194
define SUBDIRS-loop
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   195
  @$(call subdirs-group-loop,SUBDIRS)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   196
  @$(subdirs-desktop-loop)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   197
  @$(subdirs-enterprise-loop)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   198
  @$(subdirs-management-loop)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   199
  @$(subdirs-misc-loop)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   200
  @$(subdirs-tools-loop)
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   201
endef
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   202
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   203
endif
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents:
diff changeset
   204
endif # BUILD_MODULES