Commit 6d8a8a45 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Use the same optional resources syntax for AAsmModule as for CModule

Copy over the rules that use platform agnostic InstRes to copy their extra resources (for those modules wanting more than just the default Messages+CmdHelp).
Copy over the logic that allows INSERTVERSION to be run on Messages files (from CApp shared makefile) so modules which have a front end can get their dates from Messages.
Add INSERTVERSION facility to CModule too.

Version 6.91. Tagged as 'BuildSys-6_91'
parent 2b7fcbba
......@@ -34,7 +34,6 @@ INCLUDED_AASMMODULE = YES
#
# COMPONENT (the name of the component)
# TARGET (opt) (the leafname of the module - otherwise ${COMPONENT})
# RESFSDIR (opt) (actual directory to export resources to - otherwise ${RESDIR}.${TARGET})
# ROM_MODULE (opt) (output filename - otherwise rm.${MACHINE}.${TARGET})
# ROM_OBJECT (opt) (object file for romming - otherwise o.${MACHINE}.${TARGET})
# ROM_LIBS (opt) (libraries to link again ROM_OBJECT to generate ROM_MODULE)
......@@ -52,6 +51,12 @@ INCLUDED_AASMMODULE = YES
# CHEADER[1-3] (opt) (C header files to export - otherwise none)
# C_EXP_HDR (opt) (C header target directory - otherwise <cexport$dir>.Interface.h)
# EXP_HDR (opt) (directory for exported assembler interface headers)
# INSTRES_FILES (opt) (extra resource files in addition to Messages - use InstRes specification rules)
# INSTRAM_FILES (opt) (RAM build specific resources - otherwise ${INSTRES_FILES})
# INSTROM_FILES (opt) (ROM build specific resources - otherwise ${INSTRES_FILES})
# INSTR??_DEPENDS (opt) (any extra dependency to assert on INSTRES/INSTRAM/INSTROM_FILES)
# MERGEDMSGS (r/o) (leafname of generated Messages file)
# RESFSDIR (opt) (actual directory to export resources to - otherwise ${RESDIR}.${TARGET})
# CUSTOMEXP (opt) (set to "custom" to override the export rules)
# CUSTOMRES (opt) (set to "custom" to override the resources rules, or "no" for no resources)
# CUSTOMROM (opt) (set to "custom" to override the rom rules)
......@@ -70,6 +75,7 @@ INCLUDED_AASMMODULE = YES
# <CExport$Dir> (export directory for C interface headers)
# CMDHELP (optional, set to None to exclude syntax errors from Messages)
# PHASE (export phase discriminator)
# INSERTVERSION (awk script to substitute from VersionNum)
#
#
# It relies on the following generic tool macros from the Tools makefile
......@@ -90,14 +96,17 @@ ROM_SOURCE ?= s.${TARGET}
ROM_OBJECT ?= o.${MACHINE}.${TARGET}
DIRS ?= o._dirs
EXP_HDR ?= <export$dir>
RESFSDIR ?= ${RESDIR}.${TARGET}
RESAPPDIR ?= ${RESDIR}.^.Apps.${APP}
C_EXP_HDR ?= <cexport$dir>.Interface.h
SA_MODULE ?= rm.${MACHINE}.${TARGET}SA
SA_OBJECT ?= o.${MACHINE}.${TARGET}SA
MERGEDMDIR ?= o.${MACHINE}._Messages_
MERGEDMSGS ?= ${MERGEDMDIR}.${TARGET}
INSTRAM_FILES ?= ${INSTRES_FILES}
INSTRAM_DEPENDS ?= ${INSTRES_DEPENDS}
INSTROM_FILES ?= ${INSTRES_FILES}
INSTROM_DEPENDS ?= ${INSTRES_DEPENDS}
MERGEDRDIR ?= o._ResData_
MERGEDMSGS ?= ${MERGEDRDIR}.${TARGET}.Messages
RESFSDIR ?= ${RESDIR}.${TARGET}
RESAPPDIR ?= ${RESDIR}.^.Apps.${APP}
ifeq (${CMDHELP},None)
SA_FLAGS ?= -PD "standalone SETL {TRUE}" -PD "MergedMsgs SETS \"${MERGEDMSGS}\"" -PD "international_help SETL {FALSE}"
else
......@@ -120,6 +129,14 @@ ifneq (${RESOURCES},)
CUSTOMRES = ${RESOURCES} # The old name for CUSTOMRES
endif
ifeq ($(filter rom%,${MAKECMDGOALS}),)
RES_FILES_ = ${INSTRAM_FILES}
RES_DEPENDS_ = ${INSTRAM_DEPENDS}
else
RES_FILES_ = ${INSTROM_FILES}
RES_DEPENDS_ = ${INSTROM_DEPENDS}
endif
#
# Exported headers
#
......@@ -173,11 +190,16 @@ ${SA_MODULE}: ${SA_OBJECT} ${SA_LIBS} ${DIRS} ${SA_DEPEND}
${SA_OBJECT}: ${ROM_SOURCE} ${MERGEDMSGS} ${TOKHELPSRC} ${DIRS}
${AS} ${ASFLAGS} -o $@ ${ROM_SOURCE} ${SA_FLAGS}
${MERGEDMSGS}${PRIVATEMSGS}:
${MKDIR} ${MERGEDMDIR}
ifeq ($(filter no custom,${CUSTOMRES}),)
${MERGEDMSGS}:
${MKDIR} ${MERGEDRDIR}.${TARGET}
${TOKENCHECK} LocalRes:Messages
IfThere LocalRes:CmdHelp Then ${TOKENCHECK} LocalRes:CmdHelp
IfThere LocalRes:CmdHelp Then ${FAPPEND} $@ LocalRes:Messages LocalRes:CmdHelp Else IfThere LocalRes:Messages Then ${CP} LocalRes:Messages $@ ${CPFLAGS}
else
${MERGEDMSGS}::
@${NOP}
endif
install${CUSTOMSA}: ${SA_MODULE}
${MKDIR} ${INSTDIR}
......@@ -266,7 +288,7 @@ ${C_EXP_HDR}.${CHEADER3} :: h.${CHEADER3}
#
# Resources rules
#
resources${CUSTOMRES}:: ${RESOURCEEXTRA} resources-${CMDHELP}
resources${CUSTOMRES}:: resources-${CMDHELP}
@${ECHO} ${COMPONENT}: resources copied to Messages module
ifeq (${CUSTOMRES},no)
......@@ -274,26 +296,31 @@ resources:
@${ECHO} ${COMPONENT}: no resources to export
endif
resources_common::
resources_extra: ${RES_DEPENDS_}
ifneq (${RES_FILES_},)
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${RESFSDIR} ${RES_FILES_}
endif
ifneq (,$(filter Messages,${INSTRES_VERSION}))
${INSERTVERSION} ${RESFSDIR}.Messages > ${RESFSDIR}._Awk_
${CP} ${RESFSDIR}._Awk_ ${RESFSDIR}.Messages ${CPFLAGS}
${RM} ${RESFSDIR}._Awk_
endif
@${NOP}
resources_common:
${MKDIR} ${RESFSDIR}
${TOKENCHECK} LocalRes:Messages
${CP} LocalRes:Messages ${RESFSDIR}.Messages ${CPFLAGS}
resources-None: resources_common
@${NOP}
resources-: resources_common
resources_cmdhelp:
IfThere LocalRes:CmdHelp Then ${TOKENCHECK} LocalRes:CmdHelp
IfThere LocalRes:CmdHelp Then ${CAT} LocalRes:CmdHelp { >> ${RESFSDIR}.Messages }
resources_res::
${CP} LocalRes:Res ${RESFSDIR}.Res ${CPFLAGS}
resources_sprites::
${INSTRES} -I LocalUserIFRes:,LocalRes:,Resources ${RESFSDIR} Sprites [Sprites11] [Sprites22]
IfThere LocalRes:CmdHelp Then ${FAPPEND} ${RESFSDIR}.Messages LocalRes:Messages LocalRes:CmdHelp
resources_templates::
${CP} LocalRes:Templates ${RESFSDIR}.Templates ${CPFLAGS}
resources-None: resources_extra resources_common
@${NOP}
resources-: resources_extra resources_cmdhelp resources_common
@${NOP}
#
# Build the help tokens
......
......@@ -94,6 +94,7 @@ INCLUDED_CMODULE = YES
# FORCEROMLINK (set to force a relink of the ROM target, used in BBE)
# LINKDIR (installation directory for LNK_TARGET)
# ADDRESS (base address for LNK_TARGET)
# INSERTVERSION (awk script to substitute from VersionNum)
#
#
# It relies on the following generic tool macros from the StdTools makefile
......@@ -327,6 +328,11 @@ endif
resources_extra: ${RES_DEPENDS_}
ifneq (${RES_FILES_},)
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${RESFSDIR} ${RES_FILES_}
endif
ifneq (,$(filter Messages,${INSTRES_VERSION}))
${INSERTVERSION} ${RESFSDIR}.Messages > ${RESFSDIR}._Awk_
${CP} ${RESFSDIR}._Awk_ ${RESFSDIR}.Messages ${CPFLAGS}
${RM} ${RESFSDIR}._Awk_
endif
@${NOP}
......
/* (6.90)
/* (6.91)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 6.90
#define Module_MajorVersion_CMHG 6.91
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 May 2016
#define Module_Date_CMHG 29 May 2016
#define Module_MajorVersion "6.90"
#define Module_Version 690
#define Module_MajorVersion "6.91"
#define Module_Version 691
#define Module_MinorVersion ""
#define Module_Date "28 May 2016"
#define Module_Date "29 May 2016"
#define Module_ApplicationDate "28-May-16"
#define Module_ApplicationDate "29-May-16"
#define Module_ComponentName "BuildSys"
#define Module_ComponentPath "castle/RiscOS/BuildSys"
#define Module_FullVersion "6.90"
#define Module_HelpVersion "6.90 (28 May 2016)"
#define Module_LibraryVersionInfo "6:90"
#define Module_FullVersion "6.91"
#define Module_HelpVersion "6.91 (29 May 2016)"
#define Module_LibraryVersionInfo "6:91"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment