Skip to content

Commit 003127c

Browse files
committed
po: simplify xgettext rule
Every time xgettext is run, the generated template has its own POT-Creation-Date field with the runtime timestamp; because of this, the comparison between the existing template and the new one (using `cmp`) always results as "different". Hence, simply run xgettext with the wanted output file, as the result is the same; make use of the automatic make variables to avoid repeating variables in the command invocation.
1 parent 7e3b8d3 commit 003127c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

po/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ POTFILES= ../*.c ../*.h
1212
all: $(PACKAGE).pot $(CATALOGS)
1313

1414
$(PACKAGE).pot: $(POTFILES)
15-
$(XGETTEXT) --default-domain=$(PACKAGE) --add-comments --keyword=_ --keyword=S_ $(POTFILES);
16-
if cmp -s $(PACKAGE).po $(PACKAGE).pot; then \
17-
rm -f $(PACKAGE).po; \
18-
else \
19-
mv $(PACKAGE).po $(PACKAGE).pot; \
20-
fi
15+
$(XGETTEXT) --output=$@ --default-domain=$(PACKAGE) --add-comments --keyword=_ --keyword=S_ $^
2116

2217
clean:
2318
rm -f *mo *~ *.bac

0 commit comments

Comments
 (0)