Skip to content

redhat: version two of Makefile.rhelver tweaks

Clark Williams requested to merge clrkwllms/kernel-ark:os-build-rhelver into os-build

The upstream commit 67d7c302 introduced a failure to include the file Makefile.rhelver when using the O= mechanism to place object files and compiler output in a different directory from the source tree. The commit removes the behavior where anything pulled in from a makefile 'include' directive is searched for in multiple places (among other things).

The first attempt at fixing this was to move the include to a point where the variable 'abs_srctree' is defined and then use that to include $(abs_srctree)/Makefile.rhelver. This worked for some of the Makefile components but caused problems when building things in the scripts directory (specifically scripts/mod/modpost.c) due to the RHEL_MAJOR and RHEL_MINOR variables not being defined.

This commit moves the include back to it's original position in Makefile, but detects if the object file directory is different from the source directory and includes from the appropriate path.

Signed-off-by: Clark Williams williams@redhat.com

Merge request reports