Skip to content

Conversation

@mattias-p
Copy link
Member

@mattias-p mattias-p commented Sep 2, 2025

Purpose

This PR updates make dist to generate the MO files before creating the tarball.
As a drive-by, some clean-up is also performed on Makefile.PL.

Context

Fixes #442.

Changes

  • Add a dedicated make target make -C share mo to only generate all MO files.
  • Make make dist depend on make -C share mo. Maybe there are simpler and better ways to achieve this, but the best I could come up with was:
    1. Add a new target make mydist that runs both make -C share mo and make tardist in that order.
    2. Override DIST_DEFAULT from tardist to mydist.
  • Clean-ups in Makefile.PL:
    • Avoid reimplementing the share/Makefile mechanism
    • Use make -C share instead of cd share && make
    • Declare phony targets as such
    • Tidy Makefile.PL according to .perltidyrc

Testing

I tested this by executing the following and verifying that all of the MO files were listed.

rm -f Zonemaster-CLI-*.tar.gz && git clean -dfx && perl Makefile.PL && make dist && clear && tar tvf Zonemaster-CLI-*.tar.gz | grep mo

I have not tested this on FreeBSD. My hypothesis is that the share/Makefile mechanism is able switch to gmake on FreeBSD, but I haven't actually tested it.

@mattias-p mattias-p added this to the v2025.2 milestone Sep 2, 2025
@mattias-p mattias-p added V-Patch Versioning: The change gives an update of patch in version. RC-None Release category: Not to be included in Changes file. labels Sep 2, 2025
* Avoid reimplementing the share/Makefile mechanism
* Use `make -C share` instead of `cd share && make`
* Declare phony targets as such
* Tidy Makefile.PL according to .perltidyrc
Copy link
Contributor

@tgreenx tgreenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested and works as advertised.

@marc-vanderwal please review this solution, which should fix #442
@matsduf could you test this on FreeBSD? (cf. "How to test" section)

Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works on FreeBSD, but it is not possible to run run make distcheck before make all or make dist has been run. I think it makes more sense to run make all before make dist to be able to run make distcheck before make dist.

Maybe make distcheck should be included, and make dist not run if distcheck fails.

@matsduf matsduf modified the milestones: v2025.2, v2026.1 Oct 15, 2025
Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is important that make distcheck is included in the process. It would be nice of make dist makes it all, but then make distcheck should be automatically run before the distribution file is created, and the latter should be blocked if MANIFEST is not up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RC-None Release category: Not to be included in Changes file. V-Patch Versioning: The change gives an update of patch in version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translations (*.mo) files are generated inappropriately in the build process

3 participants