From f317ad2fe4e8fcd54c85adac79d24201e3b6abbc Mon Sep 17 00:00:00 2001
From: Olivier Stasse <ostasse@laas.fr>
Date: Mon, 1 Apr 2019 00:05:27 +0200
Subject: [PATCH] [wip/sysdep/pal-distro.mk] Change CMAKE_PATH only if the user
 ask for it.

---
 sysdep/pal-distro.mk | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sysdep/pal-distro.mk b/sysdep/pal-distro.mk
index ac4d2277..4ba7d4b4 100644
--- a/sysdep/pal-distro.mk
+++ b/sysdep/pal-distro.mk
@@ -6,12 +6,13 @@ ifndef _paldistro_mk
   _paldistro:=$(shell ${SHELL} ${ROBOTPKG_DIR}/wip/sysdep/pal-distro.sh)
   export PALDISTRO:=  $(word 1,${_paldistro})
 
-  ifeq (palerbium,${PALDISTRO})
-     ifeq (yes,$(call exists,${ROBOTPKG_DIR}/wip/sysdep/platform/${PALDISTRO}.mk))
-	include ${ROBOTPKG_DIR}/wip/sysdep/platform/${PALDISTRO}.mk
-     else
-        $(error missing wip/sysdep/platform/${PALDISTRO}.mk)
+  ifeq (erbium,${PREFER.pal-distro})	
+     ifeq (palerbium,${PALDISTRO})
+        ifeq (yes,$(call exists,${ROBOTPKG_DIR}/wip/sysdep/platform/${PALDISTRO}.mk))
+	   include ${ROBOTPKG_DIR}/wip/sysdep/platform/${PALDISTRO}.mk
+        else
+           $(error missing wip/sysdep/platform/${PALDISTRO}.mk)
+        endif
      endif
   endif
-
 endif # ERBIUM_ROS_FLAVOR
-- 
GitLab