diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 5ac123e..99b355f 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -18,3 +18,9 @@ CROSS_COMPILER_TARGET_ARCHS = # Extensions don't normally build shared libraries SHARED_LIBRARIES = NO +# These allow developers to override the CONFIG_SITE variable +# settings without having to modify the configure/CONFIG_SITE +# file itself. +-include $(TOP)/../CONFIG_SITE.local +-include $(TOP)/configure/CONFIG_SITE.local + diff --git a/configure/RELEASE b/configure/RELEASE index 9363e55..6f29558 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -23,3 +23,11 @@ EPICS_BASE=$(TOP)/../base EPICS_EXTENSIONS=$(TOP) OAG_APPS=$(TOP)/../../oag/apps + + + +# These allow developers to override the RELEASE variable settings +# without having to modify the configure/RELEASE file itself. +-include $(TOP)/../RELEASE.local +-include $(TOP)/configure/RELEASE.local + diff --git a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 index 8179885..31730b9 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 +++ b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 @@ -43,6 +43,21 @@ SCIPLOT=YES #MOTIF_LIB=/usr/lib #MOTIF_INC=/usr/include +LINUX_DISTRO = $(shell sh -c '$(TOP)/epicsextfinddist.sh || echo PWD=$$PWD TOP=$(TOP)') + +ifeq ($(shell expr "$(LINUX_DISTRO)" : 'Debian[89]'),7) + X11_LIB=/usr/lib/x86_64-linux-gnu/ + X11_INC=/usr/include + MOTIF_LIB=/usr/lib/x86_64-linux-gnu + MOTIF_INC=/usr/include +endif + +build: echolinuxdistro + +echolinuxdistro: + @echo Info from CONFIG_SITE.linux-x86_64.linux-x86_64: LINUX_DISTRO=$(LINUX_DISTRO) + + # Ubuntu 12 64-bit is at Python 2.6 #PYTHON_DIR=/usr/lib/python2.6 #PYTHON_INCLUDE=/usr/include/python2.6 diff --git a/epicsextfinddist.sh b/epicsextfinddist.sh new file mode 100755 index 0000000..7022ebf --- /dev/null +++ b/epicsextfinddist.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# Find out the Linux distribution +# Ideas stolen from here: +# https://github.com/jeonghanlee/pkg_automation/blob/master/pkg_automation.bash + +if [ -x /usr/bin/lsb_release ] ; then + dist_id=$(lsb_release -is) + dist_cn=$(lsb_release -cs) + dist_rs=$(lsb_release -rs) + tmpdist=$dist_id${dist_cn}${dist_rs} +elif [ -r /usr/bin/lsb_release ] ; then + eval $(grep "^ID=" /etc/os-release) + eval $(grep "^VERSION_ID=" /etc/os-release) + tmpdist=$ID$VERSION_ID +else + tmpdist=Unknown +fi + +case "$tmpdist" in + [dD]ebian*8*) + echo Debian8 + ;; + [dD]ebian*9*) + echo Debian9 + ;; + Raspbian*8*) + echo Raspbian8 + ;; + Raspbian*9*) + echo Raspbian9 + ;; + *) + echo Unsupported $tmpdist + ;; +esac