Shared makefile support for Basic components
- 09 Jun, 2021 1 commit
-
-
Ben Avison authored
The `BasicApp` fragment is analogous to the `CApp` fragment in that it supports both single-file executables and application directories. Rules are included for building any such application directories into ROMs, with files destined for `Resources:$.Resources` being exported to the Messages module during the `resources` phase, and those destinated for `Resources:$.Apps` being built into a position-independent module, so that when the module is killed or unplugged, those files disappear from ResourceFS. Because the module is position-independent, the makefile fragment implements the `install_rom` rule rather than the `rom_link` rule used by `CApp`. This is consistent with how `srcbuild` already installs ROM components listed in the ModuleDB as being of type `BAS`. The other main difference from `CApp` is that there is no compilation or linking step. Tokenisation, crunching and squishing of the (untokenised) source files are roughly analogous to the compilation steps, except that multiple source files are concatenated (if applicable) as the first step. There is also no debug build variant, and so no `debug` rule. Crunching is performed (on native builds) using the `BasCrunch` tool, so if you are converting an existing component which includes its own Command script to perform tokenisation and crunching, this will no longer be needed. Cross-"compilation" is fully suported. This uses the new `toffb` tool for tokenisation (apologies for the wheel-reinvention, but this was developed in ignorance about Steve Fryatt's `Tokenize` tool; `toffb` also does do a more faithful job of replicating BASIC's `CRUNCH` options, so is more useful for ensuring cross-compilation builds remain identical to the native builds). It also uses Matrix Brandy (V1.22.9 or later) to execute Squish (at least RiscOS/Tools/Sources/Squish!1). We pass the new `-nosavepath` option to Squish to ensure that the results are identical for cross-compile builds compared to native ones. However, Squish ignores unrecognised command-line options, so this does not introduce a dependency on a newer Squish tool for native builds. One subtle enhancement over previous makefiles is that we create dynamic dependencies between the crunched-and-squished program and its untokenised source files.
46a29b83
-
- 17 May, 2021 4 commits
-
-
Ben Avison authored5bad7daf
-
Ben Avison authored
Missing `$` character before `{LOCALE}` would have caused UK resources to be selected instead of non-UK ones, if anyone were to be doing an internationalised cross-compiled build.
87a555c9 -
Ben Avison authored
This allows RISC OS abstract data files with filetype ffd to be referenced identically whether native or cross-compiling (it expands to an empty string when used natively).
c0d30666 -
Ben Avison authored64964432
-