Skip to content

Commit 64bd8d2

Browse files
author
David Holmes
committed
8349511: [BACKOUT] Framework for tracing makefile inclusion and parsing
Reviewed-by: darcy, mikael
1 parent 5e1cc08 commit 64bd8d2

File tree

273 files changed

+1054
-2216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+1054
-2216
lines changed

.github/actions/get-gtest/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ runs:
4949
- name: 'Export path to where GTest is installed'
5050
id: path-name
5151
run: |
52-
# Export the absolute path
53-
echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT
52+
# Export the path
53+
echo 'path=gtest' >> $GITHUB_OUTPUT
5454
shell: bash

.github/actions/get-jtreg/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ runs:
4949
- name: 'Export path to where JTReg is installed'
5050
id: path-name
5151
run: |
52-
# Export the absolute path
53-
echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT
52+
# Export the path
53+
echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
5454
shell: bash

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
5959
else
6060
makefile_path := $(lastword $(MAKEFILE_LIST))
6161
endif
62-
TOPDIR := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
62+
topdir := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
6363

6464
# ... and then we can include the real makefile to bootstrap the build
65-
include $(TOPDIR)/make/PreInit.gmk
65+
include $(topdir)/make/PreInit.gmk

make/Bundles.gmk

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,10 @@
2323
# questions.
2424
#
2525

26-
include MakeFileStart.gmk
26+
default: all
2727

28-
################################################################################
28+
include $(SPEC)
29+
include MakeBase.gmk
2930

3031
include CopyFiles.gmk
3132
include MakeIO.gmk
@@ -42,6 +43,8 @@ ifeq ($(call isBuildOs, windows), true)
4243
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
4344
endif
4445

46+
# Hook to include the corresponding custom file, if present.
47+
$(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
4548
################################################################################
4649
# BUNDLE : Name of bundle to create
4750
# FILES : Files in BASE_DIRS to add to bundle
@@ -499,6 +502,11 @@ endif
499502

500503
################################################################################
501504

505+
# Hook to include the corresponding custom file, if present.
506+
$(eval $(call IncludeCustomExtension, Bundles.gmk))
507+
508+
################################################################################
509+
502510
product-bundles: $(PRODUCT_TARGETS)
503511
legacy-bundles: $(LEGACY_TARGETS)
504512
test-bundles: $(TEST_TARGETS)
@@ -509,10 +517,6 @@ static-libs-bundles: $(STATIC_LIBS_TARGETS)
509517
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
510518
jcov-bundles: $(JCOV_TARGETS)
511519

512-
.PHONY: product-bundles test-bundles \
520+
.PHONY: all default product-bundles test-bundles \
513521
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
514522
static-libs-bundles static-libs-graal-bundles jcov-bundles
515-
516-
################################################################################
517-
518-
include MakeFileEnd.gmk

make/CompileCommands.gmk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,10 @@
2323
# questions.
2424
#
2525

26-
include MakeFileStart.gmk
26+
default: all
2727

28-
################################################################################
28+
include $(SPEC)
29+
include MakeBase.gmk
2930

3031
# When FIXPATH is set, let it process the file to make sure all paths are usable
3132
# by system native tools. The FIXPATH tool assumes arguments preceded by an @
@@ -49,6 +50,6 @@ $(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile-
4950

5051
TARGETS += $(OUTPUTDIR)/compile_commands.json
5152

52-
################################################################################
53+
all: $(TARGETS)
5354

54-
include MakeFileEnd.gmk
55+
.PHONY: all

make/CompileDemos.gmk

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,23 @@
2323
# questions.
2424
#
2525

26-
include MakeFileStart.gmk
27-
2826
################################################################################
2927
# Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
3028
################################################################################
3129

30+
default: all
31+
32+
include $(SPEC)
33+
include MakeBase.gmk
34+
3235
include CopyFiles.gmk
3336
include JavaCompilation.gmk
3437
include TextFileProcessing.gmk
3538
include ZipArchive.gmk
3639

40+
# Hook to include the corresponding custom file, if present.
41+
$(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
42+
3743
# Prepare the find cache.
3844
DEMO_SRC_DIRS += $(TOPDIR)/src/demo
3945

@@ -258,8 +264,11 @@ ifneq ($(filter images, $(MAKECMDGOALS)), )
258264
IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
259265
endif
260266

261-
images: $(IMAGES_TARGETS)
262-
263267
################################################################################
268+
# Hook to include the corresponding custom file, if present.
269+
$(eval $(call IncludeCustomExtension, CompileDemos-post.gmk))
270+
271+
all: $(TARGETS)
272+
images: $(IMAGES_TARGETS)
264273

265-
include MakeFileEnd.gmk
274+
.PHONY: all

make/CompileInterimLangtools.gmk

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,11 @@
2323
# questions.
2424
#
2525

26-
include MakeFileStart.gmk
26+
# This must be the first rule
27+
default: all
2728

28-
################################################################################
29+
include $(SPEC)
30+
include MakeBase.gmk
2931

3032
include CopyFiles.gmk
3133
include JavaCompilation.gmk
@@ -146,4 +148,5 @@ TARGETS += $(BUILD_JAVAC_SERVER)
146148

147149
################################################################################
148150

149-
include MakeFileEnd.gmk
151+
152+
all: $(TARGETS)

make/CompileJavaModules.gmk

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,13 @@
2323
# questions.
2424
#
2525

26-
include MakeFileStart.gmk
26+
# This must be the first rule
27+
default: all
2728

28-
################################################################################
29-
30-
include JavaCompilation.gmk
29+
include $(SPEC)
30+
include MakeBase.gmk
3131
include Modules.gmk
32+
include JavaCompilation.gmk
3233

3334
################################################################################
3435
# If this is an imported module that has prebuilt classes, only compile
@@ -85,15 +86,7 @@ CreateHkTargets = \
8586
################################################################################
8687
# Include module specific build settings
8788

88-
THIS_SNIPPET := modules/$(MODULE)/Java.gmk
89-
90-
ifneq ($(wildcard $(THIS_SNIPPET)), )
91-
include MakeSnippetStart.gmk
92-
93-
include $(THIS_SNIPPET)
94-
95-
include MakeSnippetEnd.gmk
96-
endif
89+
-include Java.gmk
9790

9891
################################################################################
9992
# Setup the main compilation
@@ -155,4 +148,6 @@ endif
155148

156149
################################################################################
157150

158-
include MakeFileEnd.gmk
151+
all: $(TARGETS)
152+
153+
.PHONY: all

make/CompileModuleTools.gmk

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,14 @@
2323
# questions.
2424
#
2525

26-
include MakeFileStart.gmk
27-
28-
################################################################################
26+
default: all
2927

28+
include $(SPEC)
29+
include MakeBase.gmk
3030
include JavaCompilation.gmk
3131

32+
################################################################################
33+
3234
TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
3335

3436
# When using an external BUILDJDK, make it possible to shortcut building of
@@ -62,4 +64,4 @@ TARGETS += $(BUILD_JIGSAW_TOOLS)
6264

6365
################################################################################
6466

65-
include MakeFileEnd.gmk
67+
all: $(TARGETS)

make/CompileToolsHotspot.gmk

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,19 @@
2323
# questions.
2424
#
2525

26-
include MakeFileStart.gmk
26+
# This must be the first rule
27+
default: all
2728

28-
################################################################################
29+
include $(SPEC)
30+
include MakeBase.gmk
2931

3032
include JavaCompilation.gmk
3133

34+
TARGETS :=
35+
36+
# Hook to include the corresponding custom file, if present.
37+
$(eval $(call IncludeCustomExtension, hotspot/CompileTools.gmk))
38+
3239
################################################################################
3340
# Build tools needed for the JFR source code generation
3441

@@ -44,6 +51,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \
4451

4552
TARGETS += $(BUILD_TOOLS_HOTSPOT)
4653

47-
################################################################################
4854

49-
include MakeFileEnd.gmk
55+
all: $(TARGETS)
56+
57+
.PHONY: all

0 commit comments

Comments
 (0)