From 88ae947c84b5125778db04ffbca9b69988e75ce2 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 13 Dec 2013 16:04:01 -0600 Subject: [PATCH] configure: Refined how/when we pull in /cfg files Only read CONFIG* and RULES* files, and only do so in build dirs, i.e. when T_A is defined. --- configure/CONFIG | 35 +++++--------------------------- configure/CONFIG_FILE_TYPE | 33 +++++++++++++++--------------- configure/RULES_FILE_TYPE | 14 ++++++------- documentation/RELEASE_NOTES.html | 15 +++++++++++++- 4 files changed, 42 insertions(+), 55 deletions(-) diff --git a/configure/CONFIG b/configure/CONFIG index 1b3664bfd..4f20c7d52 100644 --- a/configure/CONFIG +++ b/configure/CONFIG @@ -1,17 +1,13 @@ #************************************************************************* -# Copyright (c) 2002 The University of Chicago, as Operator of Argonne +# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in the file LICENSE that is included with this distribution. #************************************************************************* # # $Revision-Id$ -# -# The developer may edit this file. -# assume T_A is the host arch if not specified # # Common build definitions @@ -89,8 +85,6 @@ endif -include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A) -include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A) -endif - # Include /cfg/CONFIG* definitions from tops defined in RELEASE* files # ifneq ($(CONFIG),$(TOP)/configure) @@ -103,12 +97,12 @@ endif # Include $(INSTALL_CFG)/CONFIG* definitions # -ifndef T_A TOP_CFG_CONFIGS = $(wildcard $(INSTALL_CFG)/CONFIG*) ifneq ($(TOP_CFG_CONFIGS),) include $(TOP_CFG_CONFIGS) endif -endif + +endif # ifdef T_A # User specific definitions # @@ -119,22 +113,3 @@ ifdef T_A -include $(HOME)/configure/CONFIG_USER.$(EPICS_HOST_ARCH).$(T_A) endif -# All options -# may be overridden here. -# -# EXAMPLES -# -------- -# Build client objects statically ? must be either YES or NO -#STATIC_BUILD=NO -# Host build optimization, must be either YES or NO -#HOST_OPT=YES -# Cross build optimization, must be either YES or NO -#CROSS_OPT=YES -# Generate Verbose Compiler Warnings for host build, must be either YES or NO -#HOST_WARN=YES -# Generate Verbose Compiler Warnings for cross compile builds, must be either YES or NO -#CROSS_WARN=YES -#etc. - -#CROSS_COMPILER_TARGET_ARCHS=vxWorks-68040 - diff --git a/configure/CONFIG_FILE_TYPE b/configure/CONFIG_FILE_TYPE index 3fc6a9d93..0501e1949 100644 --- a/configure/CONFIG_FILE_TYPE +++ b/configure/CONFIG_FILE_TYPE @@ -1,10 +1,10 @@ #************************************************************************* -# Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne +# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # EPICS BASE is distributed subject to a Software License Agreement found -# in the file LICENSE that is included with this distribution. +# in the file LICENSE that is included with this distribution. #************************************************************************* # $Revision-Id$ # @@ -12,7 +12,7 @@ # # -------------------------------------------------------------- -# Module developers can now define a new type of file, e.g. ABC, +# Module developers can now define a new type of file, e.g. ABC, # so that files of type ABC will be installed into a directory # defined by INSTALL_ABC. This is done by creating a new CONFIG # file, e.g. CONFIG_ABC, with the following lines: @@ -24,8 +24,14 @@ # $(INSTALL_LOCATION). The file type ABC should be target # architecture independent (alh files, medm files, edm files). # -# Optional rules necessary for files of type ABC should be put in -# a RULES_ABC file. +# Files of type ABC are then installed into the INSTALL_ABC +# directory by adding a line like the following to a Makefile. +# +# ABC += +# +# Rules necessary to create files of type ABC should be put in +# a RULES_ABC file. Variables used by those rules should appear +# in a CONFIG_ABC file. # # The module developer installs new CONFIG* or RULES* files # into the directory $(INSTALL_LOCATION)/cfg by including the @@ -33,16 +39,11 @@ # # CFG += CONFIG_ABC RULES_ABC # -# Files of type ABC are installed into INSTALL_ABC directory -# by adding a line like the following to a Makefile. -# -# ABC += -# -# Files in $(INSTALL_LOCATION)/cfg directory are now included by -# the base config files so the definitions and rules are available -# for use by later src directory Makefiles in the same module or -# by other modules with a RELEASE line pointing to the TOP of -# the module with RULES_ABC. +# CONFIG and RULES files in the $(INSTALL_LOCATION)/cfg directory +# are included by the Base config files so their definitions and +# rules are available for use by later src directory Makefiles in +# the same module, or by other modules with a RELEASE line that +# points to the TOP of the module providing these files. FILE_TYPE += ADL INSTALL_ADL = $(INSTALL_LOCATION)/adl @@ -59,6 +60,6 @@ INSTALL_EDL = $(INSTALL_LOCATION)/edl FILE_TYPE += PERL_MODULES INSTALL_PERL_MODULES = $(INSTALL_LOCATION_LIB)/perl -INSTALLS_CFG= $(CFG:%= $(INSTALL_CFG)/%) +INSTALLS_CFG = $(CFG:%= $(INSTALL_CFG)/%) DIRECTORY_TARGETS += $(foreach type, $(FILE_TYPE),$(INSTALL_$(type))) diff --git a/configure/RULES_FILE_TYPE b/configure/RULES_FILE_TYPE index d5aeddf38..b58bf550f 100644 --- a/configure/RULES_FILE_TYPE +++ b/configure/RULES_FILE_TYPE @@ -1,10 +1,10 @@ #************************************************************************* -# Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne +# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # EPICS BASE is distributed subject to a Software License Agreement found -# in the file LICENSE that is included with this distribution. +# in the file LICENSE that is included with this distribution. #************************************************************************* # $Revision-Id$ # @@ -36,13 +36,11 @@ endif endif #--------------------------------------------- -# Include existing and new $(INSTALL_CFG)/* definitions +# Include our own $(INSTALL_CFG)/RULES* definitions # -TOP_CFG_FILES = $(sort $(wildcard $(INSTALL_CFG)/RULES*) \ - $(wildcard $(INSTALL_CFG)/CONFIG*) \ - $(addprefix $(INSTALL_CFG)/,$(CFG))) -ifneq ($(TOP_CFG_FILES),) - include $(TOP_CFG_FILES) +TOP_CFG_RULES = $(wildcard $(INSTALL_CFG)/RULES*) +ifneq ($(TOP_CFG_RULES),) + include $(TOP_CFG_RULES) endif #--------------------------------------------------------------- diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index e4150377a..2faf69083 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -14,6 +14,19 @@ +

Inclusion of <top>/cfg/* files refined

+ +

The way the build system includes files installed in the <top>/cfg/* +directory has been cleaned up. Files whose names begin with CONFIG will now get +included by the CONFIG step, and files whose names begin with RULES will get +included in the RULES step. These files are only ever included when GNUMake is +working in an application build (O.) directory and T_A is defined, so they +cannot be used to create generic build targets at other levels.

+ +

Files whose names don't start with either CONFIG or RULES are no longer +included automatically, but such files can still be installed into +<top>/cfg by naming them in the CFG variable.

+

Fixed iocsh stream redirection for several commands

A number of iocsh commands did not respond correctly to redirection of their @@ -26,7 +39,7 @@ developers if you discover any. Thanks to Eric Norum for the iocsh changes.

your C/C++ code is to #include "epicsStdioRedirect.h" instead of stdio.h.

-

Fixed crash loading record instance of unknown type

+

Fixed crash on loading record instance of unknown type

Fixed segfault when dbLoadRecords tried to load a record of a type that was not defined in its DBD files.