3993N/A# -*- Makefile -*- rules commonly shared among X consolidation open source dirs
3993N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3993N/A# Use is subject to license terms.
3993N/A# Permission is hereby granted, free of charge, to any person obtaining a
3993N/A# copy of this software and associated documentation files (the "Software"),
3993N/A# to deal in the Software without restriction, including without limitation
3993N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
3993N/A#
and/or sell copies of the Software, and to permit persons to whom the
3993N/A# Software is furnished to do so, subject to the following conditions:
3993N/A# The above copyright notice and this permission notice (including the next
3993N/A# paragraph) shall be included in all copies or substantial portions of the
3993N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3993N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3993N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
3993N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3993N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3993N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3993N/AOS_SUBDIRS=$(OS_SUBDIRS_$(MACH))
3993N/A $(MAKE) $(MAKEFLAGS) subdirs OS_TARGET=$@
3993N/Aclean: clean-subdirs clean-obsolete-subdirs
3993N/A $(MAKE) $(MAKEFLAGS) subdirs OS_TARGET=clean
3993N/A @case '${MAKEFLAGS}' in *[ik]*) set +e;; esac; \
3993N/A print "## making" $(OS_TARGET) "in open-src/$(DIRNAME)$@..."; \
3993N/A $(MAKE) $(MAKEFLAGS) CDEBUGFLAGS="$(CDEBUGFLAGS)" $(OS_TARGET)
3993N/A if [[ ! -z "$(OBSOLETE_SUBDIRS)" ]] ; then \
3993N/A for i in $(OBSOLETE_SUBDIRS) ; do \
3993N/A $(MAKE) $(MAKEFLAGS) subdirs OS_TARGET=clean OS_SUBDIRS=$$i ; \
3993N/A print "## removing obsolete build directories in open-src/$(DIRNAME)$$i..."; \
3993N/A cd $$i && rm -rf build_32 build_64 ) ; \
3993N/A ($(START_CMD_ECHO) ; rmdir $$i ) ; \
3993N/A# Dummy target to force another target to always be run, even if a file
3993N/A# or directory with the same name already exists (as it will for subdirs)
3993N/A# Tell dmake it can build subdirs in parallel