Commit 0531a2c1 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Rework USB driver makefile & cmhg files to avoid constant rebuilds of USBDriver.h

Detail:
  Limitations in the way CMHG was being told which message file to use meant that the makefile was constructed in a way that would automatically delete usbmodhead.h/.o after they were built, to protect against OHCIDriver or EHCIDriver causing the file to be built referencing the wrong messages file.
  However since each component uses a unique messages filename, and each component has its own CMHG file, there was absolutely no need for this - all that was needed was to update the CMHG files to reference the correct messages file directly.
  ROM builds are now a minute or two faster because of this, which is quite welcome since I can often find myself doing 30+ builds a day.
Admin:
  Tested by building Tungsten ROM and diffing new modules against old; no differences detected.
  Not tagged.


Version 0.49. Not tagged
parent 96cb4c20
......@@ -6,18 +6,18 @@
*/
#define Module_MajorVersion_CMHG 0.49
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Oct 2009
#define Module_Date_CMHG 30 Jan 2010
#define Module_MajorVersion "0.49"
#define Module_Version 49
#define Module_MinorVersion ""
#define Module_Date "02 Oct 2009"
#define Module_Date "30 Jan 2010"
#define Module_ApplicationDate "02-Oct-09"
#define Module_ApplicationDate "30-Jan-10"
#define Module_ComponentName "NetBSD"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/NetBSD"
#define Module_FullVersion "0.49"
#define Module_HelpVersion "0.49 (02 Oct 2009)"
#define Module_HelpVersion "0.49 (30 Jan 2010)"
#define Module_LibraryVersionInfo "0:49"
......@@ -29,7 +29,7 @@ USBDIR = <Lib$Dir>.USB
CINCLUDES = -Itbox:,TCPIPLibs:,^.,OS:
CDEFINES += ${CDEBUG} -DKERNEL -D_KERNEL -Dpaddr_t=int -D__P(A)=A -DKLD_MODULE -DDISABLE_PACKED
CMHGINCLUDES = ${CINCLUDES}
CMHGDEFINES = -DMSGLOC=${MSGLOC} ${CDEBUG}
CMHGDEFINES = ${CDEBUG}
CFLAGS += -ff -wp -wc -zm -zps1
LDFLAGS = -LIST maps.${TARGET} -MAP -Xref -Symbols rm.sym${TARGET}
......@@ -124,12 +124,8 @@ usbmodule.o usbkboard.o: usbmodhead.h
Resources.<Locale>.USBDevs: bin.makedevs ^.dev.usb.h.usbdevs ^.dev.usb.h.usbdevs_data
${RUN}bin.makedevs > Resources.<Locale>.USBDevs
# Remove the usbmodhead after creating the SWI table because if OHCIDriver
# makes it then it has the wrong messages file in it
USBDriver.h: usbmodhead.h
${SED} -n "/define USBDriver_/p" h.usbmodhead > h.USBDriver
${RM} h.usbmodhead
${RM} o.usbmodhead
bin.makedevs: c.makedevs ${CLIB} ${DIRS}
${MAKE} -f makedevs/mk COMPONENT=makedevs THROWBACK=${THROWBACK}
......
......@@ -29,9 +29,7 @@ help-string: EHCIDriver EHCIDriverModule_MajorVersion_CMHG
date-string: EHCIDriverModule_Module_Date_CMHG
#define HELPFILE(M) "Resources:$." #M
#define XHELPFILE(M) HELPFILE(M)
international-help-file: XHELPFILE(MSGLOC)
international-help-file: "Resources:$.Resources.EHCIDriver.Messages"
#ifdef EHCI_DEBUG
command-keyword-table: module_commands
......
......@@ -32,9 +32,7 @@ help-string: OHCIDriver OHCIDriverModule_MajorVersion_CMHG
date-string: OHCIDriverModule_Module_Date_CMHG
#define HELPFILE(M) "Resources:$." #M
#define XHELPFILE(M) HELPFILE(M)
international-help-file: XHELPFILE(MSGLOC)
international-help-file: "Resources:$.Resources.OHCIDriver.Messages"
#ifdef OHCI_DEBUG
command-keyword-table: module_commands
......
......@@ -31,9 +31,7 @@ help-string: USBDriver USBDriverModule_MajorVersion_CMHG
date-string: USBDriverModule_Module_Date_CMHG
#define HELPFILE(M) "Resources:$." #M
#define XHELPFILE(M) HELPFILE(M)
international-help-file: XHELPFILE(MSGLOC)
international-help-file: "Resources:$.Resources.USBDriver.Messages"
command-keyword-table: module_commands
......
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