Commit e5086bcf authored by Tobias Quathamer's avatar Tobias Quathamer

Do not compare the creation date header for POT files

parent 567f7f61
# Sed script that remove the POT-Creation-Date line in the header entry
# from a POT file.
#
# The distinction between the first and the following occurrences of the
# pattern is achieved by looking at the hold space.
/^"POT-Creation-Date: .*"$/{
x
# Test if the hold space is empty.
s/P/P/
ta
# Yes it was empty. First occurrence. Remove the line.
g
d
bb
:a
# The hold space was nonempty. Following occurrences. Do nothing.
x
:b
}
......@@ -20,8 +20,17 @@ MOSTLYCLEANFILES = \
$(MSGFMT) $(MSGFMT_FLAGS) -o $@ $<
# Generic target to create .pot files from JSON data files
$(DOMAIN).pot: $(top_srcdir)/bin/pot_from_json.py $(top_srcdir)/data/$(DOMAIN).json
$(DOMAIN).pot: $(top_srcdir)/bin/pot_from_json.py $(top_srcdir)/data/$(DOMAIN).json $(top_srcdir)/bin/remove-potcdate.sin
cp $@ backup.pot
python3 $(top_srcdir)/bin/pot_from_json.py $(DOMAIN) $(top_srcdir)/data
sed -f $(top_srcdir)/bin/remove-potcdate.sin < $@ > $(DOMAIN).1po
sed -f $(top_srcdir)/bin/remove-potcdate.sin < backup.pot > $(DOMAIN).2po
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $@ && \
mv backup.pot $@; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po backup.pot; \
fi
# Generic target to create deprecated .xml files from JSON data files
$(DOMAIN).xml: $(top_srcdir)/bin/xml_from_json.py $(top_srcdir)/data/$(DOMAIN).json
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment