From 8739f972e3ab405801b9534bcb3a0441e1499b37 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Sat, 18 Oct 2014 11:46:02 +0000 Subject: [PATCH] Make POT creation rule phony, preventing useless ctime-only changes Also adds an "update-pot" rule to just update the pots, with no merging of the pos (not really useful if not for debugging) git-svn-id: http://svn.osgeo.org/postgis/trunk@13089 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/Makefile.in | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.in b/doc/Makefile.in index 7b710308a..029699353 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -146,8 +146,24 @@ XML_INPUTS = $(XML_SOURCES) $(XML_GENERATED_SOURCES) XML_INPUTS_POT = $(XML_SOURCES:%.xml=po/templates/%.xml.pot) +.PHONY: $(XML_INPUTS_POT) $(XML_INPUTS_POT): po/templates/%.xml.pot: %.xml - $(XML2POT) $< > $@ + @if test -f $@; then \ + $(XML2POT) $< > $@.tmp; \ + changed=`diff $@.tmp $@ | grep -v '^[<>] "POT-Creation-Date:' | wc -l`; \ + if expr $${changed} \> 3 >/dev/null; then \ + echo "$@ updated"; \ + mv $@.tmp $@; \ + else \ + echo "$@ unchanged"; \ + rm $@.tmp; \ + fi; \ + else \ + $(XML2POT) $< > $@; \ + fi; + +# Update translation templates +update-pot: $(XML_INPUTS_POT) # Creates or updates translation files update-po: $(XML_INPUTS_POT) -- 2.40.0