1. 15 May, 2021 4 commits
    • Ben Avison's avatar
      Support links for extension-less files in subdirectories · 9b0aed8c
      Ben Avison authored
      This only applies to cross-compilation builds. The `make links` rules don't
      know a pre-determined list of subdirectories that need to be converted into
      filename extensions. Instead, files that should have no filename extension
      are usually simply identified by the absence of a `/` in their specification
      in `SOURCES_TO_SYMLINK`. However, this is insufficient to handle some rarer
      cases, such as a `Makefile` within a `Test` subdirectory.
      
      To handle this, we introduce explicit support for specifying such files in
      `SOURCES_TO_SYMLINK`, using a double slash where there would otherwise be a
      filetype subdirectory name, such as `Test//Makefile`. (Conveniently, this is
      also valid Posix filename syntax anyway.) The way this is achieved is to
      tweak the regular expressions to require the directory and leafnames between
      slashes to be at least one character long.
      
      Version 7.58. Tagged as 'BuildSys-7_58'
      9b0aed8c
    • Ben Avison's avatar
      Always implicitly include StdTools when cross-compiling · b1e26d51
      Ben Avison authored
      `AAsmModule`, `CApp`, `CLibrary` and `CModule` implicitly include various
      other shared makefile fragments to permit simpler master makefiles. However,
      when cross-compiling, they were only included when invoked from within the
      `objs` subdirectory, which in particular meant you couldn't rely on any of
      the definitions from `StdTools` when extending the `clean` rule unless you
      explicitly included it from the master makefile, thereby defeating the
      purpose of the implicit inclusion. Change them so that `StdTools` is included
      for all rules.
      b1e26d51
    • Ben Avison's avatar
      Add tokenised help file functionality to `CModule` · ee10b29f
      Ben Avison authored
      `TOKHELPSRC`, `HELPSRC` and `TOKENS` have the same meaning as in `AAsmModule`.
      Because `CModule`, unlike `AAsmModule`, can build a binary from multiple
      linked object files, it is also necessary to specify which object file(s)
      depend on the autogenerated source file. This is achieved with the new input
      variable `TOKHELPDEPENDS`. This defaults to `OBJS` which in turn defaults to
      `TARGET`, which should mean that any components converted from `AAsmModule`
      will not require any such line to be specified in their master makefile.
      
      Requires RiscOS/Sources/Programmer/Debugger!4
      ee10b29f
    • Ben Avison's avatar
      614326fc
  2. 27 Jun, 2020 2 commits
    • Ben Avison's avatar
      Standardise autogeneration of source files using objasm within CModule clients · 3d3228a9
      Ben Avison authored
      Various components use objasm for its general macro abilities in order to
      generate intermediate source or header files. To date, this has required
      writing of custom rules, which then need separate implementations for
      cross-compilation use.
      
      There is no standardisation of destination directory (it may be generating
      source or header files in any arbitrary language) so the solution here is to
      specify each target using a subdirectory, basename and extension, and leave
      CModule to deal with whether or not the extension should be in prefix or
      suffix position, depending on the host OS. Only one such autogenerated file
      is currently supported per makefile:
      
      ```
      ASM2TXT = <basename> <optional extension>
      ASM2TXT_SUBDIR = <optional subdirectory, each element followed by ${SEP}>
      ```
      
      The source file passed to objasm is derived from `<basename>`, prefixed by
      `s.` or suffixed by `.s` as appropriate.
      3d3228a9
    • Ben Avison's avatar
  3. 23 May, 2019 1 commit
  4. 11 Apr, 2018 1 commit
    • Ben Avison's avatar
      Incremental step in cross-compilation support · 5e83cb7e
      Ben Avison authored
      Detail:
        ModuleDB:
        * Correct capitalisation of resgen's TARGET to match its main source file
        GNUmakefiles/AAsmModule:
        * Targets now given ,ffa filetype suffix
        * Support source directory layouts s/<subdir>/<leaf> as used by the
          kernel and printer drivers - define SYMLINK_EXT_FIRST to enable
        * Prevent relinking when running make on an up-to-date component due to
          a difference between amu and GNU make's handling of double-colon rules
        * Support linking with GNU toolchain
        * Fix installation rule (mixup between MERGEDMDIR and MERGEDRDIR)
        * Support up to 16 assembler and 8 C-from-assembler headers, up from 3
          of each (here's looking at you, kernel) - long-term, it might be worth
          changing this to a scheme like that used by CModule to remove any
          limits
        * Fix C-from-assembler exports to have .h suffix
        GNUmakefiles/AppLibs:
        * Define INCLUDE_OSLIB to permit OSLib header search paths to be
          specified in an OS-agnostic way
        GNUmakefiles/CApp:
        * Prevent relinking when running make on an up-to-date component due to
          a difference between amu and GNU make's handling of double-colon rules
        GNUmakefiles/CLibrary:
        * Prevent rearchiving when running make on an up-to-date component due
          to a difference between amu and GNU make's handling of double-colon
          rules
        * Don't use .hdr suffix on exported assembler header files
        * Correct order of dependencies for export_libs phony target
        GNUmakefiles/StdTools:
        * Definition for the module filetype suffix
        * Add LDBIN tool for GNU/Norcroft-agnostic binary link, useful for
          linking position-independent binary code, such as relocatable modules
          (i.e. ones that don't require the linker to create a __RelocCode
          function)
        * FAPPEND function now works if the same file is used for the
          destination as for one of the sources (this is used by CModule)
        GNUmakefiles/CModule, ModStdRule, ModuleLibs:
        * Finally created cross-compilation versions of the last major shared
          makefiles! Warning: these have received limited testing to date.
        Makefiles/AAsmModule:
        * Support up to 16 assembler and 8 C-from-assembler headers
        Makefiles/AppLibs, ModuleLibs:
        * Define INCLUDE_OSLIB
        Makefiles/StdTools:
        * Add LDBIN tool
      
      
      Version 7.24. Tagged as 'BuildSys-7_24'
      5e83cb7e