make/Makefile

Fri, 05 Jun 2015 12:38:53 +0200

author
mhaupt
date
Fri, 05 Jun 2015 12:38:53 +0200
changeset 1398
2f1b9f4daec1
parent 676
779e155419b8
child 952
6d5471a497fb
permissions
-rw-r--r--

8080087: Nashorn $ENV.PWD is originally undefined
Summary: On Windows, the PWD environment variable does not exist and cannot be imported in scripting mode, so it is set explicitly.
Reviewed-by: lagergren, sundar

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

mercurial