From b386e0ff28966f1cb8f597b6f23061362c1dbd0e Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 10 Dec 2013 21:42:37 -0500 Subject: [PATCH] support configs for several python versions --- configure/CONFIG_PY | 20 ++++++++++++++------ configure/CONFIG_SITE | 5 ++++- configure/Makefile | 9 +++++++-- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/configure/CONFIG_PY b/configure/CONFIG_PY index 28ddd73..5e2ea78 100644 --- a/configure/CONFIG_PY +++ b/configure/CONFIG_PY @@ -1,13 +1,21 @@ -PYMODULE ?= YES - ifneq ($(T_A),) --include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY.$(EPICS_HOST_ARCH).Common --include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY.Common.$(T_A) --include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY.$(EPICS_HOST_ARCH).$(T_A) +PYMODULE ?= YES + +ifeq ($(PY_VER),) +$(error Must set PY_VER to select a python version) +endif + +-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY$(PY_VER).$(EPICS_HOST_ARCH).Common +-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY$(PY_VER).Common.$(T_A) +-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY$(PY_VER).$(EPICS_HOST_ARCH).$(T_A) + +-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY$(PY_VER).$(EPICS_HOST_ARCH).Common +-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY$(PY_VER).Common.$(T_A) +-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY$(PY_VER).$(EPICS_HOST_ARCH).$(T_A) ifneq ($(PY_OK),YES) -$(error Unable to get generated python configuration) +$(error No usable configuration for python$(PY_VER)) endif PYTHON ?= python$(PY_VER) diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index c0b8e32..ac4c4df 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -32,6 +32,9 @@ CHECK_RELEASE = YES # take effect. #IOCS_APPL_TOP = +# Default python version. +PY_VER=2.7 + # Module will be build against this version of the # Python interpreter -PYTHON ?= python +#PYTHON = python$(PY_VER) diff --git a/configure/Makefile b/configure/Makefile index ed7d3f2..8739a0e 100644 --- a/configure/Makefile +++ b/configure/Makefile @@ -2,15 +2,20 @@ TOP=.. include $(TOP)/configure/CONFIG +ifeq ($(PY_VER),) +$(error Must set PY_VER to select a python version) +endif +PYTHON ?= python$(PY_VER) + TARGETS = $(CONFIG_TARGETS) ifdef T_A -CONFIGS = CONFIG_PY RULES_PY os/CONFIG_PY.Common.$(T_A) +CONFIGS = CONFIG_PY RULES_PY os/CONFIG_PY$(PY_VER).Common.$(T_A) endif include $(TOP)/configure/RULES -os/CONFIG_PY.Common.%: $(TOP)/makehelper.py +os/CONFIG_PY$(PY_VER).Common.$(T_A): $(TOP)/makehelper.py [ -d $(dir $@) ] || $(MKDIR) $(dir $@) $(PYTHON) $< $@