Merge 3.15 branch into 7.0

Includes support for 'make inc'
This commit is contained in:
Andrew Johnson
2021-03-12 00:04:32 -06:00
9 changed files with 37 additions and 19 deletions

View File

@ -196,12 +196,12 @@ endif
#--------------------------------------------------------------- #---------------------------------------------------------------
# build dependancies, clean rule # build dependancies, clean rule
inc: $(COMMON_INC) $(INSTALL_INC) inc: $(COMMON_INC) $(INSTALL_INC) $(COMMON_DBDS) $(COMMON_DBDCATS) \
$(INSTALL_DBDS) $(INSTALL_DBD_INSTALLS)
build: $(COMMON_DBDS) $(COMMON_DBS) $(COMMON_DBDCATS) \ build: $(COMMON_DBS) $(INSTALL_DBS) \
$(INSTALL_DBDS) $(INSTALL_DBS) \
$(DBDDEPENDS_FILES) $(TARGETS) \ $(DBDDEPENDS_FILES) $(TARGETS) \
$(INSTALL_DB_INSTALLS) $(INSTALL_DBD_INSTALLS) $(INSTALL_DB_INSTALLS)
clean: db_clean clean: db_clean

View File

@ -103,17 +103,20 @@ include $(CONFIG)/RULES.Db
#--------------------------------------------------------------- #---------------------------------------------------------------
# Include defines and rules for prod, library and test* targets # Include defines and rules for prod, library and test* targets
#ifneq (,$(strip $(PROD) $(TESTPROD) $(LIBRARY) $(TESTLIBRARY) $(LOADABLE_LIBRARY) )) ifneq (,$(strip $(PROD) $(TESTPROD) $(LIBRARY) $(TESTLIBRARY) \
$(LOADABLE_LIBRARY)))
include $(CONFIG)/RULES_TARGET include $(CONFIG)/RULES_TARGET
#endif endif
#--------------------------------------------------------------- #---------------------------------------------------------------
# Read dependency files # Read dependency files
ifneq (inc,$(strip $(MAKECMDGOALS)))
ifneq (,$(strip $(HDEPENDS_FILES))) ifneq (,$(strip $(HDEPENDS_FILES)))
$(filter-out $(wildcard *$(DEP)), $(HDEPENDS_FILES)): | $(COMMON_INC) $(filter-out $(wildcard *$(DEP)), $(HDEPENDS_FILES)): | $(COMMON_INC)
-include $(HDEPENDS_FILES) -include $(HDEPENDS_FILES)
endif endif
endif
#--------------------------------------------------------------- #---------------------------------------------------------------
# Products and Object libraries # Products and Object libraries
@ -161,12 +164,13 @@ build: inc
build: $(OBJSNAME) $(LIBTARGETS) $(PRODTARGETS) $(TESTPRODTARGETS) \ build: $(OBJSNAME) $(LIBTARGETS) $(PRODTARGETS) $(TESTPRODTARGETS) \
$(TARGETS) $(TESTSCRIPTS) $(INSTALL_LIB_INSTALLS) $(TARGETS) $(TESTSCRIPTS) $(INSTALL_LIB_INSTALLS)
inc: $(COMMON_INC) $(INSTALL_INC) $(INSTALL_CONFIGS) inc: $(COMMON_INC) $(INSTALL_INC) $(INSTALL_CONFIGS) $(INSTALLS_CFG) \
$(INSTALL_HTMLS) $(INSTALLS_PERL_MODULES) $(INSTALL_SCRIPTS)
buildInstall: \ buildInstall: \
$(INSTALL_SCRIPTS) $(INSTALL_PROD) $(INSTALL_MUNCHS) \ $(INSTALL_PROD) $(INSTALL_MUNCHS) \
$(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) \ $(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) \
$(INSTALL_HTMLS) $(INSTALL_DOCS) \ $(INSTALL_DOCS) \
$(INSTALL_OBJS) \ $(INSTALL_OBJS) \
$(INSTALL_TEMPLATE) \ $(INSTALL_TEMPLATE) \
$(INSTALL_BIN_INSTALLS) $(INSTALL_BIN_INSTALLS)

View File

@ -21,7 +21,6 @@ $(foreach target, $(PROD) $(TESTPROD) $(LIBRARY) $(TESTLIBRARY) $(LOADABLE_LIBRA
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# This define block requires GNU make 3.81
define PROD_template define PROD_template
ifeq ($$(strip $$($(1)_OBJS) $$($(1)_SRCS) $$(PRODUCT_OBJS)),) ifeq ($$(strip $$($(1)_OBJS) $$($(1)_SRCS) $$(PRODUCT_OBJS)),)
$(1)_OBJS = $(1)$$(OBJ) $(1)_OBJS = $(1)$$(OBJ)

View File

@ -73,7 +73,7 @@ help:
@echo "Usage: gnumake [options] [target] ..." @echo "Usage: gnumake [options] [target] ..."
@echo "Targets supported by all Makefiles:" @echo "Targets supported by all Makefiles:"
@echo " all - Same as install (default rule)" @echo " all - Same as install (default rule)"
@echo " inc - Installs header files" @echo " inc - Installs header, dbd and html files"
@echo " build - Builds and installs all targets" @echo " build - Builds and installs all targets"
@echo " install - Builds and installs all targets" @echo " install - Builds and installs all targets"
@echo " buildInstall - Same as install (deprecated)" @echo " buildInstall - Same as install (deprecated)"

View File

@ -38,6 +38,7 @@ ifeq ($(wildcard $(PERL_h)),)
endif endif
endif endif
ifneq (inc,$(strip $(MAKECMDGOALS)))
ifeq ($(T_A),$(EPICS_HOST_ARCH)) # No cross-builds (wrong Perl!) ifeq ($(T_A),$(EPICS_HOST_ARCH)) # No cross-builds (wrong Perl!)
ifeq ($(strip $(XSUBPP)),) ifeq ($(strip $(XSUBPP)),)
$(warning Perl's xsubpp program was not found.) $(warning Perl's xsubpp program was not found.)
@ -62,6 +63,7 @@ endif
endif endif
endif endif
endif endif
endif
Cap5_SRCS = Cap5.xs Cap5_SRCS = Cap5.xs
Cap5_LIBS = ca Com Cap5_LIBS = ca Com

View File

@ -19,7 +19,10 @@ BPT_DBD += bptTypeJdegC.dbd
BPT_DBD += bptTypeJdegF.dbd BPT_DBD += bptTypeJdegF.dbd
BPT_DBD += bptTypeKdegC.dbd BPT_DBD += bptTypeKdegC.dbd
BPT_DBD += bptTypeKdegF.dbd BPT_DBD += bptTypeKdegF.dbd
ifneq (inc,$(strip $(MAKECMDGOALS)))
DBD += $(BPT_DBD) DBD += $(BPT_DBD)
endif
PROD_HOST += makeBpt PROD_HOST += makeBpt

View File

@ -301,11 +301,11 @@ static void makeSubstitutions(inputData * const inputPvt,
char *pstart; char *pstart;
char *pend; char *pend;
int cmdind=-1; int cmdind=-1;
int i; size_t i;
for (i = 0; i < NELEMENTS(cmdNames); i++) { for (i = 0; i < NELEMENTS(cmdNames); i++) {
if (strstr(command, cmdNames[i])) { if (strstr(command, cmdNames[i])) {
cmdind = i; cmdind = (int)i;
} }
} }
if (cmdind < 0) goto endcmd; if (cmdind < 0) goto endcmd;

View File

@ -13,11 +13,6 @@
extern "C" { extern "C" {
#endif #endif
/*
* epicsStrtod() for systems with broken strtod() routine
*/
LIBCOM_API double epicsStrtod(const char *str, char **endp);
/* /*
* Microsoft apparently added strto[u]ll() in VS2013 * Microsoft apparently added strto[u]ll() in VS2013
* Older compilers have these equivalents though * Older compilers have these equivalents though
@ -28,6 +23,19 @@ LIBCOM_API double epicsStrtod(const char *str, char **endp);
# define strtoull _strtoui64 # define strtoull _strtoui64
#endif #endif
/*
* strtod works in MSVC 1900 and mingw, use
* the OS version in those and our own otherwise
*/
#if (_MSC_VER < 1900) && !defined(_MINGW)
/*
* epicsStrtod() for systems with broken strtod() routine
*/
LIBCOM_API double epicsStrtod(const char *str, char **endp);
#else
# define epicsStrtod strtod
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -29,6 +29,8 @@
#include "yajl_encode.h" #include "yajl_encode.h"
#include "yajl_bytestack.h" #include "yajl_bytestack.h"
#include <epicsStdlib.h>
#ifndef LLONG_MAX #ifndef LLONG_MAX
#define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL #define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL
#define LLONG_MIN (-0x7FFFFFFFFFFFFFFFLL - 1) #define LLONG_MIN (-0x7FFFFFFFFFFFFFFFLL - 1)
@ -334,7 +336,7 @@ yajl_do_parse(yajl_handle hand, const unsigned char * jsonText,
yajl_buf_clear(hand->decodeBuf); yajl_buf_clear(hand->decodeBuf);
yajl_buf_append(hand->decodeBuf, buf, bufLen); yajl_buf_append(hand->decodeBuf, buf, bufLen);
buf = yajl_buf_data(hand->decodeBuf); buf = yajl_buf_data(hand->decodeBuf);
d = strtod((char *) buf, NULL); d = epicsStrtod((char *) buf, NULL);
if ((d == HUGE_VAL || d == -HUGE_VAL) && if ((d == HUGE_VAL || d == -HUGE_VAL) &&
errno == ERANGE) errno == ERANGE)
{ {