[PATCH 30/42] DRVMGR: only build on SPARC platform

Daniel Hellstrom daniel at gaisler.com
Tue Apr 14 11:32:57 UTC 2015


---
 cpukit/Makefile.am           |    2 ++
 cpukit/configure.ac          |   12 ++++++++++++
 cpukit/libdrvmgr/Makefile.am |    4 ++++
 cpukit/preinstall.am         |    3 ++-
 4 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index faae9b2..c9a4e0f 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -240,10 +240,12 @@ include_rtems_HEADERS += libmisc/untar/untar.h
 include_rtems_HEADERS += libmisc/fsmount/fsmount.h
 
 ## Driver manager
+if LIBDRVMGR
 include_drvmgrdir = $(includedir)/drvmgr
 include_drvmgr_HEADERS = libdrvmgr/drvmgr.h
 include_drvmgr_HEADERS += libdrvmgr/drvmgr_confdefs.h
 include_drvmgr_HEADERS += libdrvmgr/drvmgr_list.h
+endif
 
 ## HACK: doxygen filter.
 EXTRA_DIST = doxy-filter
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 69319ad..2b432f6 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -427,6 +427,18 @@ esac
 AM_CONDITIONAL(LIBPCI,[test x"$HAVE_LIBPCI" = x"yes"])
 AC_MSG_RESULT([$HAVE_LIBPCI])
 
+# Filter libdrvmgr to only build for architectures that have support for it
+AC_MSG_CHECKING([whether CPU supports libdrvmgr])
+case $RTEMS_CPU in
+  sparc)
+   HAVE_LIBDRVMGR=yes ;;
+  *)
+   HAVE_LIBDRVMGR=no ;;
+esac
+AM_CONDITIONAL(LIBDRVMGR,[test x"$HAVE_LIBDRVMGR" = x"yes"])
+AC_MSG_RESULT([$HAVE_LIBDRVMGR])
+
+
 RTEMS_AMPOLISH3
 
 # Explicitly list all Makefiles here
diff --git a/cpukit/libdrvmgr/Makefile.am b/cpukit/libdrvmgr/Makefile.am
index 641c544..eb67221 100644
--- a/cpukit/libdrvmgr/Makefile.am
+++ b/cpukit/libdrvmgr/Makefile.am
@@ -1,5 +1,7 @@
 include $(top_srcdir)/automake/compile.am
 
+if LIBDRVMGR
+
 EXTRA_DIST=
 
 noinst_LIBRARIES = libdrvmgr.a
@@ -26,4 +28,6 @@ libdrvmgr_a_SOURCES += drvmgr_translate.c
 libdrvmgr_a_SOURCES += drvmgr_translate_check.c
 libdrvmgr_a_SOURCES += drvmgr_unregister.c
 
+endif
+
 include $(top_srcdir)/automake/local.am
diff --git a/cpukit/preinstall.am b/cpukit/preinstall.am
index 95d61ae..0758ec5 100644
--- a/cpukit/preinstall.am
+++ b/cpukit/preinstall.am
@@ -527,6 +527,7 @@ $(PROJECT_INCLUDE)/rtems/fsmount.h: libmisc/fsmount/fsmount.h $(PROJECT_INCLUDE)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/fsmount.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/fsmount.h
 
+if LIBDRVMGR
 $(PROJECT_INCLUDE)/drvmgr/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/drvmgr
 	@: > $(PROJECT_INCLUDE)/drvmgr/$(dirstamp)
@@ -543,4 +544,4 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE)/drvmgr/drvmgr_confdefs.h
 $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h: libdrvmgr/drvmgr_list.h $(PROJECT_INCLUDE)/drvmgr/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h
-
+endif
-- 
1.7.0.4




More information about the devel mailing list