Commit a4135210 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Make debug builds a bit simpler

AAsmModule:
 Remove SA_DEBUG override, instead use ASDFLAGS like CModule does.
CModule:
 If the target is 'debug' allow CMHGDFLAGS to pass extra defines into CMHG, this avoids the common problem of having to have 2 CMHG files and select between them.

Other - sync the messages token check/copying, use ${NOP} and ${FAPPEND} and ${DO}, and od.${RES_OBJ} isn't dependent on ${DIRS} since it already has that when creating o.${RES_OBJ}.

Version 6.50. Tagged as 'BuildSys-6_50'
parent 71f9f9e9
......@@ -94,7 +94,6 @@ SA_LIBS ?= ${ROM_LIBS}
DBG_MODULE ?= ${TARGET}D
DBG_OBJECT ?= ${TARGET}D.o
SA_DEBUG ?= -g -PreDefine "debugging SETL {TRUE}"
DBG_LIBS ?= ${ROM_LIBS}
#GPA_FILE ?= ${TARGET}.gpa
......@@ -207,7 +206,7 @@ ${DBG_MODULE}: ${DBG_OBJECT} ${DBG_LIBS} ${DIRS} ${SA_DEPEND}
${LD} -rmf -o $@ ${DBG_OBJECT} ${DBG_LIBS}
${DBG_OBJECT}: ${ROM_SOURCE} ${MERGEDMSGS} ${TOKHELPSRC} ${DIRS}
${AS} ${ASFLAGS} -depend $(subst .o,.d,$@) -o $@ ${ROM_SOURCE} ${SA_FLAGS} ${SA_DEBUG}
${AS} ${ASFLAGS} ${ASDFLAGS} -g -pd "debugging SETL {TRUE}" -depend $(subst .o,.d,$@) -o $@ ${ROM_SOURCE} ${SA_FLAGS}
#gpa_debug${CUSTOMGPA}: ${GPA_FILE}
# @${ECHO} ${COMPONENT}: GPA debug listing generated
......
......@@ -107,7 +107,6 @@ SA_LIBS ?= ${ROM_LIBS}
DBG_MODULE ?= rm.${MACHINE}.${TARGET}D
DBG_OBJECT ?= o.${MACHINE}.${TARGET}D
SA_DEBUG ?= -g -PreDefine "debugging SETL {TRUE}"
DBG_LIBS ?= ${ROM_LIBS}
GPA_FILE ?= gpa.${MACHINE}.${TARGET}
......@@ -144,7 +143,6 @@ ${DIRS} ::
#
# ROM build rules
#
rom${CUSTOMROM}: ${ROM_MODULE}
@${ECHO} ${COMPONENT}: rom module built
......@@ -177,10 +175,9 @@ ${SA_OBJECT}: ${ROM_SOURCE} ${MERGEDMSGS} ${TOKHELPSRC} ${DIRS}
${MERGEDMSGS}${PRIVATEMSGS}:
${MKDIR} ${MERGEDMDIR}
${TOUCH} $@
IfThere LocalRes:Messages Then ${CP} LocalRes:Messages $@ ${CPFLAGS}
${TOKENCHECK} LocalRes:Messages
IfThere LocalRes:CmdHelp Then ${TOKENCHECK} LocalRes:CmdHelp
IfThere LocalRes:CmdHelp Then ${CAT} LocalRes:CmdHelp { >> $@ }
IfThere LocalRes:CmdHelp Then ${FAPPEND} $@ LocalRes:Messages LocalRes:CmdHelp Else ${CP} LocalRes:Messages $@ ${CPFLAGS}
install${CUSTOMSA}: ${SA_MODULE}
${MKDIR} ${INSTDIR}
......@@ -195,7 +192,7 @@ ${DBG_MODULE}: ${DBG_OBJECT} ${DBG_LIBS} ${DIRS} ${SA_DEPEND}
${LD} -rmf -o $@ ${DBG_OBJECT} ${DBG_LIBS}
${DBG_OBJECT}: ${ROM_SOURCE} ${MERGEDMSGS} ${TOKHELPSRC} ${DIRS}
${AS} ${ASFLAGS} -o $@ ${ROM_SOURCE} ${SA_FLAGS} ${SA_DEBUG}
${AS} ${ASFLAGS} ${ASDFLAGS} -g -pd "debugging SETL {TRUE}" -o $@ ${ROM_SOURCE} ${SA_FLAGS}
gpa_debug${CUSTOMGPA}: ${GPA_FILE}
@${ECHO} ${COMPONENT}: GPA debug listing generated
......@@ -243,10 +240,10 @@ export_libs:
@${ECHO} ${COMPONENT}: library export complete
export${CUSTOMEXP}: export_${PHASE}
@|
@${NOP}
export_:: export_libs export_hdrs
@|
@${NOP}
${C_EXP_HDR}.${ASMCHEADER1} :: hdr.${ASMCHEADER1}
${HDR2H} hdr.${ASMCHEADER1} $@
......@@ -283,7 +280,7 @@ resources_common::
${CP} LocalRes:Messages ${RESFSDIR}.Messages ${CPFLAGS}
resources-None: resources_common
@|
@${NOP}
resources-: resources_common
IfThere LocalRes:CmdHelp Then ${TOKENCHECK} LocalRes:CmdHelp
......
......@@ -69,7 +69,7 @@ INCLUDED_CMODULE = YES
# ROM_DEPEND (opt) (any extra dependency to assert on ROM_TARGET)
# SA_DEPEND (opt) (any extra dependency to assert on SA_TARGET and DBG_TARGET)
# CUSTOMEXP (opt) (set to "custom" to override the export rules)
# CUSTOMRES (opt) (set to "custom" to override the resources 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)
# CUSTOMSA (opt) (set to "custom" to override the standalone rules)
# CUSTOMDBG (opt) (set to "custom" to override the debug rules)
......@@ -187,6 +187,10 @@ CDEFINES += ${ROMCDEFINES}
ASMDEFINES += ${ROMASMDEFINES}
endif
ifneq ($(filter debug%,${MAKECMDGOALS}),)
CMHGFLAGS += ${CMHGDFLAGS} # Affects both object and header generation
endif
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
......@@ -259,18 +263,18 @@ create_exp_hdr_dirs:
ifneq (${CMHGFILE},)
o._h_${CMHGAUTOHDR}: h.${CMHGFILE} ${DIRS}
Do ${AWK} -- "/.ifndef ${CMHGFILE_SWIPREFIX}/,/endif/" h.${CMHGFILE} > o._h_${CMHGAUTOHDR}
${DO} ${AWK} -- "/.ifndef ${CMHGFILE_SWIPREFIX}/,/endif/" h.${CMHGFILE} > o._h_${CMHGAUTOHDR}
endif
ifneq ($(findstring ${CMHGAUTOHDR},${HDRS}),)
exphdr.${CMHGAUTOHDR}: h.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
FAppend ${C_EXP_HDR}.${CMHGAUTOHDR} h.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
${FAPPEND} ${C_EXP_HDR}.${CMHGAUTOHDR} h.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
endif
ifneq ($(findstring ${CMHGAUTOHDR},${ASMCHDRS}),)
expasmc.${CMHGAUTOHDR}: hdr.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
${HDR2H} hdr.${CMHGAUTOHDR} ${C_EXP_HDR}.${CMHGAUTOHDR}
FAppend ${C_EXP_HDR}.${CMHGAUTOHDR} ${C_EXP_HDR}.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
${FAPPEND} ${C_EXP_HDR}.${CMHGAUTOHDR} ${C_EXP_HDR}.${CMHGAUTOHDR} o._h_${CMHGAUTOHDR}
endif
ifneq (${CMHGDEPENDS},)
......@@ -306,7 +310,7 @@ resources_common:
${CP} LocalRes:Messages ${RESFSDIR}.Messages ${CPFLAGS}
resources-None: resources_common
@|
@${NOP}
resources-: resources_common
IfThere LocalRes:CmdHelp Then ${TOKENCHECK} LocalRes:CmdHelp
......@@ -325,14 +329,14 @@ ${MERGEDMSGS}: LocalRes:Messages
${MKDIR} ${MERGEDMDIR}
${TOKENCHECK} LocalRes:Messages
IfThere LocalRes:CmdHelp Then ${TOKENCHECK} LocalRes:CmdHelp
IfThere LocalRes:CmdHelp Then FAppend $@ LocalRes:Messages LocalRes:CmdHelp Else ${CP} LocalRes:Messages $@ ${CPFLAGS}
IfThere LocalRes:CmdHelp Then ${FAPPEND} $@ LocalRes:Messages LocalRes:CmdHelp Else ${CP} LocalRes:Messages $@ ${CPFLAGS}
ifneq (${RES_OBJ},)
o.${RES_OBJ}: ${MERGEDMSGS} ${DIRS}
${RESGEN} ${RES_AREA} $@ ${MERGEDMSGS} ${RES_PATH}
od.${RES_OBJ}: o.${RES_OBJ} ${DIRS}
${CP} o.${RES_OBJ} od.${RES_OBJ} ${CPFLAGS}
od.${RES_OBJ}: o.${RES_OBJ}
${CP} o.${RES_OBJ} $@ ${CPFLAGS}
endif
#
......
......@@ -56,7 +56,7 @@ endif
MAKE = amu
MODGEN = modgen
MODSQZ = modsqz
NOP = @|
NOP = |
NUMBER = ${DO} RUN Build:Number
PERL = ${DO} <Perl$Dir>.perl
RESGEN = resgen
......@@ -103,10 +103,10 @@ UNZIP = unzip
STDTOOLOPTIONS = -depend !Depend ${THROWBACK}
ARFLAGS += -c -o
ASFLAGS += -Stamp -quit ${STDTOOLOPTIONS} ${ASMDEFINES} ${ASMINCLUDES}
ASFLAGS += ${STDTOOLOPTIONS} ${ASMDEFINES} ${ASMINCLUDES}
ASFLAGS += -ihdr -i<Hdr$Dir>.Global -i<Hdr$Dir>.Interface -i<Hdr$Dir>.Interface2
ASFLAGS += -pd "APCS SETS \"${APCS}\"" -pd "Machine SETS \"${MACHINE}\"" -pd "UserIF SETS \"${USERIF}\""
CFLAGS += -c ${STDTOOLOPTIONS} ${CDEFINES} ${CINCLUDES} ${C_NO_FNAMES} ${C_WARNINGS}
CFLAGS += -c ${STDTOOLOPTIONS} ${CDEFINES} ${CINCLUDES} ${C_NO_FNAMES} ${C_WARNINGS}
C++INCLUDES += -ICPP:
C++FLAGS += -c ${STDTOOLOPTIONS} ${C++DEFINES} ${C++INCLUDES}
CMHGFLAGS += -p ${STDTOOLOPTIONS} ${CMHGDEFINES} ${CMHGINCLUDES}
......
/* (6.49)
/* (6.50)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 6.49
#define Module_MajorVersion_CMHG 6.50
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 24 Sep 2014
#define Module_MajorVersion "6.49"
#define Module_Version 649
#define Module_MajorVersion "6.50"
#define Module_Version 650
#define Module_MinorVersion ""
#define Module_Date "24 Sep 2014"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "BuildSys"
#define Module_ComponentPath "castle/RiscOS/BuildSys"
#define Module_FullVersion "6.49"
#define Module_HelpVersion "6.49 (24 Sep 2014)"
#define Module_LibraryVersionInfo "6:49"
#define Module_FullVersion "6.50"
#define Module_HelpVersion "6.50 (24 Sep 2014)"
#define Module_LibraryVersionInfo "6:50"
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