From 7a195d924abda00ec439b82ba21857e3113ede83 Mon Sep 17 00:00:00 2001
From: Tim Wickberg <tim@schedmd.com>
Date: Thu, 3 Jan 2019 23:36:01 -0700
Subject: [PATCH] Only build task/affinity on supported platforms.

---
 src/plugins/task/Makefile.am | 6 +++++-
 src/plugins/task/Makefile.in | 5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/plugins/task/Makefile.am b/src/plugins/task/Makefile.am
index 49a4e426e39..d40702f5b22 100644
--- a/src/plugins/task/Makefile.am
+++ b/src/plugins/task/Makefile.am
@@ -1,3 +1,7 @@
 # Makefile for task plugins
 
-SUBDIRS = affinity none cgroup cray
+SUBDIRS = cgroup cray none
+
+if HAVE_SCHED_SETAFFINITY
+SUBDIRS += affinity
+endif
diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in
index 9d73d02e2e3..d857724a546 100644
--- a/src/plugins/task/Makefile.in
+++ b/src/plugins/task/Makefile.in
@@ -90,6 +90,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+@HAVE_SCHED_SETAFFINITY_TRUE@am__append_1 = affinity
 subdir = src/plugins/task
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/auxdir/ax_check_compile_flag.m4 \
@@ -199,7 +200,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = cgroup cray none affinity
 am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
@@ -479,7 +480,7 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = affinity none cgroup cray
+SUBDIRS = cgroup cray none $(am__append_1)
 all: all-recursive
 
 .SUFFIXES:
-- 
GitLab