Skip to content

Commit 692567d

Browse files
jared mauchjared mauch
authored andcommitted
Fix .po file dependencies to prevent unnecessary rebuilds
- Make convertpofiles depend on $(POFILES) so make checks if .po files need to be merged with mailman.pot - The existing dependency rule %/LC_MESSAGES/mailman.po: mailman.pot ensures msgmerge only runs when mailman.pot is newer - Add --backup=none to msgmerge to avoid creating backup files - This fixes the issue where .po files were always being merged on every make run, even when mailman.pot hadn't changed
1 parent 0aa2c08 commit 692567d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

messages/Makefile.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ doinstall: .converted.stamp mofiles
119119
../scripts/convert_to_utf8 -d .
120120
touch .converted.stamp
121121

122-
convertpofiles: .converted.stamp
122+
# Ensure .po files are merged with mailman.pot before conversion
123+
# This depends on the .po files being up to date with mailman.pot
124+
convertpofiles: $(POFILES) .converted.stamp
123125

124126
mofiles: $(MOFILES)
125127

@@ -151,10 +153,11 @@ potfile: marked.files docstring.files
151153
(cd ..; $(PROG) -k C_ -p messages -d mailman -D -X messages/marked.files `cat messages/marked.files messages/docstring.files`)
152154

153155
# Update the individual mailman.po files with the new changes to the
154-
# .pot file
156+
# .pot file. Make already checks if mailman.pot is newer, but msgmerge -U
157+
# always updates the file. Use --backup=none to avoid creating backup files.
155158
%/LC_MESSAGES/mailman.po: mailman.pot
156159
@echo "Merging new template file with existing translations"
157-
$(MSGMERGE) -U $@ mailman.pot || touch $@
160+
@$(MSGMERGE) --update --backup=none $@ mailman.pot || touch $@
158161

159162

160163
FORCE:

0 commit comments

Comments
 (0)