Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions configure/CONFIG_SITE
Original file line number Diff line number Diff line change
Expand Up @@ -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

8 changes: 8 additions & 0 deletions configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -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

15 changes: 15 additions & 0 deletions configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 35 additions & 0 deletions epicsextfinddist.sh
Original file line number Diff line number Diff line change
@@ -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