]> sipb.mit.edu Git - ikiwiki.git/blobdiff - po/Makefile
web commit from 145.97.197.85: poll vote (Accept both)
[ikiwiki.git] / po / Makefile
index cc931c5a8c9693dcd236084e49166a80171af4d4..013cdf26834e9f8679b82ae9e7252b56cff9f6fc 100644 (file)
@@ -5,7 +5,9 @@ POTFILES=$(sort $(shell find ../IkiWiki -type f -name \*.pm)) \
 POFILES=$(wildcard *.po)
 MOFILES=$(POFILES:.po=.mo)
 
-all: ikiwiki.pot $(MOFILES)
+all: ikiwiki.pot mo
+
+mo: $(MOFILES)
 
 install: all
        for file in $(MOFILES); do \
@@ -26,12 +28,12 @@ clean:
 %.mo: %.po
        msgfmt -o $@ $<
 
-%.po: ikiwiki.pot
+%.po:
        @echo -n "Merging ikiwiki.pot and $@"
        @msgmerge $@ ikiwiki.pot -o $@.new 2>&1
-# Typically all that changes was a date. I'd prefer not to commit such
-# changes, so detect and ignore them.
-       @if [ "`diff $@ $@.new | grep '[<>]' | wc -l`" -ne 2 ]; then \
+# Typically all that changes was a date or line number. I'd prefer not to
+# commit such changes, so detect and ignore them.
+       @if [ "`diff $@ $@.new | grep '[<>]' | grep -v '[<>] #:' | wc -l`" -ne 2 ]; then \
                mv -f $@.new $@; \
        else \
                rm -f $@.new; \