22 # or visit www.oracle.com if you need additional information or have any |
22 # or visit www.oracle.com if you need additional information or have any |
23 # questions. |
23 # questions. |
24 # |
24 # |
25 |
25 |
26 # Locate this Makefile |
26 # Locate this Makefile |
27 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) |
27 ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), ) |
28 makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) |
28 makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST)) |
29 else |
29 else |
30 makefile_path:=$(lastword $(MAKEFILE_LIST)) |
30 makefile_path := $(lastword $(MAKEFILE_LIST)) |
31 endif |
31 endif |
32 repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path)) |
32 repo_dir := $(patsubst %/makefiles/Makefile, %, $(makefile_path)) |
33 |
33 |
34 # What is the name of this subsystem (langtools, corba, etc)? |
34 # What is the name of this subsystem (langtools, corba, etc)? |
35 subsystem_name:=$(notdir $(repo_dir)) |
35 subsystem_name := $(notdir $(repo_dir)) |
36 |
36 |
37 # Try to locate top-level makefile |
37 # Try to locate top-level makefile |
38 top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile |
38 top_level_makefile := $(repo_dir)/../common/makefiles/Makefile |
39 ifneq ($(wildcard $(top_level_makefile)),) |
39 ifneq ($(wildcard $(top_level_makefile)), ) |
40 $(info Will run $(subsystem_name) target on top-level Makefile) |
40 $(info Will run $(subsystem_name) target on top-level Makefile) |
41 $(info WARNING: This is a non-recommended way of building!) |
41 $(info WARNING: This is a non-recommended way of building!) |
42 $(info ===================================================) |
42 $(info ===================================================) |
43 else |
43 else |
44 $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?) |
44 $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?) |