From ed2a67b9fd504298e8f312e3d475236916904577 Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Fri, 20 May 2022 11:51:20 +0200
Subject: [PATCH] [sysdep/pal-distro.mk] remove obsolete file

Affected packages:
- wip/pal-hardware-interfaces
- wip/py-roscontrol-sot
- wip/talos-metapkg-ros-control-sot
- wip/talos-simulation
- wip/tiago-metapkg-ros-control-sot
---
 pal-hardware-interfaces/Makefile       | 12 ++---------
 py-roscontrol-sot/Makefile             | 19 +++++------------
 sysdep/pal-distro.mk                   | 29 --------------------------
 talos-metapkg-ros-control-sot/Makefile | 22 ++-----------------
 talos-simulation/Makefile              | 12 ++---------
 tiago-metapkg-ros-control-sot/Makefile | 22 ++-----------------
 6 files changed, 13 insertions(+), 103 deletions(-)
 delete mode 100644 sysdep/pal-distro.mk

diff --git a/pal-hardware-interfaces/Makefile b/pal-hardware-interfaces/Makefile
index 34ca4538..846e755d 100644
--- a/pal-hardware-interfaces/Makefile
+++ b/pal-hardware-interfaces/Makefile
@@ -23,16 +23,8 @@ LICENSE=		gnu-lgpl-v3
 
 USE_BOOST_LIBS=		thread
 
-include ../../wip/sysdep/pal-distro.mk
-
-# PREFER.pal-distro gives the user the choice to compile
-# over PAL packages or not.
-ifeq (erbium,${PREFER.pal-distro})
-  ifeq (palerbium,${PALDISTRO})
-    CMAKE_PREFIX_PATH+=/opt/pal/erbium
-  else
-    include ../../wip/py-prf-ros-control/depend.mk
-  endif
+ifeq (16.04.pal,${OS_VERSION})
+  CMAKE_PREFIX_PATH+=/opt/pal/erbium
 else
   include ../../wip/py-prf-ros-control/depend.mk
 endif
diff --git a/py-roscontrol-sot/Makefile b/py-roscontrol-sot/Makefile
index 59fa3d5e..cf6caa0f 100644
--- a/py-roscontrol-sot/Makefile
+++ b/py-roscontrol-sot/Makefile
@@ -48,28 +48,19 @@ include ../../wip/sot-core-v3/depend.mk
 include ../../wip/sot-dynamic-pinocchio-v3/depend.mk
 include ../../math/pinocchio/depend.mk
 include ../../mk/robotpkg.prefs.mk
-include ../../wip/sysdep/pal-distro.mk
 include ../../wip/pal-msgs/depend.mk
 
-include ../../wip/sysdep/pal-distro.mk
-ifeq (erbium,${PREFER.pal-distro})
-  ifeq (palerbium,${PALDISTRO})
-    CMAKE_PREFIX_PATH+=/opt/pal/erbium
-    SYSTEM_PREFIX+=/opt/pal/erbium
-    CXXFLAGS+="-I/opt/pal/erbium/include"
-    PKG_CONFIG_DIRS=/opt/pal/erbium/lib/pkgconfig
-  else
-    include ../../wip/pal-hardware-interfaces/depend.mk
-    include ../../wip/py-prf-ros-control/depend.mk
-    include ../../wip/py-prf-ros-controllers/depend.mk
-  endif
+ifeq (16.04.pal,${OS_VERSION})
+  CMAKE_PREFIX_PATH+=/opt/pal/erbium
+  SYSTEM_PREFIX+=/opt/pal/erbium
+  CXXFLAGS+="-I/opt/pal/erbium/include"
+  PKG_CONFIG_DIRS=/opt/pal/erbium/lib/pkgconfig
 else
   include ../../wip/pal-hardware-interfaces/depend.mk
   include ../../wip/py-prf-ros-control/depend.mk
   include ../../wip/py-prf-ros-controllers/depend.mk
 endif
 
-
 include ../../devel/ros-roscpp-core/depend.mk
 include ../../devel/ros-catkin/depend.mk
 include ../../pkgtools/pkg-config/depend.mk
diff --git a/sysdep/pal-distro.mk b/sysdep/pal-distro.mk
deleted file mode 100644
index 5484e8b9..00000000
--- a/sysdep/pal-distro.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# robotpkg wip/pal-erbium
-# Created:			Olivier Stasse on Mon 11 2018
-#
-ifndef _paldistro_mk
-  _paldistro_mk:=defined
-  WIP_DIR:=$(shell dirname $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))))
-  _paldistro:=$(shell ${SHELL} ${WIP_DIR}/sysdep/pal-distro.sh)
-  export PALDISTRO:=  $(word 1,${_paldistro})
-
-  ifeq (ferrum,${PREFER.pal-distro})
-     ifeq (palferrum,${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 #Ferrum
-
-  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  # ERBIUM_ROS_FLAVOR
-endif
diff --git a/talos-metapkg-ros-control-sot/Makefile b/talos-metapkg-ros-control-sot/Makefile
index abb5a717..049c979c 100644
--- a/talos-metapkg-ros-control-sot/Makefile
+++ b/talos-metapkg-ros-control-sot/Makefile
@@ -39,30 +39,12 @@ include ../../middleware/ros-actionlib/depend.mk
 include ../../middleware/ros-comm/depend.mk
 include ../../wip/py-dynamic-graph-bridge-v3/depend.mk
 
-include ../../wip/sysdep/pal-distro.mk
-
-ifeq (erbium,${PREFER.pal-distro})
-  ifeq (palerbium,${PALDISTRO})
-    CMAKE_PREFIX_PATH+=/opt/pal/erbium
-  else
-    include ../../wip/pal-hardware-interfaces/depend.mk
-    include ../../wip/py-prf-ros-controllers/depend.mk
-    include ../../motion/ros-control-toolbox/depend.mk
-  endif
-
-displaytalosmetapkg:
-	echo 'PREFER.pal-distro:${PREFER.pal-distro}'
-	echo 'pal-distro-erbium'
-
+ifeq (16.04.pal,${OS_VERSION})
+  CMAKE_PREFIX_PATH+=/opt/pal/erbium
 else
   include ../../wip/pal-hardware-interfaces/depend.mk
   include ../../wip/py-prf-ros-controllers/depend.mk
   include ../../motion/ros-control-toolbox/depend.mk
-
-displaytalosmetapkg:
-	echo 'PREFER.pal-distro:${PREFER.pal-distro}'
-	echo 'pal-distro-xenial'
-
 endif
 
 include ../../wip/py-roscontrol-sot/depend.mk
diff --git a/talos-simulation/Makefile b/talos-simulation/Makefile
index 1899b941..69a2f34a 100644
--- a/talos-simulation/Makefile
+++ b/talos-simulation/Makefile
@@ -36,16 +36,8 @@ include ../../math/ros-geometry/depend.mk
 include ../../middleware/ros-actionlib/depend.mk
 include ../../middleware/ros-comm/depend.mk
 
-# Check if we on a pal distro
-include ../../wip/sysdep/pal-distro.mk
-
-# PREFER.pal-distro gives the user the choice to compile
-# over PAL packages or not.
-ifeq (erbium,${PREFER.pal-distro})
-  ifeq (palerbium,${PALDISTRO})
-     # If yes then it does not make sense to continue
-     $(error "talos-simulation is useless on PAL erbium.")
-  endif
+ifeq (16.04.pal,${OS_VERSION})
+   $(error "talos-simulation is useless on PAL erbium.")
 endif
 
 
diff --git a/tiago-metapkg-ros-control-sot/Makefile b/tiago-metapkg-ros-control-sot/Makefile
index ddd99b45..5b8b3a2c 100644
--- a/tiago-metapkg-ros-control-sot/Makefile
+++ b/tiago-metapkg-ros-control-sot/Makefile
@@ -35,30 +35,12 @@ include ../../middleware/ros-actionlib/depend.mk
 include ../../middleware/ros-comm/depend.mk
 include ../../wip/py-dynamic-graph-bridge-v3/depend.mk
 
-include ../../wip/sysdep/pal-distro.mk
-
-ifeq (erbium,${PREFER.pal-distro})
-  ifeq (palerbium,${PALDISTRO})
-    CMAKE_PREFIX_PATH+=/opt/pal/erbium
-  else
-    include ../../wip/pal-hardware-interfaces/depend.mk
-    include ../../wip/py-prf-ros-controllers/depend.mk
-    include ../../motion/ros-control-toolbox/depend.mk
-  endif
-
-displaytiagometapkg:
-	echo 'PREFER.pal-distro:${PREFER.pal-distro}'
-	echo 'pal-distro-erbium'
-
+ifeq (16.04.pal,${OS_VERSION})
+  CMAKE_PREFIX_PATH+=/opt/pal/erbium
 else
   include ../../wip/pal-hardware-interfaces/depend.mk
   include ../../wip/py-prf-ros-controllers/depend.mk
   include ../../motion/ros-control-toolbox/depend.mk
-
-displaytiagometapkg:
-	echo 'PREFER.pal-distro:${PREFER.pal-distro}'
-	echo 'pal-distro-xenial'
-
 endif
 
 include ../../wip/py-roscontrol-sot/depend.mk
-- 
GitLab