aboutsummarylogtreecommitdiffstats
path: root/patch_Makefile.patch
blob: e8f0a2c30d344336fe02f278669f0580a6b1169e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- ./Makefile.orig	2019-08-03 13:16:07.119970095 +0000
+++ ./Makefile	2019-08-03 13:24:43.649956177 +0000
@@ -4,6 +4,12 @@
 ifneq (,$(RHEL_MAJOR))
 OS_NAME = "rhel"
 OS_VERSION = "$(RHEL_MAJOR).$(RHEL_MINOR)"
+else ifneq (,$(wildcard /etc/arch-release))
+OS_NAME = "arch"
+OS_VERSION = "rolling"
+else ifneq (,$(wildcard /etc/artix-release))
+OS_NAME = "arch"
+OS_VERSION = "rolling"
 else ifneq (,$(wildcard /etc/os-release))
 OS_NAME = "$(shell sed -n 's/^ID=\(.*\)/\1/p' /etc/os-release | tr -d '\"')"
 # On CentOS/RHEL, users could have installed a kernel not distributed from RHEL
@@ -22,7 +28,7 @@
 OS_VERSION = "0.0"
 endif
 
-ifneq ($(findstring $(OS_NAME), "ubuntu" "sled" "sles" "opensuse" "opensuse-leap" "amzn" "custom-rhel"),)
+ifneq ($(findstring $(OS_NAME), "ubuntu" "sled" "sles" "opensuse" "opensuse-leap" "amzn" "custom-rhel" "arch"),)
 DRM_VER=$(shell sed -n 's/^VERSION = \(.*\)/\1/p' $(kdir)/Makefile)
 DRM_PATCH=$(shell sed -n 's/^PATCHLEVEL = \(.*\)/\1/p' $(kdir)/Makefile)
 else ifeq ("debian", $(OS_NAME))
@@ -60,6 +66,8 @@
 subdir-ccflags-y += -DOS_NAME_AMZ
 else ifeq ("debian",$(OS_NAME))
 subdir-ccflags-y += -DOS_NAME_DEBIAN
+else ifeq ("arch",$(OS_NAME))
+subdir-ccflags-y += -DOS_NAME_ARCH
 else
 subdir-ccflags-y += -DOS_NAME_UNKNOWN
 endif