mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Responding to nb's review of variety-reform.
https://info.ravenbrook.com/mail/2012/09/06/15-42-57/0/ Copied from Perforce Change: 179302 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
3944685a40
commit
d8a499b473
8 changed files with 79 additions and 63 deletions
|
|
@ -127,22 +127,14 @@ extern unsigned CheckLevel;
|
|||
#else
|
||||
|
||||
#define AVER(cond) ASSERT(cond, #cond)
|
||||
#define AVERT(type, val) \
|
||||
ASSERT(type ## Check(val), "TypeCheck " #type ": " #val)
|
||||
#define AVERT ASSERT_TYPECHECK
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(AVER_AND_CHECK_ALL)
|
||||
|
||||
#define AVER_CRITICAL(cond) \
|
||||
BEGIN \
|
||||
ASSERT(cond, #cond); \
|
||||
END
|
||||
|
||||
#define AVERT_CRITICAL(type, val) \
|
||||
BEGIN \
|
||||
ASSERT(type ## Check(val), "TypeCheck " #type ": " #val); \
|
||||
END
|
||||
#define AVER_CRITICAL(cond) ASSERT(cond, #cond)
|
||||
#define AVERT_CRITICAL ASSERT_TYPECHECK
|
||||
|
||||
#else
|
||||
|
||||
|
|
@ -208,7 +200,7 @@ extern unsigned CheckLevel;
|
|||
*
|
||||
* - check fields that it "owns" with CHECKL, like asserts
|
||||
*
|
||||
* - check "down" values which are its "children" with CHEKCD
|
||||
* - check "down" values which are its "children" with CHECKD
|
||||
*
|
||||
* - check "up" values which are its "parents" with CHECKU.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@
|
|||
# MPMS assembler sources for the "mpm" part (.s files)
|
||||
# MPMPS pre-processor assembler sources for the "mpm" part (.S files)
|
||||
#
|
||||
# %%PART: Add a new parameter above for the files included in the part.
|
||||
# %%PART: When adding a new part, add a new parameter above for the
|
||||
# files included in the part.
|
||||
#
|
||||
# EDITING
|
||||
#
|
||||
|
|
@ -63,8 +64,8 @@ error "comm.gmk: CFLAGSOPT not defined"
|
|||
endif
|
||||
|
||||
#
|
||||
# %%PART: Add checks for the parameter with the sources for the new
|
||||
# part.
|
||||
# %%PART: When adding a new part, add checks for the parameter with the
|
||||
# sources for the new part.
|
||||
|
||||
ifndef PFM
|
||||
error "comm.gmk: PFM not defined"
|
||||
|
|
@ -93,8 +94,8 @@ endif
|
|||
# built with a simple command like "cc -c mps.c".
|
||||
CFLAGSCOMMON = $(PFMDEFS) $(CFLAGSCOMPILER)
|
||||
|
||||
# %%VARIETY: Define a macro containing the set of flags for the new
|
||||
# variety.
|
||||
# %%VARIETY: When adding a new variety, define a macro containing the set
|
||||
# of flags for the new variety.
|
||||
|
||||
# These flags are added to compilations for the indicated variety.
|
||||
CFRASH = -DCONFIG_VAR_RASH -DNDEBUG $(CFLAGSOPT)
|
||||
|
|
@ -104,7 +105,8 @@ CFCOOL = -DCONFIG_VAR_COOL $(CFLAGSDEBUG)
|
|||
CFTI = -DCONFIG_VAR_TI $(CFLAGSDEBUG)
|
||||
|
||||
# Bind CFLAGS to the appropriate set of flags for the variety.
|
||||
# %%VARIETY: Add a test for the variety and set CFLAGS here.
|
||||
# %%VARIETY: When adding a new variety, add a test for the variety and set
|
||||
# CFLAGS here.
|
||||
ifeq ($(VARIETY),rash)
|
||||
CFLAGS=$(CFLAGSCOMMON) $(CFRASH)
|
||||
else
|
||||
|
|
@ -131,7 +133,7 @@ ARFLAGS=rc$(ARFLAGSPFM)
|
|||
|
||||
|
||||
# == Common definitions ==
|
||||
# %%PART: Add your part here, unless it's platform-specific
|
||||
# %%PART: When adding a new part, add it here, unless it's platform-specific
|
||||
# These values are defined here because they have no variation between
|
||||
# platforms.
|
||||
|
||||
|
|
@ -160,8 +162,8 @@ MPM = $(MPMCOMMON) $(MPMPF)
|
|||
# These map the source file lists onto object files and dependency files
|
||||
# in the platform/variety directory.
|
||||
#
|
||||
# %%PART: Add a new macro which expands to the files included in the
|
||||
# part.
|
||||
# %%PART: When adding a new part, add a new macro which expands to the files
|
||||
# included in the part.
|
||||
|
||||
ifdef VARIETY
|
||||
MPMOBJ = $(MPM:%.c=$(PFM)/$(VARIETY)/%.o) \
|
||||
|
|
@ -198,7 +200,7 @@ endif
|
|||
|
||||
# == Pseudo-targets ==
|
||||
|
||||
# %%TARGET: Add the target to the all dependencies
|
||||
# %%TARGET: When adding a new target, add it to the all dependencies
|
||||
|
||||
all: mpmss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
|
||||
mpsicv lockcov poolncv locv qs apss \
|
||||
|
|
@ -213,8 +215,8 @@ all: mpmss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
|
|||
# These tests are run overnight (see design.buildsys.overnight).
|
||||
# bttest & teletest cannot be run unattended
|
||||
# mv2test cannot be run because MV2 is broken
|
||||
# %%TARGET: If target is suitable for the overnight tests, then
|
||||
# add it here.
|
||||
# %%TARGET: When adding a new target, if target is suitable for the
|
||||
# overnight tests, then add it here.
|
||||
testrun: mpmss apss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
|
||||
mpsicv lockcov poolncv locv qs finalcv finaltest arenacv \
|
||||
abqtest cbstest btcv messtest steptest walkt0
|
||||
|
|
@ -223,7 +225,7 @@ testrun: mpmss apss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
|
|||
# These convenience targets allow one to type "make foo" to build target
|
||||
# foo in selected varieties (or none, for the latter rule).
|
||||
#
|
||||
# %%TARGET: Add a pseudo-target for the new target here.
|
||||
# %%TARGET: When adding a new target, add a pseudo-target for it here.
|
||||
|
||||
mpmss sacss amcss amcssth amcsshe amsss amssshe segsmss awlut awlutth \
|
||||
awluthe mpsicv lockcov poolncv locv qs apss \
|
||||
|
|
@ -251,8 +253,10 @@ clean: phony
|
|||
rm -rf "$(PFM)"
|
||||
|
||||
# "target" builds some varieties of the target named in the TARGET macro.
|
||||
# %%VARIETY: Optionally, add a recursive make call for the new variety,
|
||||
# if it should be built by default.
|
||||
# %%VARIETY: When adding a new target, optionally add a recursive make call
|
||||
# for the new variety, if it should be built by default. It probably
|
||||
# shouldn't without a product design decision and an update of the readme
|
||||
# and build manual!
|
||||
|
||||
ifdef TARGET
|
||||
ifndef VARIETY
|
||||
|
|
@ -289,7 +293,8 @@ endif
|
|||
# of source files in case method (1) won't work on some future constrained
|
||||
# platform.
|
||||
#
|
||||
# %%VARIETY: Add a rule for how to build the MPS library for the variety
|
||||
# %%VARIETY: When adding a new variety, add a rule for how to build the
|
||||
# MPS library for the variety.
|
||||
|
||||
$(PFM)/rash/mps.a: $(PFM)/rash/mps.o
|
||||
$(PFM)/hot/mps.a: $(PFM)/hot/mps.o
|
||||
|
|
@ -311,7 +316,8 @@ $(PFM)/ti/mps.a: \
|
|||
# object files it is built from. These lines add dependencies to the
|
||||
# generic rules below, and should not include commands to execute.
|
||||
#
|
||||
# %%TARGET: Add the dependencies for the new target here.
|
||||
# %%TARGET: When adding a new target, add the dependencies for the new target
|
||||
# here.
|
||||
|
||||
ifdef VARIETY
|
||||
|
||||
|
|
@ -469,7 +475,8 @@ $(PFM)/$(VARIETY)/%.d: %.c
|
|||
|
||||
ifdef VARIETY
|
||||
ifdef TARGET
|
||||
# %%PART: Add the dependency file macro for the new part here.
|
||||
# %%PART: When adding a new part, add the dependency file macro for the new
|
||||
# part here.
|
||||
include $(MPMDEP) $(AMSDEP) $(AMCDEP) $(LODEP) \
|
||||
$(AWLDEP) $(POOLNDEP) $(TESTLIBDEP) $(FMTDYDEP) $(FMTHETSTDEP) \
|
||||
$(PLINTHDEP) $(EVENTPROCDEP)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
# PSEUDO-TARGETS
|
||||
|
||||
# "all" builds all the varieties of all targets
|
||||
# %%TARGET: Add the target to the all dependencies.
|
||||
# %%TARGET: When adding a new target, add it to the all dependencies.
|
||||
|
||||
all: mpmss.exe amcss.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awluthe.exe\
|
||||
mpsicv.exe lockutw3.exe lockcov.exe poolncv.exe locv.exe qs.exe apss.exe \
|
||||
|
|
@ -25,8 +25,9 @@ all: mpmss.exe amcss.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awluthe.exe
|
|||
|
||||
# Convenience targets
|
||||
|
||||
# %%TARGET: Add a pseudo-target for the new target here, first rule for
|
||||
# variety-dependent targets, and second for variety-independent ones.
|
||||
# %%TARGET: When adding a new target, add a pseudo-target for it here,
|
||||
# first rule for variety-dependent targets, and second for
|
||||
# variety-independent ones.
|
||||
|
||||
mpmss.exe amcss.exe amcsshe.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awluthe.exe dwstress.exe \
|
||||
mpsicv.exe lockutw3.exe lockcov.exe poolncv.exe locv.exe qs.exe apss.exe \
|
||||
|
|
@ -52,9 +53,10 @@ clean:
|
|||
-echo y | rmdir/s $(PFM)
|
||||
|
||||
# target target
|
||||
# %%VARIETY: Optionally, add a recursive make call for the new variety,
|
||||
# if it should be built by default.
|
||||
# Only the varieties needed for development and internal customers are made.
|
||||
# %%VARIETY: When adding a new variety, optionally, add a recursive make
|
||||
# call for the new variety, if it should be built by default. It probably
|
||||
# shouldn't without a product design decision and an update of the readme
|
||||
# and build manual!
|
||||
# Depends on there being no file called "target".
|
||||
|
||||
!IFDEF TARGET
|
||||
|
|
@ -94,7 +96,8 @@ mpsicv.cov:
|
|||
# of source files in case method (1) won't work on some future constrained
|
||||
# platform.
|
||||
#
|
||||
# %%VARIETY: Add a rule for how to build the MPS library for the variety
|
||||
# %%VARIETY: When adding a new variety, add a rule for how to build the
|
||||
# MPS library for the variety
|
||||
|
||||
$(PFM)\rash\mps.lib: $(PFM)\rash\mps.obj
|
||||
$(ECHO) $@
|
||||
|
|
@ -133,7 +136,7 @@ $(PFM)\ti\mps.lib: \
|
|||
# the generic rules below, and should not include commands to execute.
|
||||
# For a library this is not possible and the target should include commands
|
||||
# to build it.
|
||||
# %%TARGET: Add your new target here
|
||||
# %%TARGET: When adding a new target, add your new target here
|
||||
|
||||
!IFDEF VARIETY
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@
|
|||
# Alas, due to shortcomings in nmake, it is not possible to use only one
|
||||
# common fragment.
|
||||
#
|
||||
# %%PART: Add a new parameter for the files included in the part
|
||||
# %%PART: When adding a new part, add a new parameter for the files included
|
||||
# in the part
|
||||
# Parameters:
|
||||
# PFM platform code, e.g. "nti3mv"
|
||||
# PFMDEFS /D options to define platforms preprocessor symbols
|
||||
|
|
@ -40,7 +41,8 @@
|
|||
# CHECK PARAMETERS
|
||||
#
|
||||
#
|
||||
# %%PART: Add checks for the parameter with the sources for the new part.
|
||||
# %%PART: When adding a new part, add checks for the parameter with the
|
||||
# sources for the new part.
|
||||
|
||||
!IFNDEF PFM
|
||||
!ERROR commpre.nmk: PFM not defined
|
||||
|
|
@ -112,7 +114,8 @@ CFLAGSINTERNAL = /Zi
|
|||
CFLAGSEXTERNAL =
|
||||
|
||||
# The combinations of variety
|
||||
# %%VARIETY: Define a macro containing the set of flags for the new variety.
|
||||
# %%VARIETY: When adding a new variety, define a macro containing the set
|
||||
# of flags for the new variety.
|
||||
CFRASH = /DCONFIG_VAR_RASH $(CRTFLAGSHOT) $(CFLAGSHOT) $(CFLAGSEXTERNAL)
|
||||
CFHOT = /DCONFIG_VAR_HOT $(CRTFLAGSHOT) $(CFLAGSHOT) $(CFLAGSEXTERNAL)
|
||||
CFDIAG = /DCONFIG_VAR_DIAG $(CRTFLAGSHOT) $(CFLAGSHOT) $(CFLAGSINTERNAL)
|
||||
|
|
@ -123,7 +126,8 @@ CFTI = /DCONFIG_VAR_TI $(CRTFLAGSCOOL) $(CFLAGSCOOL) $(CFLAGSINTERNAL)
|
|||
# optimization and debug information
|
||||
|
||||
# LINKER FLAGS
|
||||
# %%VARIETY: define a macro containing the flags for the new variety
|
||||
# %%VARIETY: When adding a new variety, define a macro containing the flags
|
||||
# for the new variety
|
||||
LINKER = link
|
||||
LINKFLAGSCOMMON = /nologo
|
||||
LINKFLAGSINTERNAL = /DEBUG
|
||||
|
|
@ -139,7 +143,8 @@ LFTI = $(LINKFLAGSCOOL) $(LINKFLAGSINTERNAL)
|
|||
#LFCV = /PROFILE /DEBUG:full /DEBUGTYPE:cv
|
||||
|
||||
# Library manager
|
||||
# %%VARIETY: define a macro containing the flags for the new variety
|
||||
# %%VARIETY: When adding a new variety, define a macro containing the flags
|
||||
# for the new variety
|
||||
LIBMAN = lib # can't call this LIB - it screws the environment
|
||||
LIBFLAGSCOMMON = /nologo
|
||||
|
||||
|
|
@ -155,7 +160,7 @@ LIBFLAGSTI =
|
|||
|
||||
|
||||
# == Common definitions ==
|
||||
# %%PART: Add your part here, unless it's platform-specific
|
||||
# %%PART: When adding a new part, add it here, unless it's platform-specific
|
||||
# [It is not possible use a macro, like $(PFM), in a substitution,
|
||||
# hence all parts end up being platform-specific.]
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
#define config_h
|
||||
|
||||
|
||||
/* Variety Configuration */
|
||||
|
||||
/* Then deal with CONFIG_VAR_* build directives. These are translated into
|
||||
the directives CONFIG_ASSERT, CONFIG_STATS, CONFIG_LOG, etc. which control
|
||||
actual compilation features. */
|
||||
/* CONFIG_VAR_* -- variety Configuration
|
||||
*
|
||||
* These are translated into the directives CONFIG_ASSERT, CONFIG_STATS,
|
||||
* CONFIG_LOG, etc. which control actual compilation features.
|
||||
*/
|
||||
|
||||
/* CONFIG_VAR_RASH -- the rash and reckless variety
|
||||
*
|
||||
|
|
@ -395,7 +395,6 @@
|
|||
#define ARENA_INIT_SPARE_COMMIT_LIMIT ((Size)10uL*1024uL*1024uL)
|
||||
#define THREAD_MULTI
|
||||
#define PROTECTION
|
||||
#define DONGLE_NONE
|
||||
#define PROD_CHECKLEVEL_INITIAL CheckLevelSHALLOW
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,15 @@ TESTLIB = <testlib>
|
|||
|
||||
|
||||
# Source to object file mappings and CFLAGS amalgamation
|
||||
# %%VARIETY %%PART: Add new macros which expand to the files included
|
||||
# in the part for each variety
|
||||
# %%VARIETY: Add a CFLAGS macro which expands to the flags that that variety
|
||||
# should use when compiling C. And a LINKFLAGS macro which expands to the
|
||||
# flags that the variety should use when building executables. And a LIBFLAGS
|
||||
#
|
||||
# %%VARIETY %%PART: When adding a new variety or part, add new macros which
|
||||
# expand to the files included in the part for each variety
|
||||
#
|
||||
# %%VARIETY: When adding a new variety, add a CFLAGS macro which expands to
|
||||
# the flags that that variety should use when compiling C. And a LINKFLAGS
|
||||
# macro which expands to the flags that the variety should use when building
|
||||
# libraries
|
||||
# executables. And a LIBFLAGS macro which expands to the flags that the
|
||||
# variety should use when building libraries
|
||||
|
||||
!IF "$(VARIETY)" == "hot"
|
||||
CFLAGS=$(CFLAGSCOMMONPRE) $(CFHOT) $(CFLAGSCOMMONPOST)
|
||||
|
|
@ -158,6 +160,9 @@ TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\rash\)
|
|||
|
||||
!ENDIF
|
||||
|
||||
# %%PART: When adding a new part, add new macros which expand to the object
|
||||
# files included in the part
|
||||
|
||||
MPMOBJ = $(MPMOBJ0:>=.obj)
|
||||
PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
|
||||
AMSOBJ = $(AMSOBJ0:>=.obj)
|
||||
|
|
|
|||
|
|
@ -38,13 +38,15 @@ TESTLIB = <testlib>
|
|||
|
||||
|
||||
# Source to object file mappings and CFLAGS amalgamation
|
||||
# %%VARIETY %%PART: Add new macros which expand to the files included
|
||||
# in the part for each variety
|
||||
# %%VARIETY: Add a CFLAGS macro which expands to the flags that that variety
|
||||
# should use when compiling C. And a LINKFLAGS macro which expands to the
|
||||
# flags that the variety should use when building executables. And a LIBFLAGS
|
||||
#
|
||||
# %%VARIETY %%PART: When adding a new variety or part, add new macros which
|
||||
# expand to the files included in the part for each variety
|
||||
#
|
||||
# %%VARIETY: When adding a new variety, add a CFLAGS macro which expands to
|
||||
# the flags that that variety should use when compiling C. And a LINKFLAGS
|
||||
# macro which expands to the flags that the variety should use when building
|
||||
# libraries
|
||||
# executables. And a LIBFLAGS macro which expands to the flags that the
|
||||
# variety should use when building libraries
|
||||
|
||||
!IF "$(VARIETY)" == "hot"
|
||||
CFLAGS=$(CFLAGSCOMMONPRE) $(CFHOT) $(CFLAGSCOMMONPOST)
|
||||
|
|
@ -158,6 +160,9 @@ TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\rash\)
|
|||
|
||||
!ENDIF
|
||||
|
||||
# %%PART: When adding a new part, add new macros which expand to the object
|
||||
# files included in the part
|
||||
|
||||
MPMOBJ = $(MPMOBJ0:>=.obj)
|
||||
PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
|
||||
AMSOBJ = $(AMSOBJ0:>=.obj)
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ predefined when compiling the module sources.
|
|||
|
||||
CONFIG_VAR_<variety-code>
|
||||
|
||||
The variety-codes are the 2 letter code that appears after "variety." in the
|
||||
The variety-codes are the letter code that appears after "variety." in the
|
||||
tag of the relevant variety document (see variety.*) converted to upper case.
|
||||
Currently (2012-09-03): RASH, HOT, COOL, DIAG, TI
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue