Subdirs.gmk revision 2362
0N/A# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 1472N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. Oracle designates this 0N/A# particular file as subject to the "Classpath" exception as provided 0N/A# by Oracle in the LICENSE file that accompanied this code. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A# Generic makefile for building subdirectories. 0N/A# SUBDIRS variables to specify the subdirectories to build recursively. 0N/A# This file does not contain any rule. 0N/A# WARNING: This file is shared with other workspaces. 0N/A# So when it includes other files, it must use JDK_TOPDIR. 0N/A# SUBDIRS subdirs for the base module always get built 0N/A# SUBDIRS_<group> subdirs for the named group 0N/A# By default, subdirs specified in the SUBDIRS and all SUBDIRS_* 0N/A# variables will be built. 0N/A# BUILD_MODULES variable can be used to specify one or more groups 0N/A# to be built (BUILD_MODULES=all will build all groups). 0N/A# Variables of the currently supported groups are: 0N/A# Change to the above list also need to update 0N/A# Eventually we want to restructure the make directory 0N/A# the SUBDIRS_<group> variables would not be needed. 0N/A# To build the desktop and tools groups only, you can do: 0N/A# gnumake BUILD_MODULES="desktop tools" ... 0N/A# Iterate the subdirectories specified in $1. 0N/A# - cd into each subdir and make them 0N/A# Given a SUBDIRS* list (first argument), cd into them and make them 0N/A# SUBDIRS_MAKEFLAGS Make settings for a subdir make 0N/A# SUBDIRS_MAKEFLAGS-$@ Make settings specific to this target 0N/A@
$(ECHO) "Begin Processing SUBDIRS: $($1)" 0N/A if [
"$$i" !=
"DUMMY" ] ;
then \
0N/A@
$(ECHO) "Done Processing SUBDIRS: $($1)" 0N/A# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define) 0N/A# OTHERSUBDIRS_MAKEFLAGS Make settings for a subdir make 0N/A if [
"$$i" !=
"DUMMY" ] ;
then \
0N/A# Iterate the list specified in SUBDIRS_<group> only if 0N/A# SUBDIRS_<group> is set and <group> or "all" is specified 0N/A# in the BUILD_MODULES variable 0N/A# If BUILD_MODULES is not set or it's set to "all", 0N/A# iterate all groups. 0N/Aelse # BUILD_MODULES set 605N/A# Iterate SUBDIRS and the groups specified in BUILD_MODULES