make/Makefile

Mon, 31 Aug 2020 07:09:54 +0100

author
andrew
date
Mon, 31 Aug 2020 07:09:54 +0100
changeset 3928
a56fbe019ae8
parent 2227
998b10c43157
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag jdk8u272-b06 for changeset b974f43a589f

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

mercurial