From: Don Zickus <[email protected]>

Simplify include Makefile.rhelver

The current problem with where the include Makefile.rhelver is, is that
it is used before any of the standard definitions are defined.  This
makes it challenging to use stock methods and instead use kludgy ifneq
definitions.

There is no real reason to have the include this high in the Makefile.
It was just a legacy place that didn't change much thus minimizing merge
conflicts.

Let's move the 'include' later in the file _after_ the definitions and
in a place that is surrounded by code that haven't changed in 20 years.

This allows us to use expected definitions that hopefully make things
more future proof.

This change will be later rolled into ark-infra.

Signed-off-by: Don Zickus <[email protected]>

diff --git a/Makefile b/Makefile
index blahblah..blahblah 100644
--- a/Makefile
+++ b/Makefile
@@ -22,18 +22,6 @@ $(if $(filter __%, $(MAKECMDGOALS)), \
 PHONY := __all
 __all:
 
-# Set RHEL variables
-# Note that this ifdef'ery is required to handle when building with
-# the O= mechanism (relocate the object file results) due to upstream
-# commit 67d7c302 which broke our RHEL include file
-ifneq ($(realpath source),)
-include $(realpath source)/Makefile.rhelver
-else
-ifneq ($(realpath Makefile.rhelver),)
-include Makefile.rhelver
-endif
-endif
-
 # We are using a recursive build, so we need to do a little thinking
 # to get the ordering right.
 #
@@ -1321,6 +1309,8 @@ uapi-asm-generic:
 # Generate some files
 # ---------------------------------------------------------------------------
 
+include $(srctree)/Makefile.rhelver
+
 # KERNELRELEASE can change from a few different places, meaning version.h
 # needs to be updated, so this check is forced on all builds
 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3961

-- 
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to