Commit f29d9a23 authored by Vaibhav Gupta's avatar Vaibhav Gupta Committed by Federico Vaga

Rename variable 'LINUX' to 'KERNELSRC'

Variable name 'LINUX' is very ambiguous for its purpose in the makefile.
Also, this project builds as a part of COHT project which uses another
variable name 'KERNELSRC' for the same purpose. Hence, this change makes
this project uniform with others.
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent 2aac4dee
......@@ -35,7 +35,7 @@ build:
stage: build
script:
- yum install -y kernel-devel
- LINUX=/usr/src/kernels/*/ make modules
- KERNELSRC=/usr/src/kernels/*/ make modules
build_dkms_rpm:
stage: dkms
......@@ -47,7 +47,7 @@ build_srpm:
stage: srpm
script:
- yum-builddep -y ${DIST_PATH}/*.spec
- LINUX=/usr/src/kernels/*/ make -C distribution srpm
- KERNELSRC=/usr/src/kernels/*/ make -C distribution srpm
artifacts:
paths:
- distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
......
......@@ -7,7 +7,7 @@
# REPO_PARENT ?=
# -include $(REPO_PARENT)/parent_common.mk
LINUX ?= /lib/modules/$(shell uname -r)/build
KERNELSRC ?= /lib/modules/$(shell uname -r)/build
SPHINXOPTS = -Drelease=$(shell git describe) -Dversion=$(shell git describe | cut -d "-" -f 1 | tr -d "v")
SPHINXBUILD ?= sphinx-build
......@@ -23,4 +23,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
LINUX=$(LINUX) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
KERNELSRC=$(KERNELSRC) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
......@@ -16,9 +16,9 @@ import sphinx
# the Docs). In a normal build, these are supplied from the Makefile via command
# line arguments.
linux = os.getenv("LINUX", None)
linux = os.getenv("KERNELSRC", None)
if linux is None:
raise Exception("Missing LINUX environment variable")
raise Exception("Missing KERNELSRC environment variable")
kerneldoc_bin = os.path.join(linux, 'scripts/kernel-doc')
kerneldoc_srctree = '../../'
......
......@@ -8,13 +8,13 @@
REPO_PARENT ?= $(shell /bin/pwd)/../..
-include $(REPO_PARENT)/parent_common.mk
LINUX ?= /lib/modules/$(shell uname -r)/build
KERNELSRC ?= /lib/modules/$(shell uname -r)/build
export CONFIG_FMC=m
all: modules
clean modules help modules_install coccicheck:
make -C $(LINUX) M=$(shell pwd) $@
make -C $(KERNELSRC) M=$(shell pwd) $@
.PHONY: all modules clean help install modules_install
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment