makefiles/Makefile

Thu, 11 Jul 2013 10:13:46 -0700

author
katleman
date
Thu, 11 Jul 2013 10:13:46 -0700
changeset 389
8ef83d4b23c9
parent 334
c30a7cb5c587
child 412
602fdd7bb765
permissions
-rw-r--r--

Added tag jdk8-b98 for changeset b1fb4612a2ca

ohair@299 1 #
ohair@334 2 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
ohair@299 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@299 4 #
ohair@299 5 # This code is free software; you can redistribute it and/or modify it
ohair@299 6 # under the terms of the GNU General Public License version 2 only, as
ohair@299 7 # published by the Free Software Foundation. Oracle designates this
ohair@299 8 # particular file as subject to the "Classpath" exception as provided
ohair@299 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@299 10 #
ohair@299 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@299 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@299 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@299 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@299 15 # accompanied this code).
ohair@299 16 #
ohair@299 17 # You should have received a copy of the GNU General Public License version
ohair@299 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@299 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@299 20 #
ohair@299 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@299 22 # or visit www.oracle.com if you need additional information or have any
ohair@299 23 # questions.
ohair@299 24 #
ohair@299 25
ohair@334 26 # Locate this Makefile
ohair@334 27 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
ohair@334 28 makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
ohair@334 29 else
ohair@334 30 makefile_path:=$(lastword $(MAKEFILE_LIST))
ohair@334 31 endif
ohair@334 32 repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path))
erikj@310 33
ohair@334 34 # What is the name of this subsystem (langtools, corba, etc)?
ohair@334 35 subsystem_name:=$(notdir $(repo_dir))
ohair@299 36
ohair@334 37 # Try to locate top-level makefile
ohair@334 38 top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile
ohair@334 39 ifneq ($(wildcard $(top_level_makefile)),)
ohair@334 40 $(info Will run $(subsystem_name) target on top-level Makefile)
ohair@334 41 $(info WARNING: This is a non-recommended way of building!)
ohair@334 42 $(info ===================================================)
ohair@334 43 else
ohair@334 44 $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
ohair@334 45 $(error Build from top-level Makefile instead)
ohair@334 46 endif
ohair@299 47
ohair@334 48 all:
ohair@334 49 @$(MAKE) -f $(top_level_makefile) $(subsystem_name)

mercurial