Skip to content

Commit

Permalink
Fix collection of object files for omr_static_lib
Browse files Browse the repository at this point in the history
The behavior of GNU make seems to have changed between versions
4.2.1 and 4.3.

The latter appears to prioritize MAKEFLAGS= over (at least some)
command-line options, with the effect being that --no-print-directory
is ignored and included in the output of show-objects.

If invoked as part of a larger build where the make job server is
enabled, there are also warnings that make unwanted contributions
to the output of show-objects.

This fixes that, and removes the useless "echo" rule for the already
existing objects.

Signed-off-by: Keith W. Campbell <[email protected]>
  • Loading branch information
keithc-ca committed Nov 13, 2023
1 parent 3a12f6a commit 9cf7484
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions omr_static_lib/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ endif

# Prepend the path to the library for relative paths.
# Absolute paths to object files must be left alone.
# MAKEFLAGS is cleared below because it might contain '-w' which seems to
# nullify the use of '--no-print-directory', or job-server context which
# yields warnings that should not be mixed into the 'show-objects' output.
OBJECTS := \
$(foreach lib,$(OMRLIBS), \
$(foreach object, \
$(shell $(MAKE) -s --no-print-directory -C $(lib) show-objects), \
$(shell MAKEFLAGS= $(MAKE) -s --no-print-directory -C $(lib) show-objects), \
$(if $(filter /%,$(object)),$(object),$(lib)/$(object))))

$(OBJECTS):
@echo $@

include $(top_srcdir)/omrmakefiles/rules.mk

0 comments on commit 9cf7484

Please sign in to comment.