[OS-BUILD PATCHv3 1/24] redhat/koji/Makefile: Decouple koji Makefile from Makefile.common

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/koji/Makefile: Decouple koji Makefile from Makefile.common

The koji Makefile uses the GIT and PACKAGE_NAME variables which are
currently defined in Makefile.common.  Since these are configurable by a
user they should actually be defined in Makefile.variables.

Move GIT and PACKAGE_NAME to Makefile.variables, and decouple
Makefile.common from the koji Makefile.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index blahblah..blahblah 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -1,8 +1,7 @@
-GIT ?= git
+include Makefile.variables
 TOPDIR:=$(shell $(GIT) rev-parse --show-toplevel)
 REDHAT:=$(TOPDIR)/redhat
 include $(TOPDIR)/Makefile.rhelver
-include $(REDHAT)/Makefile.variables
 
 RPMBUILD := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
                    else echo rpm; fi)
@@ -100,7 +99,6 @@ KVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)
 RPMVERSION:=$(KVERSION)
 
 BUILD:=$(RHEL_RELEASE)
-PACKAGE_NAME:=kernel
 SPECFILE:=$(PACKAGE_NAME).spec
 RPM:=$(REDHAT)/rpm
 SRPMS:=$(RPM)/SRPMS
diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables
index blahblah..blahblah 100644
--- a/redhat/Makefile.variables
+++ b/redhat/Makefile.variables
@@ -51,3 +51,12 @@ INCLUDE_RHEL_FILES:=1
 # value of PATCHLIST_URL in this case should point to the git repository where
 # the commits are located, and will be added as a prefix to the shas listed.
 PATCHLIST_URL ?= "https://gitlab.com/cki-project/kernel-ark/-/commit";
+
+# This can be used to change the filename of the specfile.  For example, it can
+# be set to "kernel" for kernel.spec or "kernel-rt" for kernel-rt.spec.  This
+# is useful for other projects with different specfile names.
+PACKAGE_NAME ?= kernel
+
+# This is the executable for 'git' commands.  It is used by the redhat/self-test
+# tests to provide testing information on git hashes (see redhat/self-test/egit.sh)
+GIT ?= git
diff --git a/redhat/koji/Makefile b/redhat/koji/Makefile
index blahblah..blahblah 100644
--- a/redhat/koji/Makefile
+++ b/redhat/koji/Makefile
@@ -17,7 +17,7 @@
 #	  set it with - git notes --ref buildid -m ".buildid" HEAD
 ######################################################################
 
-include ../Makefile.common
+include ../Makefile.variables
 
 notes:
 	$(GIT) fetch --force origin refs/notes/*:refs/notes/*

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1641
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux