OpenTTD / OpenTTD/OpenSFX

Build system issues

Open
#47 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
18
Forks
11
PR merge metrics
No merged PRs in 30d

Description

While building the Debian package for the latest release, I came across a few issues:

  1. make generates src/opensfx.sfo, but make clean does not clean it.
  2. The tarball contains an opensfx.obs file, but running make regenerates this file (because opensfx.cat is not present, which is generated and the obs depends on the cat, so the obs is regenerated). Is this intentional? This is somewhat problematic, since the build now (potentially) modifies a file from the tarball, and make clean then removes it, which means that make && make clean leave the build dir in a different state.
  3. make check does no longer work. The Makefile part that handles this seems to use grfid and expect opensfx.grf to exist, which is not the case. Makefile.config does specify MD5_SRC_FILENAME (pointing to the obs file), but that file contains more than just an md5 file, so I'm not exactly sure how this is intended. The old makefile system would ship an opensfx-0.2.3.md5 in the tarball, and then just generate md5sums of the relevant files (only the .cat file I think) and compare those with the shipped file. What is the intention here?
  4. The repo still contains scripts/Makefile.{bundles,def,common}, but these seem unused?
  5. make bundle no longer seems to work to install the bundle into $(DIR_NAME) as before (and as documented). Weirdly enough it just says "make: Nothing to be done for 'bundle'", but I can't actually find a rule for bundle (perhaps some wildcard rule or something). This rule was previously used by the Debian package to install individual files into /usr/share/games/openttd/baseset/opensfx (rather than a tarball), since there is not much point in merging files into a tarball inside a Debian package (though I'm now switching to using make install instead, which also installs separate files).
  6. make install generates a tarball, but does not actually use it (instead, it installs separate files, which is what I'm using now). I think it could just depend on $(DIR_NAME) rather than $(DIR_NAME).tar.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Makefile and Makefile.config, then run make, make clean, make check, make bundle, and make install in a Debian-package build. Review scripts/Makefile.bundles, scripts/Makefile.def, and scripts/Makefile.common for related rules. Done means the targets have intentional, documented behavior, clean restores the expected tree, and packaging works as described.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.