rename generated CONFIG_SITE to TOOLCHAIN
No longer generate CONFIG_SITE.Common.$(T_A), which should never be generated...
This commit is contained in:
@@ -5,8 +5,11 @@ include $(TOP)/configure/CONFIG
|
||||
# Directories to build, any order
|
||||
DIRS += configure
|
||||
|
||||
DIRS += setup
|
||||
setup_DEPEND_DIRS = configure
|
||||
|
||||
DIRS += src
|
||||
src_DEPEND_DIRS = configure
|
||||
src_DEPEND_DIRS = setup
|
||||
|
||||
DIRS += tools
|
||||
tools_DEPEND_DIRS = src
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
TOP=..
|
||||
|
||||
_PVXS_BOOTSTRAP = YES
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
CMAKE ?= cmake
|
||||
|
||||
@@ -25,5 +25,6 @@ include $(TOP)/configure/CONFIG_SITE
|
||||
ifdef T_A
|
||||
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
|
||||
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
-include $(TOP)/configure/O.$(T_A)/TOOLCHAIN
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
# auto-compute location of this file.
|
||||
# avoid need to standardize configure/RELEASE name
|
||||
_PVXS := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
|
||||
# we're appending so must be idempotent
|
||||
ifeq (,$(_PVXS_CONF_INCLUDED))
|
||||
_PVXS_CONF_INCLUDED := YES
|
||||
|
||||
ifdef T_A
|
||||
|
||||
# use custom libevent2 install prefix by:
|
||||
# setting LIBEVENT only for single arch build
|
||||
# setting LIBEVENT_$(T_A) for each arch
|
||||
# leave unset to use implicit system search path
|
||||
# NOTE: only needed if not present in default search paths
|
||||
LIBEVENT ?= $(LIBEVENT_$(T_A))
|
||||
|
||||
# default to bundled location if it exists
|
||||
LIBEVENT_$(T_A) ?= $(wildcard $(abspath $(_PVXS)/../bundle/usr/$(T_A)))
|
||||
|
||||
# apply to include search paths
|
||||
INCLUDES += $(if $(LIBEVENT),-I$(LIBEVENT)/include)
|
||||
|
||||
LIBEVENT_BUNDLE_LIBS += event_core
|
||||
LIBEVENT_BUNDLE_LIBS_POSIX_YES = event_pthreads
|
||||
LIBEVENT_BUNDLE_LIBS += $(LIBEVENT_BUNDLE_LIBS_POSIX_$(POSIX))
|
||||
|
||||
LIBEVENT_SYS_LIBS_WIN32 = bcrypt iphlpapi netapi32 ws2_32
|
||||
LIBEVENT_SYS_LIBS += $(LIBEVENT_SYS_LIBS_$(OS_CLASS))
|
||||
|
||||
LIBEVENT_BUNDLE_LDFLAGS_Darwin_NO = -Wl,-rpath,$(LIBEVENT)/lib
|
||||
LIBEVENT_BUNDLE_LDFLAGS += $(LIBEVENT_BUNDLE_LDFLAGS_$(OS_CLASS)_$(STATIC_BUILD))
|
||||
|
||||
event_core_DIR = $(LIBEVENT)/lib
|
||||
event_pthreads_DIR = $(LIBEVENT)/lib
|
||||
|
||||
endif # T_A
|
||||
|
||||
endif # _PVXS_CONF_INCLUDED
|
||||
|
||||
# logic continues in RULES_PVXS_MODULE
|
||||
+19
-7
@@ -1,22 +1,34 @@
|
||||
TOP=..
|
||||
|
||||
# step 1. Use -I... to test event-config.h
|
||||
# produce configure/O.$(T_A)/TOOLCHAIN
|
||||
# step 2 in setup/Makefile
|
||||
_PVXS_BOOTSTRAP = YES
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
# use custom libevent2 install prefix by:
|
||||
# setting LIBEVENT only for single arch build
|
||||
# setting LIBEVENT_$(T_A) for each arch
|
||||
# leave unset to use implicit system search path
|
||||
# NOTE: only needed if not present in default search paths
|
||||
LIBEVENT ?= $(LIBEVENT_$(T_A))
|
||||
LIBEVENT_$(T_A) ?= $(wildcard $(abspath $(TOP)/bundle/usr/$(T_A)))
|
||||
|
||||
INCLUDES += $(if $(LIBEVENT),-I$(LIBEVENT)/include)
|
||||
|
||||
TARGETS = $(CONFIG_TARGETS)
|
||||
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
|
||||
|
||||
CFG += CONFIG_PVXS_VERSION
|
||||
CFG += CONFIG_PVXS_MODULE
|
||||
CFG += RULES_PVXS_MODULE
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
ifdef T_A
|
||||
install: $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
|
||||
install: TOOLCHAIN
|
||||
|
||||
$(TOP)/configure/CONFIG_SITE.Common.$(T_A): toolchain.c
|
||||
$(PREPROCESS.cpp)
|
||||
|
||||
CLEANS += ../CONFIG_SITE.Common.$(T_A)
|
||||
TOOLCHAIN: toolchain.c
|
||||
$(CPP) $(CPPFLAGS) $(INCLUDES) ../toolchain.c > $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifdef _COMMENT_
|
||||
/* Compiler inspection
|
||||
*
|
||||
* expanded as configure/CONFIG_SITE.Common.*
|
||||
* expanded as configure/O.*/TOOLCHAIN
|
||||
*/
|
||||
/* GCC preprocessor drops C comments from output.
|
||||
* MSVC preprocessor emits C comments in output
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
# cfg/ sometimes isn't correctly included due to a Base bug
|
||||
# so we do here (maybe again) as workaround
|
||||
include $(TOP)/configure/CONFIG_PVXS_MODULE
|
||||
include $(TOP)/configure/CONFIG_PVXS_VERSION
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
@@ -35,7 +31,6 @@ rpc_client_SRCS += rpc_client.cpp
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
include $(TOP)/configure/RULES_PVXS_MODULE
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
# cfg/ sometimes isn't correctly included due to an issue in epics-base
|
||||
# so we do here (maybe again) as workaround
|
||||
include $(TOP)/configure/CONFIG_PVXS_MODULE
|
||||
include $(TOP)/configure/CONFIG_PVXS_VERSION
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
@@ -85,7 +81,6 @@ LIB_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
include $(TOP)/configure/RULES_PVXS_MODULE
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
# cfg/ sometimes isn't correctly included due to a Base bug
|
||||
# so we do here (maybe again) as workaround
|
||||
include $(TOP)/configure/CONFIG_PVXS_MODULE
|
||||
include $(TOP)/configure/CONFIG_PVXS_VERSION
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
@@ -31,7 +27,6 @@ FINAL_LOCATION ?= $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LOCATION))
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
include $(TOP)/configure/RULES_PVXS_MODULE
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# auto-compute location of this file.
|
||||
# avoid need to standardize configure/RELEASE name
|
||||
_PVXS := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
|
||||
# we're appending so must be idempotent
|
||||
ifeq (,$(_PVXS_CONF_INCLUDED))
|
||||
_PVXS_CONF_INCLUDED := YES
|
||||
|
||||
ifdef T_A
|
||||
|
||||
ifneq (YES,$(_PVXS_BOOTSTRAP))
|
||||
include $(_PVXS)/TOOLCHAIN_PVXS.$(T_A)
|
||||
endif
|
||||
|
||||
# from generated cfg/TOOLCHAIN_PVXS.$(T_A)
|
||||
LIBEVENT_PREFIX = $(LIBEVENT_PREFIX_$(T_A))
|
||||
LIBEVENT_BUNDLE_LIBS = $(LIBEVENT_BUNDLE_LIBS_$(T_A))
|
||||
LIBEVENT_SYS_LIBS = $(LIBEVENT_SYS_LIBS_$(T_A))
|
||||
|
||||
# apply to include search paths
|
||||
INCLUDES += $(if $(LIBEVENT_PREFIX),-I$(LIBEVENT_PREFIX)/include)
|
||||
|
||||
LIBEVENT_BUNDLE_LDFLAGS__RPATH=-Wl,-rpath,$(LIBEVENT_PREFIX)/lib
|
||||
LIBEVENT_BUNDLE_LDFLAGS_Darwin_NO = $(if $(LIBEVENT_PREFIX),$(LIBEVENT_BUNDLE_LDFLAGS__RPATH))
|
||||
LIBEVENT_BUNDLE_LDFLAGS += $(LIBEVENT_BUNDLE_LDFLAGS_$(OS_CLASS)_$(STATIC_BUILD))
|
||||
|
||||
event_core_DIR = $(LIBEVENT_PREFIX)/lib
|
||||
event_pthreads_DIR = $(LIBEVENT_PREFIX)/lib
|
||||
|
||||
endif # T_A
|
||||
|
||||
endif # _PVXS_CONF_INCLUDED
|
||||
|
||||
# logic continues in RULES_PVXS_MODULE
|
||||
@@ -0,0 +1,44 @@
|
||||
TOP=..
|
||||
|
||||
# step 1 in configure/Makefile
|
||||
# step 2. generate cfg/TOOLCHAIN_PVXS.$(T_A)
|
||||
# install cfg/*
|
||||
# remaining TOP directories will include generated files
|
||||
_PVXS_BOOTSTRAP = YES
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
LIBEVENT ?= $(LIBEVENT_$(T_A))
|
||||
LIBEVENT_$(T_A) ?= $(wildcard $(abspath $(TOP)/bundle/usr/$(T_A)))
|
||||
|
||||
_LIBEVENT_BUNDLE_LIBS += event_core
|
||||
|
||||
ifeq (WIN32,$(OS_CLASS))
|
||||
_LIBEVENT_SYS_LIBS += bcrypt iphlpapi netapi32 ws2_32
|
||||
else
|
||||
_LIBEVENT_BUNDLE_LIBS += event_pthreads
|
||||
endif
|
||||
|
||||
# at this point we have included the generated O.$(T_A)/TOOLCHAIN
|
||||
# and use this to generated CONFIG_PVXS_MODULE
|
||||
|
||||
CFG += CONFIG_PVXS_MODULE
|
||||
CFG += RULES_PVXS_MODULE
|
||||
|
||||
ifdef T_A
|
||||
CFG += TOOLCHAIN_PVXS.$(T_A)
|
||||
endif
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
ifdef T_A
|
||||
|
||||
EXPAND_ARGS = -a $(T_A) -t "$(INSTALL_LOCATION)"
|
||||
EXPAND_ARGS += "-DLIBEVENT=$(LIBEVENT)"
|
||||
EXPAND_ARGS += "-DLIBEVENT_BUNDLE_LIBS=$(_LIBEVENT_BUNDLE_LIBS)"
|
||||
EXPAND_ARGS += "-DLIBEVENT_SYS_LIBS=$(_LIBEVENT_SYS_LIBS)"
|
||||
|
||||
TOOLCHAIN_PVXS.$(T_A): ../TOOLCHAIN_PVXS.target@
|
||||
$(EXPAND_TOOL) $(EXPAND_ARGS) $< $@
|
||||
|
||||
endif
|
||||
@@ -11,7 +11,7 @@ endif
|
||||
|
||||
_PVXS_CHECK_VARS := PROD TESTPROD LIB $(PROD) $(TESTPROD) $(LIBRARY)
|
||||
|
||||
ifeq (,$(LIBEVENT))
|
||||
ifeq (,$(LIBEVENT_PREFIX))
|
||||
# libevent in default search path
|
||||
|
||||
# $(1) is PROD or LIBRARY name
|
||||
@@ -0,0 +1,3 @@
|
||||
LIBEVENT_PREFIX_@ARCH@ = @LIBEVENT@
|
||||
LIBEVENT_BUNDLE_LIBS_@ARCH@ = @LIBEVENT_BUNDLE_LIBS@
|
||||
LIBEVENT_SYS_LIBS_@ARCH@ = @LIBEVENT_SYS_LIBS@
|
||||
+2
-7
@@ -1,10 +1,6 @@
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
# cfg/ sometimes isn't correctly included due to a Base bug
|
||||
# so we do here (maybe again) as workaround
|
||||
include $(TOP)/configure/CONFIG_PVXS_MODULE
|
||||
include $(TOP)/configure/CONFIG_PVXS_VERSION
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
@@ -14,7 +10,7 @@ USR_CPPFLAGS += -DPVXS_ENABLE_EXPERT_API
|
||||
|
||||
ifdef T_A
|
||||
ifneq ($(CONFIG_LOADED),YES)
|
||||
$(error Toolchain inspection failed $(MAKEFILE_LIST))
|
||||
$(warning Toolchain inspection failed $(MAKEFILE_LIST))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -111,7 +107,7 @@ LIB_SRCS += clientdiscover.cpp
|
||||
LIB_LIBS += Com
|
||||
|
||||
# special case matching configure/RULES_PVXS_MODULE
|
||||
ifeq (,$(LIBEVENT))
|
||||
ifeq (,$(LIBEVENT_PREFIX))
|
||||
LIB_SYS_LIBS += $(LIBEVENT_BUNDLE_LIBS)
|
||||
else
|
||||
LIB_LIBS += $(LIBEVENT_BUNDLE_LIBS)
|
||||
@@ -122,7 +118,6 @@ LIB_SYS_LIBS += $(LIBEVENT_SYS_LIBS)
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
include $(TOP)/configure/RULES_PVXS_MODULE
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
# cfg/ sometimes isn't correctly included due to a Base bug
|
||||
# so we do here (maybe again) as workaround
|
||||
include $(TOP)/configure/CONFIG_PVXS_MODULE
|
||||
include $(TOP)/configure/CONFIG_PVXS_VERSION
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
@@ -191,7 +187,6 @@ endif
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
include $(TOP)/configure/RULES_PVXS_MODULE
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
# cfg/ sometimes isn't correctly included due to a Base bug
|
||||
# so we do here (maybe again) as workaround
|
||||
include $(TOP)/configure/CONFIG_PVXS_MODULE
|
||||
include $(TOP)/configure/CONFIG_PVXS_VERSION
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
@@ -41,7 +37,6 @@ pvxmshim_SRCS += mshim.cpp
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
include $(TOP)/configure/RULES_PVXS_MODULE
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user