itstool-2.0.2/0000775000076400007640000000000012254211646010226 500000000000000itstool-2.0.2/itstool.in0000775000076400007640000020022012253653163012175 00000000000000#!@PYTHON@ -s # # Copyright (c) 2010-2013 Shaun McCance # # ITS Tool program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # ITS Tool is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with ITS Tool; if not, write to the Free Software Foundation, 59 Temple # Place, Suite 330, Boston, MA 0211-1307 USA. # VERSION="@VERSION@" DATADIR="@DATADIR@" import gettext import hashlib import libxml2 import optparse import os import os.path import re import sys import time NS_ITS = 'http://www.w3.org/2005/11/its' NS_ITST = 'http://itstool.org/extensions/' NS_BLANK = 'http://itstool.org/extensions/blank/' NS_XLINK = 'http://www.w3.org/1999/xlink' NS_XML = 'http://www.w3.org/XML/1998/namespace' class NoneTranslations: def gettext(self, message): return None def lgettext(self, message): return None def ngettext(self, msgid1, msgid2, n): return None def lngettext(self, msgid1, msgid2, n): return None def ugettext(self, message): return None def ungettext(self, msgid1, msgid2, n): return None class MessageList (object): def __init__ (self): self._messages = [] self._by_node = {} self._has_credits = False def add_message (self, message, node): self._messages.append (message) if node is not None: self._by_node[node] = message def add_credits(self): if self._has_credits: return msg = Message() msg.set_context('_') msg.add_text('translator-credits') msg.add_comment(Comment('Put one translator per line, in the form NAME , YEAR1, YEAR2')) self._messages.append(msg) self._has_credits = True def get_message_by_node (self, node): return self._by_node.get(node, None) def get_nodes_with_messages (self): return self._by_node.keys() def output (self, out): msgs = [] msgdict = {} for msg in self._messages: key = (msg.get_context(), msg.get_string()) if msgdict.has_key(key): for source in msg.get_sources(): msgdict[key].add_source(source) for marker in msg.get_markers(): msgdict[key].add_marker(marker) for comment in msg.get_comments(): msgdict[key].add_comment(comment) for idvalue in msg.get_id_values(): msgdict[key].add_id_value(idvalue) if msg.get_preserve_space(): msgdict[key].set_preserve_space() if msg.get_locale_filter() is not None: locale = msgdict[key].get_locale_filter() if locale is not None: msgdict[key].set_locale_filter('%s, %s' % (locale, msg.get_locale_filter())) else: msgdict[key].set_locale_filter(msg.get_locale_filter()) else: msgs.append(msg) msgdict[key] = msg out.write('msgid ""\n') out.write('msgstr ""\n') out.write('"Project-Id-Version: PACKAGE VERSION\\n"\n') out.write('"POT-Creation-Date: %s\\n"\n' % time.strftime("%Y-%m-%d %H:%M%z")) out.write('"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"\n') out.write('"Last-Translator: FULL NAME \\n"\n') out.write('"Language-Team: LANGUAGE \\n"\n') out.write('"MIME-Version: 1.0\\n"\n') out.write('"Content-Type: text/plain; charset=UTF-8\\n"\n') out.write('"Content-Transfer-Encoding: 8bit\\n"\n') out.write('\n') for msg in msgs: out.write(msg.format().encode('utf-8')) out.write('\n') class Comment (object): def __init__ (self, text): self._text = str(text) assert(text is not None) self._markers = [] def add_marker (self, marker): self._markers.append(marker) def get_markers (self): return self._markers def get_text (self): return self._text def format (self): ret = u'' markers = {} for marker in self._markers: if not markers.has_key(marker): ret += '#. (itstool) comment: ' + marker + '\n' markers[marker] = marker if '\n' in self._text: doadd = False for line in self._text.split('\n'): if line != '': doadd = True if not doadd: continue ret += u'#. %s\n' % line else: text = self._text while len(text) > 72: j = text.rfind(' ', 0, 72) if j == -1: j = text.find(' ') if j == -1: break ret += u'#. %s\n' % text[:j] text = text[j+1:] ret += '#. %s\n' % text return ret class Message (object): def __init__ (self): self._message = [] self._empty = True self._ctxt = None self._placeholders = [] self._sources = [] self._markers = [] self._id_values = [] self._locale_filter = None self._comments = [] self._preserve = False def __repr__(self): if self._empty: return "Empty message" return self.get_string() class Placeholder (object): def __init__ (self, node): self.node = node self.name = unicode(node.name, 'utf-8') def escape (self, text): return text.replace('\\','\\\\').replace('"', "\\\"").replace("\n","\\n").replace("\t","\\t") def add_text (self, text): if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)): self._message.append('') if not isinstance(text, unicode): text = unicode(text, 'utf-8') self._message[-1] += text.replace('&', '&').replace('<', '<').replace('>', '>') if re.sub('\s+', ' ', text).strip() != '': self._empty = False def add_entity_ref (self, name): self._message.append('&' + name + ';') self._empty = False def add_placeholder (self, node): holder = Message.Placeholder(node) self._placeholders.append(holder) self._message.append(holder) def get_placeholder (self, name): placeholder = 1 for holder in self._placeholders: holdername = u'%s-%i' % (holder.name, placeholder) if holdername == unicode(name, 'utf-8'): return holder placeholder += 1 def add_start_tag (self, node): if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)): self._message.append('') if node.ns() is not None and node.ns().name is not None: self._message[-1] += (u'<%s:%s' % (unicode(node.ns().name, 'utf-8'), unicode(node.name, 'utf-8'))) else: self._message[-1] += (u'<%s' % unicode(node.name, 'utf-8')) for prop in xml_attr_iter(node): name = prop.name if prop.ns() is not None: name = prop.ns().name + ':' + name atval = prop.content if not isinstance(atval, unicode): atval = unicode(atval, 'utf-8') atval = atval.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"') self._message += " %s=\"%s\"" % (name, atval) if node.children is not None: self._message[-1] += '>' else: self._message[-1] += '/>' def add_end_tag (self, node): if node.children is not None: if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)): self._message.append('') if node.ns() is not None and node.ns().name is not None: self._message[-1] += (u'' % (unicode(node.ns().name, 'utf-8'), unicode(node.name, 'utf-8'))) else: self._message[-1] += (u'' % unicode(node.name, 'utf-8')) def is_empty (self): return self._empty def get_context (self): return self._ctxt def set_context (self, ctxt): self._ctxt = ctxt def add_source (self, source): if not isinstance(source, unicode): source = unicode(source, 'utf-8') self._sources.append(source) def get_sources (self): return self._sources def add_marker (self, marker): if not isinstance(marker, unicode): marker = unicode(marker, 'utf-8') self._markers.append(marker) def get_markers (self): return self._markers def add_id_value(self, id_value): self._id_values.append(id_value) def get_id_values(self): return self._id_values def add_comment (self, comment): if comment is not None: self._comments.append(comment) def get_comments (self): return self._comments def get_string (self): message = u'' placeholder = 1 for msg in self._message: if isinstance(msg, basestring): message += msg elif isinstance(msg, Message.Placeholder): message += u'<_:%s-%i/>' % (msg.name, placeholder) placeholder += 1 if not self._preserve: message = re.sub('\s+', ' ', message).strip() return message def get_preserve_space (self): return self._preserve def set_preserve_space (self, preserve=True): self._preserve = preserve def get_locale_filter(self): return self._locale_filter def set_locale_filter(self, locale): self._locale_filter = locale def format (self): ret = u'' markers = {} for marker in self._markers: if not markers.has_key(marker): ret += '#. (itstool) path: ' + marker + '\n' markers[marker] = marker for idvalue in self._id_values: ret += '#. (itstool) id: ' + idvalue + '\n' if self._locale_filter is not None: ret += '#. (itstool) ' + self._locale_filter[1] + ' locale: ' + self._locale_filter[0] + '\n' comments = [] commentsdict = {} for comment in self._comments: key = comment.get_text() if commentsdict.has_key(key): for marker in comment.get_markers(): commentsdict[key].add_marker(marker) else: comments.append(comment) commentsdict[key] = comment for i in range(len(comments)): if i != 0: ret += '#.\n' ret += comments[i].format() for source in self._sources: ret += u'#: %s\n' % source if self._preserve: ret += u'#, no-wrap\n' if self._ctxt is not None: ret += u'msgctxt "%s"\n' % self._ctxt message = self.get_string() if self._preserve: ret += u'msgid ""\n' lines = message.split('\n') for line, no in zip(lines, range(len(lines))): if no == len(lines) - 1: ret += u'"%s"\n' % self.escape(line) else: ret += u'"%s\\n"\n' % self.escape(line) else: ret += u'msgid "%s"\n' % self.escape(message) ret += u'msgstr ""\n' return ret def xml_child_iter (node): child = node.children while child is not None: yield child child = child.next def xml_attr_iter (node): attr = node.get_properties() while attr is not None: yield attr attr = attr.next def xml_is_ns_name (node, ns, name): if node.type != 'element': return False return node.name == name and node.ns() is not None and node.ns().content == ns def xml_get_node_path(node): # The built-in nodePath() method only does numeric indexes # when necessary for disambiguation. For various reasons, # we prefer always using indexes. name = node.name if node.ns() is not None and node.ns().name is not None: name = node.ns().name + ':' + name if node.type == 'attribute': name = '@' + name name = '/' + name if node.type == 'element' and node.parent.type == 'element': count = 1 prev = node.previousElementSibling() while prev is not None: if prev.name == node.name: if prev.ns() is None: if node.ns() is None: count += 1 else: if node.ns() is not None: if prev.ns().name == node.ns().name: count += 1 prev = prev.previousElementSibling() name = '%s[%i]' % (name, count) if node.parent.type == 'element': name = xml_get_node_path(node.parent) + name return name def xml_error_catcher(doc, error): doc._xml_err += " %s" % error def fix_node_ns (node, nsdefs): childnsdefs = nsdefs.copy() nsdef = node.nsDefs() while nsdef is not None: nextnsdef = nsdef.next if nsdefs.has_key(nsdef.name) and nsdefs[nsdef.name] == nsdef.content: node.removeNsDef(nsdef.content) else: childnsdefs[nsdef.name] = nsdef.content nsdef = nextnsdef for child in xml_child_iter(node): if child.type == 'element': fix_node_ns(child, childnsdefs) class LocNote (object): def __init__(self, locnote=None, locnoteref=None, locnotetype=None, space=False): self.locnote = locnote self.locnoteref = locnoteref self.locnotetype = locnotetype if self.locnotetype != 'alert': self.locnotetype = 'description' self._preserve_space=space def __repr__(self): if self.locnote is not None: if self._preserve_space: return self.locnote else: return re.sub('\s+', ' ', self.locnote).strip() elif self.locnoteref is not None: return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip() return '' class Document (object): def __init__ (self, filename, messages, load_dtd=False, keep_entities=False): self._xml_err = '' libxml2.registerErrorHandler(xml_error_catcher, self) try: ctxt = libxml2.createFileParserCtxt(filename) except: sys.stderr.write('Error: cannot open XML file %s\n' % filename) sys.exit(1) ctxt.lineNumbers(1) self._load_dtd = load_dtd self._keep_entities = keep_entities if load_dtd: ctxt.loadSubset(1) if keep_entities: ctxt.replaceEntities(0) else: ctxt.replaceEntities(1) ctxt.parseDocument() self._filename = filename self._doc = ctxt.doc() self._localrules = [] def pre_process (node): for child in xml_child_iter(node): if xml_is_ns_name(child, 'http://www.w3.org/2001/XInclude', 'include'): if child.nsProp('parse', None) == 'text': child.xincludeProcessTree() elif xml_is_ns_name(child, NS_ITS, 'rules'): if child.hasNsProp('href', NS_XLINK): href = child.nsProp('href', NS_XLINK) href = os.path.join(os.path.dirname(filename), href) hctxt = libxml2.createFileParserCtxt(href) hctxt.replaceEntities(1) hctxt.parseDocument() root = hctxt.doc().getRootElement() version = None if root.hasNsProp('version', None): version = root.nsProp('version', None) else: sys.stderr.write('Warning: ITS file %s missing version attribute\n' % os.path.basename(href)) if version is not None and version not in ('1.0', '2.0'): sys.stderr.write('Warning: Skipping ITS file %s with unknown version %s\n' % (os.path.basename(href), root.nsProp('version', None))) else: self._localrules.append(root) version = None if child.hasNsProp('version', None): version = child.nsProp('version', None) else: root = child.doc.getRootElement() if root.hasNsProp('version', NS_ITS): version = root.nsProp('version', NS_ITS) else: sys.stderr.write('Warning: Local ITS rules missing version attribute\n') if version is not None and version not in ('1.0', '2.0'): sys.stderr.write('Warning: Skipping local ITS rules with unknown version %s\n' % version) else: self._localrules.append(child) pre_process(child) pre_process(self._doc) try: self._check_errors() except libxml2.parserError as e: sys.stderr.write('Error: Could not parse document:\n%s\n' % str(e)) sys.exit(1) self._msgs = messages self._its_translate_nodes = {} self._its_within_text_nodes = {} self._its_locale_filters = {} self._its_id_values = {} self._its_loc_notes = {} self._its_preserve_space_nodes = {} self._itst_drop_nodes = {} self._itst_contexts = {} self._its_lang = {} self._itst_lang_attr = {} self._itst_credits = None self._its_externals = {} def _check_errors(self): if self._xml_err: raise libxml2.parserError(self._xml_err) def register_its_params(self, xpath, rules, params={}): for child in xml_child_iter(rules): if xml_is_ns_name(child, NS_ITS, 'param'): name = child.nsProp('name', None) if params.has_key(name): value = params[name] else: value = child.getContent() xpath.xpathRegisterVariable(name, None, value) def apply_its_rule(self, rule, xpath): if rule.type != 'element': return if xml_is_ns_name(rule, NS_ITS, 'translateRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_translate_nodes[node] = rule.nsProp('translate', None) elif xml_is_ns_name(rule, NS_ITS, 'withinTextRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_within_text_nodes[node] = rule.nsProp('withinText', None) elif xml_is_ns_name(rule, NS_ITST, 'preserveSpaceRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): val = rule.nsProp('preserveSpace', None) if val == 'yes': self._its_preserve_space_nodes[node] = 'preserve' elif xml_is_ns_name(rule, NS_ITS, 'preserveSpaceRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_preserve_space_nodes[node] = rule.nsProp('space', None) elif xml_is_ns_name(rule, NS_ITS, 'localeFilterRule'): if rule.nsProp('selector', None) is not None: if rule.hasNsProp('localeFilterList', None): lst = rule.nsProp('localeFilterList', None) else: lst = '*' if rule.hasNsProp('localeFilterType', None): typ = rule.nsProp('localeFilterType', None) else: typ = 'include' for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_locale_filters[node] = (lst, typ) elif xml_is_ns_name(rule, NS_ITST, 'dropRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._itst_drop_nodes[node] = rule.nsProp('drop', None) elif xml_is_ns_name(rule, NS_ITS, 'idValueRule'): sel = rule.nsProp('selector', None) idv = rule.nsProp('idValue', None) if sel is not None and idv is not None: for node in self._try_xpath_eval(xpath, sel): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) idvalue = self._try_xpath_eval(xpath, idv) if isinstance(idvalue, basestring): self._its_id_values[node] = idvalue else: for val in idvalue: self._its_id_values[node] = val.content break xpath.setContextNode(oldnode) pass elif xml_is_ns_name(rule, NS_ITST, 'contextRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): if rule.hasNsProp('context', None): self._itst_contexts[node] = rule.nsProp('context', None) elif rule.hasNsProp('contextPointer', None): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) ctxt = self._try_xpath_eval(xpath, rule.nsProp('contextPointer', None)) if isinstance(ctxt, basestring): self._itst_contexts[node] = ctxt else: for ctxt in ctxt: self._itst_contexts[node] = ctxt.content break xpath.setContextNode(oldnode) elif xml_is_ns_name(rule, NS_ITS, 'locNoteRule'): locnote = None notetype = rule.nsProp('locNoteType', None) for child in xml_child_iter(rule): if xml_is_ns_name(child, NS_ITS, 'locNote'): locnote = LocNote(locnote=child.content, locnotetype=notetype) break if locnote is None: if rule.hasNsProp('locNoteRef', None): locnote = LocNote(locnoteref=rule.nsProp('locNoteRef', None), locnotetype=notetype) if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): if locnote is not None: self._its_loc_notes.setdefault(node, []).append(locnote) else: if rule.hasNsProp('locNotePointer', None): sel = rule.nsProp('locNotePointer', None) ref = False elif rule.hasNsProp('locNoteRefPointer', None): sel = rule.nsProp('locNoteRefPointer', None) ref = True else: continue try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) note = self._try_xpath_eval(xpath, sel) if isinstance(note, basestring): if ref: nodenote = LocNote(locnoteref=note, locnotetype=notetype) else: nodenote = LocNote(locnote=note, locnotetype=notetype) self._its_loc_notes.setdefault(node, []).append(nodenote) else: for note in note: if ref: nodenote = LocNote(locnoteref=note.content, locnotetype=notetype) else: nodenote = LocNote(locnote=note.content, locnotetype=notetype, space=self.get_preserve_space(note)) self._its_loc_notes.setdefault(node, []).append(nodenote) break xpath.setContextNode(oldnode) elif xml_is_ns_name(rule, NS_ITS, 'langRule'): if rule.nsProp('selector', None) is not None and rule.nsProp('langPointer', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) res = self._try_xpath_eval(xpath, rule.nsProp('langPointer', None)) if len(res) > 0: self._its_lang[node] = res[0].content # We need to construct language attributes, not just read # language information. Technically, langPointer could be # any XPath expression. But if it looks like an attribute # accessor, just use the attribute name. if rule.nsProp('langPointer', None)[0] == '@': self._itst_lang_attr[node] = rule.nsProp('langPointer', None)[1:] xpath.setContextNode(oldnode) elif xml_is_ns_name(rule, NS_ITST, 'credits'): if rule.nsProp('appendTo', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('appendTo', None)): self._itst_credits = (node, rule) break elif (xml_is_ns_name(rule, NS_ITS, 'externalResourceRefRule') or xml_is_ns_name(rule, NS_ITST, 'externalRefRule')): sel = rule.nsProp('selector', None) if xml_is_ns_name(rule, NS_ITS, 'externalResourceRefRule'): ptr = rule.nsProp('externalResourceRefPointer', None) else: ptr = rule.nsProp('refPointer', None) if sel is not None and ptr is not None: for node in self._try_xpath_eval(xpath, sel): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) res = self._try_xpath_eval(xpath, ptr) if len(res) > 0: self._its_externals[node] = res[0].content xpath.setContextNode(oldnode) def apply_its_rules(self, builtins, params={}): if builtins: dirs = [] ddir = os.getenv('XDG_DATA_HOME', '') if ddir == '': ddir = os.path.join(os.path.expanduser('~'), '.local', 'share') dirs.append(ddir) ddir = os.getenv('XDG_DATA_DIRS', '') if ddir == '': if DATADIR not in ('/usr/local/share', '/usr/share'): ddir += DATADIR + ':' ddir += '/usr/local/share:/usr/share' dirs.extend(ddir.split(':')) ddone = {} for ddir in dirs: itsdir = os.path.join(ddir, 'itstool', 'its') if not os.path.exists(itsdir): continue for dfile in os.listdir(itsdir): if dfile.endswith('.its'): if not ddone.get(dfile, False): self.apply_its_file(os.path.join(itsdir, dfile), params=params) ddone[dfile] = True self.apply_local_its_rules(params=params) def apply_its_file(self, filename, params={}): doc = libxml2.parseFile(filename) root = doc.getRootElement() if not xml_is_ns_name(root, NS_ITS, 'rules'): return version = None if root.hasNsProp('version', None): version = root.nsProp('version', None) else: sys.stderr.write('Warning: ITS file %s missing version attribute\n' % os.path.basename(filename)) if version is not None and version not in ('1.0', '2.0'): sys.stderr.write('Warning: Skipping ITS file %s with unknown version %s\n' % (os.path.basename(filename), root.nsProp('version', None))) return matched = True for match in xml_child_iter(root): if xml_is_ns_name(match, NS_ITST, 'match'): matched = False xpath = self._doc.xpathNewContext() par = match nss = {} while par is not None: nsdef = par.nsDefs() while nsdef is not None: if nsdef.name is not None: if not nss.has_key(nsdef.name): nss[nsdef.name] = nsdef.content xpath.xpathRegisterNs(nsdef.name, nsdef.content) nsdef = nsdef.next par = par.parent if match.hasNsProp('selector', None): if len(self._try_xpath_eval(xpath, match.nsProp('selector', None))) > 0: matched = True break if matched == False: return for rule in xml_child_iter(root): xpath = self._doc.xpathNewContext() par = match nss = {} while par is not None: nsdef = par.nsDefs() while nsdef is not None: if nsdef.name is not None: if not nss.has_key(nsdef.name): nss[nsdef.name] = nsdef.content xpath.xpathRegisterNs(nsdef.name, nsdef.content) nsdef = nsdef.next par = par.parent self.register_its_params(xpath, root, params=params) self.apply_its_rule(rule, xpath) def apply_local_its_rules(self, params={}): for rules in self._localrules: def reg_ns(xpath, node): if node.parent is not None: reg_ns(xpath, node.parent) nsdef = node.nsDefs() while nsdef is not None: if nsdef.name is not None: xpath.xpathRegisterNs(nsdef.name, nsdef.content) nsdef = nsdef.next xpath = self._doc.xpathNewContext() reg_ns(xpath, rules) self.register_its_params(xpath, rules, params=params) for rule in xml_child_iter(rules): if rule.type != 'element': continue if rule.nsDefs() is not None: rule_xpath = self._doc.xpathNewContext() reg_ns(rule_xpath, rule) self.register_its_params(rule_xpath, rules, params=params) else: rule_xpath = xpath self.apply_its_rule(rule, rule_xpath) def _append_credits(self, parent, node, trdata): if xml_is_ns_name(node, NS_ITST, 'for-each'): select = node.nsProp('select', None) if select == 'years': for year in trdata[2].split(','): for child in xml_child_iter(node): self._append_credits(parent, child, trdata + (year.strip(),)) elif xml_is_ns_name(node, NS_ITST, 'value-of'): select = node.nsProp('select', None) val = None if select == 'name': val = trdata[0] elif select == 'email': val = trdata[1] elif select == 'years': val = trdata[2] elif select == 'year' and len(trdata) == 4: val = trdata[3] if val is not None: val = val.encode('utf-8') parent.addContent(val) else: newnode = node.copyNode(2) parent.addChild(newnode) for child in xml_child_iter(node): self._append_credits(newnode, child, trdata) def merge_credits(self, translations, language, node): if self._itst_credits is None: return # Dear Python, please implement pgettext. # http://bugs.python.org/issue2504 # Sincerely, Shaun trans = translations.ugettext('_\x04translator-credits') if trans is None or trans == 'translator-credits': return regex = re.compile('(.*) \<(.*)\>, (.*)') for credit in trans.split('\n'): match = regex.match(credit) if not match: continue trdata = match.groups() for node in xml_child_iter(self._itst_credits[1]): self._append_credits(self._itst_credits[0], node, trdata) def join_translations(self, translations, node=None, strict=False): is_root = False if node is None: is_root = True self.generate_messages(comments=False) node = self._doc.getRootElement() if node is None or node.type != 'element': return if self.get_itst_drop(node) == 'yes': prev = node.prev node.unlinkNode() node.freeNode() if prev is not None and prev.isBlankNode(): prev.unlinkNode() prev.freeNode() return msg = self._msgs.get_message_by_node(node) if msg is None: self.translate_attrs(node, node) children = [child for child in xml_child_iter(node)] for child in children: self.join_translations(translations, node=child, strict=strict) else: prevnode = None if node.prev is not None and node.prev.type == 'text': prevtext = node.prev.content if re.sub('\s+', '', prevtext) == '': prevnode = node.prev for lang in sorted(translations.keys(), reverse=True): locale = self.get_its_locale_filter(node) lmatch = match_locale_list(locale[0], lang) if (locale[1] == 'include' and not lmatch) or (locale[1] == 'exclude' and lmatch): continue newnode = self.get_translated(node, translations[lang], strict=strict, lang=lang) if newnode != node: newnode.setProp('xml:lang', lang) node.addNextSibling(newnode) if prevnode is not None: node.addNextSibling(prevnode.copyNode(0)) if is_root: # Because of the way we create nodes and rewrite the document, # we end up with lots of redundant namespace definitions. We # kill them off in one fell swoop at the end. fix_node_ns(node, {}) self._check_errors() def merge_translations(self, translations, language, node=None, strict=False): is_root = False if node is None: is_root = True self.generate_messages(comments=False) node = self._doc.getRootElement() if node is None or node.type != 'element': return drop = False locale = self.get_its_locale_filter(node) if locale[1] == 'include': if locale[0] != '*': if not match_locale_list(locale[0], language): drop = True elif locale[1] == 'exclude': if match_locale_list(locale[0], language): drop = True if self.get_itst_drop(node) == 'yes' or drop: prev = node.prev node.unlinkNode() node.freeNode() if prev is not None and prev.isBlankNode(): prev.unlinkNode() prev.freeNode() return if is_root: self.merge_credits(translations, language, node) msg = self._msgs.get_message_by_node(node) if msg is None: self.translate_attrs(node, node) children = [child for child in xml_child_iter(node)] for child in children: self.merge_translations(translations, language, node=child, strict=strict) else: newnode = self.get_translated(node, translations, strict=strict, lang=language) if newnode != node: self.translate_attrs(node, newnode) node.replaceNode(newnode) if is_root: # Apply language attributes to untranslated nodes. We don't do # this before processing, because then these attributes would # be copied into the new nodes. We apply the attribute without # checking whether it was translated, because any that were will # just be floating around, unattached to a document. for lcnode in self._msgs.get_nodes_with_messages(): attr = self._itst_lang_attr.get(lcnode) if attr is None: continue origlang = None lcpar = lcnode while lcpar is not None: origlang = self._its_lang.get(lcpar) if origlang is not None: break lcpar = lcpar.parent if origlang is not None: lcnode.setProp(attr, origlang) # And then set the language attribute on the root node. if language is not None: attr = self._itst_lang_attr.get(node) if attr is not None: node.setProp(attr, language) # Because of the way we create nodes and rewrite the document, # we end up with lots of redundant namespace definitions. We # kill them off in one fell swoop at the end. fix_node_ns(node, {}) self._check_errors() def translate_attrs(self, oldnode, newnode): trans_attrs = [attr for attr in xml_attr_iter(oldnode) if self._its_translate_nodes.get(attr, 'no') == 'yes'] for attr in trans_attrs: newcontent = translations.ugettext(attr.get_content()) if newcontent: newnode.setProp(attr.name, translations.ugettext(attr.get_content())) def get_translated (self, node, translations, strict=False, lang=None): msg = self._msgs.get_message_by_node(node) if msg is None: return node msgstr = msg.get_string() # Dear Python, please implement pgettext. # http://bugs.python.org/issue2504 # Sincerely, Shaun if msg.get_context() is not None: msgstr = msg.get_context() + '\x04' + msgstr trans = translations.ugettext(msgstr) if trans is None: return node nss = {} def reg_ns(node, nss): if node.parent is not None: reg_ns(node.parent, nss) nsdef = node.nsDefs() while nsdef is not None: nss[nsdef.name] = nsdef.content nsdef = nsdef.next reg_ns(node, nss) nss['_'] = NS_BLANK try: blurb = node.doc.intSubset().serialize('utf-8') except: blurb = '' blurb += '<' + node.name for nsname in nss.keys(): if nsname is None: blurb += ' xmlns="%s"' % nss[nsname] else: blurb += ' xmlns:%s="%s"' % (nsname, nss[nsname]) blurb += '>%s' % (trans.encode('utf-8'), node.name) ctxt = libxml2.createDocParserCtxt(blurb) if self._load_dtd: ctxt.loadSubset(1) ctxt.replaceEntities(0) ctxt.parseDocument() trnode = ctxt.doc().getRootElement() try: self._check_errors() except libxml2.parserError as e: if strict: raise else: sys.stderr.write('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( (lang + ' ') if lang is not None else '', msgstr.encode('utf-8'))) self._xml_err = '' return node def scan_node(node): children = [child for child in xml_child_iter(node)] for child in children: if child.type != 'element': continue if child.ns() is not None and child.ns().content == NS_BLANK: ph_node = msg.get_placeholder(child.name).node if self.has_child_elements(ph_node): self.merge_translations(translations, None, ph_node, strict=strict) child.replaceNode(ph_node) else: repl = self.get_translated(ph_node, translations, strict=strict, lang=lang) child.replaceNode(repl) scan_node(child) scan_node(trnode) retnode = node.copyNode(2) for child in xml_child_iter(trnode): retnode.addChild(child.copyNode(1)) return retnode def generate_messages(self, comments=True): if self._itst_credits is not None: self._msgs.add_credits() for child in xml_child_iter(self._doc): if child.type == 'element': self.generate_message(child, None, comments=comments) break def generate_message (self, node, msg, comments=True, path=None): if node.type in ('text', 'cdata') and msg is not None: msg.add_text(node.content) return if node.type == 'entity_ref': msg.add_entity_ref(node.name); if node.type != 'element': return if node.hasNsProp('drop', NS_ITST) and node.nsProp('drop', NS_ITST) == 'yes': return if self._itst_drop_nodes.get(node, 'no') == 'yes': return locfil = self.get_its_locale_filter(node) if locfil == ('', 'include') or locfil == ('*', 'exclude'): return if path is None: path = '' translate = self.get_its_translate(node) withinText = False if translate == 'no': if msg is not None: msg.add_placeholder(node) is_unit = False msg = None else: is_unit = msg is None or self.is_translation_unit(node) if is_unit: if msg is not None: msg.add_placeholder(node) msg = Message() ctxt = None if node.hasNsProp('context', NS_ITST): ctxt = node.nsProp('context', NS_ITST) if ctxt is None: ctxt = self._itst_contexts.get(node) if ctxt is not None: msg.set_context(ctxt) idvalue = self.get_its_id_value(node) if idvalue is not None: basename = os.path.basename(self._filename) msg.add_id_value(basename + '#' + idvalue) if self.get_preserve_space(node): msg.set_preserve_space() if self.get_its_locale_filter(node) != ('*', 'include'): msg.set_locale_filter(self.get_its_locale_filter(node)) msg.add_source('%s:%i' % (self._doc.name, node.lineNo())) msg.add_marker('%s/%s' % (node.parent.name, node.name)) else: withinText = True msg.add_start_tag(node) if not withinText: # Add msg for translatable node attributes for attr in xml_attr_iter(node): if self._its_translate_nodes.get(attr, 'no') == 'yes': attr_msg = Message() attr_msg.add_source('%s:%i' % (self._doc.name, node.lineNo())) attr_msg.add_marker('%s/%s@%s' % (node.parent.name, node.name, attr.name)) attr_msg.add_text(attr.content) if comments: for locnote in self.get_its_loc_notes(attr): comment = Comment(locnote) comment.add_marker ('%s/%s@%s' % ( node.parent.name, node.name, attr.name)) attr_msg.add_comment(comment) self._msgs.add_message(attr_msg, attr) if comments and msg is not None: cnode = node while cnode is not None: hasnote = False for locnote in self.get_its_loc_notes(cnode, inherit=(not withinText)): comment = Comment(locnote) if withinText: comment.add_marker('.%s/%s' % (path, cnode.name)) msg.add_comment(comment) hasnote = True if hasnote or not is_unit: break cnode = cnode.parent self.generate_external_resource_message(node) for attr in xml_attr_iter(node): self.generate_external_resource_message(attr) idvalue = self.get_its_id_value(attr) if idvalue is not None: basename = os.path.basename(self._filename) msg.add_id_value(basename + '#' + idvalue) if withinText: path = path + '/' + node.name for child in xml_child_iter(node): self.generate_message(child, msg, comments=comments, path=path) if translate: if is_unit and not msg.is_empty(): self._msgs.add_message(msg, node) elif msg is not None: msg.add_end_tag(node) def generate_external_resource_message(self, node): if not self._its_externals.has_key(node): return resref = self._its_externals[node] if node.type == 'element': translate = self.get_its_translate(node) marker = '%s/%s' % (node.parent.name, node.name) else: translate = self.get_its_translate(node.parent) marker = '%s/%s/@%s' % (node.parent.parent.name, node.parent.name, node.name) if translate == 'no': return msg = Message() try: fullfile = os.path.join(os.path.dirname(self._filename), resref) filefp = open(fullfile) filemd5 = hashlib.md5(filefp.read()).hexdigest() filefp.close() except: filemd5 = '__failed__' txt = "external ref='%s' md5='%s'" % (resref, filemd5) msg.set_context('_') msg.add_text(txt) msg.add_source('%s:%i' % (self._doc.name, node.lineNo())) msg.add_marker(marker) msg.add_comment(Comment('This is a reference to an external file such as an image or' ' video. When the file changes, the md5 hash will change to' ' let you know you need to update your localized copy. The' ' msgstr is not used at all. Set it to whatever you like' ' once you have updated your copy of the file.')) self._msgs.add_message(msg, None) def is_translation_unit (self, node): return self.get_its_within_text(node) != 'yes' def has_child_elements(self, node): return len([child for child in xml_child_iter(node) if child.type=='element']) def get_preserve_space (self, node): while node.type in ('attribute', 'element'): if node.getSpacePreserve() == 1: return True if self._its_preserve_space_nodes.has_key(node): return (self._its_preserve_space_nodes[node] == 'preserve') node = node.parent return False def get_its_translate(self, node): val = None if node.hasNsProp('translate', NS_ITS): val = node.nsProp('translate', NS_ITS) elif xml_is_ns_name(node, NS_ITS, 'span') and node.hasNsProp('translate', None): val = node.nsProp('translate', None) elif self._its_translate_nodes.has_key(node): val = self._its_translate_nodes[node] if val is not None: return val if node.type == 'attribute': return 'no' if node.parent.type == 'element': return self.get_its_translate(node.parent) return 'yes' def get_its_within_text(self, node): if node.hasNsProp('withinText', NS_ITS): val = node.nsProp('withinText', NS_ITS) elif xml_is_ns_name(node, NS_ITS, 'span') and node.hasNsProp('withinText', None): val = node.nsProp('withinText', None) else: return self._its_within_text_nodes.get(node, 'no') if val in ('yes', 'nested'): return val return 'no' def get_its_locale_filter(self, node): if node.hasNsProp('localeFilterList', NS_ITS) or node.hasNsProp('localeFilterType', NS_ITS): if node.hasNsProp('localeFilterList', NS_ITS): lst = node.nsProp('localeFilterList', NS_ITS) else: lst = '*' if node.hasNsProp('localeFilterType', NS_ITS): typ = node.nsProp('localeFilterType', NS_ITS) else: typ = 'include' return (lst, typ) if (xml_is_ns_name(node, NS_ITS, 'span') and (node.hasNsProp('localeFilterList', None) or node.hasNsProp('localeFilterType', None))): if node.hasNsProp('localeFilterList', None): lst = node.nsProp('localeFilterList', None) else: lst = '*' if node.hasNsProp('localeFilterType', None): typ = node.nsProp('localeFilterType', None) else: typ = 'include' return (lst, typ) if self._its_locale_filters.has_key(node): return self._its_locale_filters[node] if node.parent.type == 'element': return self.get_its_locale_filter(node.parent) return ('*', 'include') def get_itst_drop(self, node): if node.hasNsProp('drop', NS_ITST) and node.nsProp('drop', NS_ITST) == 'yes': return 'yes' if self._itst_drop_nodes.get(node, 'no') == 'yes': return 'yes' return 'no' def get_its_id_value(self, node): if node.hasNsProp('id', NS_XML): return node.nsProp('id', NS_XML) return self._its_id_values.get(node, None) def get_its_loc_notes(self, node, inherit=True): ret = [] if node.hasNsProp('locNote', NS_ITS) or node.hasNsProp('locNoteRef', NS_ITS) or node.hasNsProp('locNoteType', NS_ITS): notetype = node.nsProp('locNoteType', NS_ITS) if node.hasNsProp('locNote', NS_ITS): ret.append(LocNote(locnote=node.nsProp('locNote', NS_ITS), locnotetype=notetype)) elif node.hasNsProp('locNoteRef', NS_ITS): ret.append(LocNote(locnoteref=node.nsProp('locNoteRef', NS_ITS), locnotetype=notetype)) elif xml_is_ns_name(node, NS_ITS, 'span'): if node.hasNsProp('locNote', None) or node.hasNsProp('locNoteRef', None) or node.hasNsProp('locNoteType', None): notetype = node.nsProp('locNoteType', None) if node.hasNsProp('locNote', None): ret.append(LocNote(locnote=node.nsProp('locNote', None), locnotetype=notetype)) elif node.hasNsProp('locNoteRef', None): ret.append(LocNote(locnoteref=node.nsProp('locNoteRef', None), locnotetype=notetype)) for locnote in reversed(self._its_loc_notes.get(node, [])): ret.append(locnote) if (len(ret) == 0 and inherit and node.type != 'attribute' and node.parent is not None and node.parent.type == 'element'): return self.get_its_loc_notes(node.parent) return ret def output_test_data(self, category, out, node=None): if node is None: node = self._doc.getRootElement() compval = '' if category == 'translate': compval = 'translate="%s"' % self.get_its_translate(node) elif category == 'withinText': if node.type != 'attribute': compval = 'withinText="%s"' % self.get_its_within_text(node) elif category == 'localeFilter': compval = 'localeFilterList="%s"\tlocaleFilterType="%s"' % self.get_its_locale_filter(node) elif category == 'locNote': val = self.get_its_loc_notes(node) if len(val) > 0: if val[0].locnote is not None: compval = 'locNote="%s"\tlocNoteType="%s"' % (str(val[0]), val[0].locnotetype) elif val[0].locnoteref is not None: compval = 'locNoteRef="%s"\tlocNoteType="%s"' % (val[0].locnoteref, val[0].locnotetype) elif category == 'externalResourceRef': val = self._its_externals.get(node, '') if val != '': compval = 'externalResourceRef="%s"' % val elif category == 'idValue': val = self.get_its_id_value(node) if val is not None: compval = 'idValue="%s"' % val elif category == 'preserveSpace': if self.get_preserve_space(node): compval = 'space="preserve"' else: compval = 'space="default"' else: sys.stderr.write('Error: Unrecognized category %s\n' % category) sys.exit(1) if compval != '': out.write('%s\t%s\r\n' % (xml_get_node_path(node), compval)) else: out.write('%s\r\n' % (xml_get_node_path(node))) for attr in sorted(xml_attr_iter(node), lambda x, y: cmp(str(x), str(y))): self.output_test_data(category, out, attr) for child in xml_child_iter(node): if child.type == 'element': self.output_test_data(category, out, child) @staticmethod def _try_xpath_eval (xpath, expr): try: return xpath.xpathEval(expr) except: sys.stderr.write('Warning: Invalid XPath: %s\n' % expr) return [] def match_locale_list(extranges, locale): if extranges.strip() == '': return False for extrange in [extrange.strip() for extrange in extranges.split(',')]: if match_locale(extrange, locale): return True return False def match_locale(extrange, locale): # Extended filtering for extended language ranges as # defined by RFC4647, part of BCP47. # http://tools.ietf.org/html/rfc4647#section-3.3.2 rangelist = [x.lower() for x in extrange.split('-')] localelist = [x.lower() for x in locale.split('-')] if rangelist[0] not in ('*', localelist[0]): return False rangei = localei = 0 while rangei < len(rangelist): if rangelist[rangei] == '*': rangei += 1 continue if localei >= len(localelist): return False if rangelist[rangei] in ('*', localelist[localei]): rangei += 1 localei += 1 continue if len(localelist[localei]) == 1: return False localei += 1 return True _locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?') def convert_locale (locale): # Automatically convert POSIX-style locales to BCP47 match = _locale_pattern.match(locale) if match is None: return locale ret = match.group(1).lower() variant = match.group(3) if variant == '@cyrillic': ret += '-Cyrl' variant = None if variant == '@devanagari': ret += '-Deva' variant = None elif variant == '@latin': ret += '-Latn' variant = None elif variant == '@shaw': ret += '-Shaw' variant = None if match.group(2) is not None: ret += '-' + match.group(2)[1:].upper() if variant is not None and variant != '@euro': ret += '-' + variant[1:].lower() return ret if __name__ == '__main__': options = optparse.OptionParser() options.set_usage('\n itstool [OPTIONS] [XMLFILES]\n itstool -m [OPTIONS] [XMLFILES]') options.add_option('-i', '--its', action='append', dest='itsfile', metavar='ITS', help='Load the ITS rules in the file ITS (can specify multiple times)') options.add_option('-l', '--lang', dest='lang', default=None, metavar='LANGUAGE', help='Explicitly set the language code for output file') options.add_option('-j', '--join', dest='join', metavar='FILE', help='Join multiple MO files with the XML file FILE and output XML file') options.add_option('-m', '--merge', dest='merge', metavar='FILE', help='Merge from a PO or MO file FILE and output XML files') options.add_option('-n', '--no-builtins', action='store_true', dest='nobuiltins', default=False, help='Do not apply the built-in ITS rules') options.add_option('-o', '--output', dest='output', default=None, metavar='OUT', help='Output PO files to file OUT or XML files in directory OUT') options.add_option('-s', '--strict', action='store_true', dest='strict', default=False, help='Exit with error when PO files contain broken XML') options.add_option('-d', '--load-dtd', action='store_true', dest='load_dtd', default=False, help='Load external DTDs used by input XML') options.add_option('-k', '--keep-entities', action='store_true', dest='keep_entities', default=False, help='Keep entity reference unexpanded') options.add_option('-p', '--param', action='append', dest='params', default=[], nargs=2, metavar='NAME VALUE', help='Define the ITS parameter NAME to the value VALUE (can specify multiple times)') options.add_option('-t', '--test', dest='test', default=None, metavar='CATEGORY', help='Generate conformance test output for CATEGORY') options.add_option('-v', '--version', action='store_true', dest='version', default=False, help='Print itstool version and exit') (opts, args) = options.parse_args(sys.argv) if opts.version: print('itstool %s' % VERSION) sys.exit(0) params = {} for name, value in opts.params: params[name] = value if opts.merge is None and opts.join is None: messages = MessageList() for filename in args[1:]: doc = Document(filename, messages, load_dtd=opts.load_dtd, keep_entities=opts.keep_entities) doc.apply_its_rules(not(opts.nobuiltins), params=params) if opts.itsfile is not None: for itsfile in opts.itsfile: doc.apply_its_file(itsfile, params=params) if opts.test is None: doc.generate_messages() if opts.output is None or opts.output == '-': out = sys.stdout else: try: out = file(opts.output, 'w') except: sys.stderr.write('Error: Cannot write to file %s\n' % opts.output) sys.exit(1) if opts.test is not None: doc.output_test_data(opts.test, out) else: messages.output(out) elif opts.merge is not None: try: translations = gettext.GNUTranslations(open(opts.merge, 'rb')) except: sys.stderr.write('Error: cannot open mo file %s\n' % opts.merge) sys.exit(1) translations.add_fallback(NoneTranslations()) if opts.lang is None: opts.lang = convert_locale(os.path.splitext(os.path.basename(opts.merge))[0]) if opts.output is None: out = './' elif os.path.isdir(opts.output): out = opts.output elif len(args) == 2: if opts.output == '-': out = sys.stdout else: out = file(opts.output, 'w') else: sys.stderr.write('Error: Non-directory output for multiple files\n') sys.exit(1) for filename in args[1:]: messages = MessageList() doc = Document(filename, messages, load_dtd=opts.load_dtd, keep_entities=opts.keep_entities) doc.apply_its_rules(not(opts.nobuiltins), params=params) if opts.itsfile is not None: for itsfile in opts.itsfile: doc.apply_its_file(itsfile, params=params) try: doc.merge_translations(translations, opts.lang, strict=opts.strict) except Exception as e: sys.stderr.write('Error: Could not merge translations:\n%s\n' % str(e)) sys.exit(1) fout = out if isinstance(fout, basestring): fout = file(os.path.join(fout, os.path.basename(filename)), 'w') fout.write(doc._doc.serialize('utf-8')) elif opts.join is not None: translations = {} for filename in args[1:]: try: thistr = gettext.GNUTranslations(open(filename, 'rb')) except: sys.stderr.write('Error: cannot open mo file %s\n' % filename) sys.exit(1) thistr.add_fallback(NoneTranslations()) lang = convert_locale(os.path.splitext(os.path.basename(filename))[0]) translations[lang] = thistr if opts.output is None: out = sys.stdout elif os.path.isdir(opts.output): out = file(os.path.join(opts.output, os.path.basename(filename)), 'w') else: out = file(opts.output, 'w') messages = MessageList() doc = Document(opts.join, messages) doc.apply_its_rules(not(opts.nobuiltins), params=params) doc.join_translations(translations, strict=opts.strict) out.write(doc._doc.serialize('utf-8')) if False: if opts.itsfile is not None: for itsfile in opts.itsfile: doc.apply_its_file(itsfile, params=params) try: doc.merge_translations(translations, opts.lang, strict=opts.strict) except Exception as e: sys.stderr.write('Error: Could not merge translations:\n%s\n' % str(e)) sys.exit(1) fout = out if isinstance(fout, basestring): fout = file(os.path.join(fout, os.path.basename(filename)), 'w') fout.write(doc._doc.serialize('utf-8')) itstool-2.0.2/Makefile.in0000664000076400007640000006365612254211643012230 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/itstool.1.in \ $(srcdir)/itstool.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = itstool itstool.1 CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.bz2 distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = its bin_SCRIPTS = itstool man_MANS = itstool.1 EXTRA_DIST = \ ChangeLog \ COPYING.GPL3 \ $(bin_SCRIPTS) \ itstool.in \ $(man_MANS) \ itstool.1.in all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): itstool: $(top_builddir)/config.status $(srcdir)/itstool.in cd $(top_builddir) && $(SHELL) ./config.status $@ itstool.1: $(top_builddir)/config.status $(srcdir)/itstool.1.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(MANS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-man uninstall-man: uninstall-man1 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-generic distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-binSCRIPTS uninstall-man \ uninstall-man1 ChangeLog: @if test -f $(top_srcdir)/.git/HEAD; then \ git log --stat > $@; \ fi dist: ChangeLog .PHONY: ChangeLog # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: itstool-2.0.2/itstool.10000664000076400007640000000604012254211645011724 00000000000000.TH "ITSTOOL" "1" "December 2013" "itstool 2.0.2" .SH "NAME" itstool \- convert between XML and PO using ITS .SH "SYNOPSIS" itstool [OPTIONS] XMLFILES... .br itstool \fB\-m\fR [OPTIONS] XMLFILES... .br itstool \fB\-j\fR [OPTIONS] MOFILES... .SH "DESCRIPTION" \fBitstool \fR extracts messages from XML files and outputs PO template files, then merges translations from MO files to create translated XML files. It determines what to translate and how to chunk it into messages using the W3C Internationalization Tag Set (ITS). To extract messages from XML files \fBXMLFILES\fR and output them to \fBOUT.pot\fR: .BR "itstool \-o OUT.pot XMLFILES" After merging with existing translations or translating strings, generate an MO file with \fBmsgfmt(1)\fR, then output translated files to the directory \fBDIR\fR: .BR "itstool \-m OUT.mo \-o DIR XMLFILES" You can also create a single multilingual XML output file using an input XML file and a set of MO files: .BR "itstool \-j FILE.xml \-o OUT.xml MOFILES" ITS definitions are loaded from the built-in rules, rules embedded in the source XML files, files passed with the \fB-i\fR option, and ITS attributes in the source XML files. Later definitions take precedence. You can disable built-in rules by passing the \fB-n\fR option. .SH "OPTIONS" .SS "Extracting" .IP "\fB\-o \fIOUT.pot\fR" 4 .PD 0 .IP "\fB\-\-out \fIOUT.pot\fR" 4 output PO template to the file \fBOUT.pot\fR .SS "Merging" .IP "\fB\-m \fIMOFILE\fR \fIXMLFILES\fR" 4 .PD 0 .IP "\fB\-\-merge \fIMOFILE\fR \fIXMLFILES\fR" 4 merge from an MO file \fBMOFILE\fR and output translated XML files for source \fBXMLFILES\fR .IP "\fB\-l \fILANG\fR" 4 .PD 0 .IP "\fB\-\-lang \fILANG \fR" 4 explicitly set the language code output to XML .IP "\fB\-o \fIOUT\fR" 4 .PD 0 .IP "\fB\-\-out \fIOUT \fR" 4 output XML files in the directory \fBOUT\fR .SS "Joining" .IP "\fB\-j \fXMLIFILE\fR \fIMOFILES\fR" 4 .PD 0 .IP "\fB\-\-join \fIXMLFILE\fR \fIMOFILES\fR" 4 join translations from \fBMOFILES\fR into a multilingual file based on source \fBXMLFILE\fR .IP "\fB\-o \fIOUT.xml\fR" 4 .PD 0 .IP "\fB\-\-out \fIOUT.xml\fR" 4 output to the XML file \fBOUT.xml\fR .SS "Common" .IP "\fB\-i \fIITS\fR" 4 .PD 0 .IP "\fB\-\-its \fIITS\fR" 4 load the ITS rules in the file \fBITS\fR (can specify multiple times) .IP "\fB\-n\fR" 4 .PD 0 .IP "\fB\-\-no\-builtins\fR" 4 do not apply the built-in ITS rules that ship with itstool .IP "\fB\-s\fR" 4 .PD 0 .IP "\fB\-\-strict\fR" 4 exit with error when PO files contain broken XML .IP "\fB\-d\fR" 4 .PD 0 .IP "\fB\-\-load\-dtd\fR" 4 load external DTDs used by input XML files .IP "\fB\-k\fR" 4 .PD 0 .IP "\fB\-\-keep\-entities\fR" 4 keep entity references unexpanded in PO files .IP "\fB\-p \fINAME VALUE\fR" 4 .PD 0 .IP "\fB\-\-param \fINAME VALUE\fR" 4 define ITS parameter \fBNAME\fR to the value \fBVALUE\fR (can specify multiple times) .SH "AUTHOR" Shaun McCance .SH "SEE ALSO" More documentation for \fBitstool\fR is maintained online. For more information, see: .BR "http://itstool.org/documentation/" itstool-2.0.2/configure.ac0000664000076400007640000000107612254211631012432 00000000000000AC_INIT([itstool], [2.0.2], []) AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2]) DATADIR=`( case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac eval echo $(eval echo $datadir) )` AC_SUBST([DATADIR]) AM_PATH_PYTHON([2.6]) py_module=libxml2 AC_MSG_CHECKING(for python module $py_module) echo "import $py_module" | python - &>/dev/null if test $? -ne 0; then AC_MSG_RESULT(not found) AC_MSG_ERROR(Python module $py_module is needed to run this package) else AC_MSG_RESULT(found) fi AC_CONFIG_FILES([ Makefile itstool itstool.1 its/Makefile ]) AC_OUTPUT itstool-2.0.2/COPYING0000664000076400007640000000160011571433371011200 00000000000000ITS Tool - XML to PO and back again using ITS definitions This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. As a special exception, the copyright holders give you permission to copy, modify, and distribute the ITS definitions bundled with this program under the terms of your choosing, without restriction. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program in the file COPYING.GPL3. If not, see . itstool-2.0.2/README0000664000076400007640000000000011504425560011013 00000000000000itstool-2.0.2/COPYING.GPL30000664000076400007640000010451311504425560011710 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . itstool-2.0.2/aclocal.m40000664000076400007640000007435112254211641012013 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],, [m4_warning([this file was generated for autoconf 2.66. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR itstool-2.0.2/configure0000775000076400007640000032043112254211642012054 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.66 for itstool 2.0.2. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='itstool' PACKAGE_TARNAME='itstool' PACKAGE_VERSION='2.0.2' PACKAGE_STRING='itstool 2.0.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON DATADIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures itstool 2.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/itstool] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of itstool 2.0.2:";; esac cat <<\_ACEOF Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF itstool configure 2.0.2 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by itstool $as_me 2.0.2, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='itstool' VERSION='2.0.2' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' DATADIR=`( case $prefix in NONE) prefix=$ac_default_prefix ;; *) ;; esac eval echo $(eval echo $datadir) )` if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.6" >&5 $as_echo_n "checking whether $PYTHON version >= 2.6... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.6... " >&6; } if test "${am_cv_pathless_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if test "${am_cv_python_version+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if test "${am_cv_python_platform+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if test "${am_cv_python_pythondir+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if test "${am_cv_python_pyexecdir+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi py_module=libxml2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module $py_module" >&5 $as_echo_n "checking for python module $py_module... " >&6; } echo "import $py_module" | python - &>/dev/null if test $? -ne 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } as_fn_error $? "Python module $py_module is needed to run this package" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } fi ac_config_files="$ac_config_files Makefile itstool itstool.1 its/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by itstool $as_me 2.0.2, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ itstool config.status 2.0.2 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "itstool") CONFIG_FILES="$CONFIG_FILES itstool" ;; "itstool.1") CONFIG_FILES="$CONFIG_FILES itstool.1" ;; "its/Makefile") CONFIG_FILES="$CONFIG_FILES its/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi itstool-2.0.2/missing0000755000076400007640000002623312254211643011546 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: itstool-2.0.2/Makefile.am0000664000076400007640000000044011601144661012175 00000000000000SUBDIRS = its bin_SCRIPTS = itstool man_MANS = itstool.1 EXTRA_DIST = \ ChangeLog \ COPYING.GPL3 \ $(bin_SCRIPTS) \ itstool.in \ $(man_MANS) \ itstool.1.in ChangeLog: @if test -f $(top_srcdir)/.git/HEAD; then \ git log --stat > $@; \ fi dist: ChangeLog .PHONY: ChangeLog itstool-2.0.2/install-sh0000755000076400007640000003253712254211643012157 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: itstool-2.0.2/itstool0000664000076400007640000020023212254211645011564 00000000000000#!/usr/bin/python -s # # Copyright (c) 2010-2013 Shaun McCance # # ITS Tool program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # ITS Tool is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with ITS Tool; if not, write to the Free Software Foundation, 59 Temple # Place, Suite 330, Boston, MA 0211-1307 USA. # VERSION="2.0.2" DATADIR="/usr/local/share" import gettext import hashlib import libxml2 import optparse import os import os.path import re import sys import time NS_ITS = 'http://www.w3.org/2005/11/its' NS_ITST = 'http://itstool.org/extensions/' NS_BLANK = 'http://itstool.org/extensions/blank/' NS_XLINK = 'http://www.w3.org/1999/xlink' NS_XML = 'http://www.w3.org/XML/1998/namespace' class NoneTranslations: def gettext(self, message): return None def lgettext(self, message): return None def ngettext(self, msgid1, msgid2, n): return None def lngettext(self, msgid1, msgid2, n): return None def ugettext(self, message): return None def ungettext(self, msgid1, msgid2, n): return None class MessageList (object): def __init__ (self): self._messages = [] self._by_node = {} self._has_credits = False def add_message (self, message, node): self._messages.append (message) if node is not None: self._by_node[node] = message def add_credits(self): if self._has_credits: return msg = Message() msg.set_context('_') msg.add_text('translator-credits') msg.add_comment(Comment('Put one translator per line, in the form NAME , YEAR1, YEAR2')) self._messages.append(msg) self._has_credits = True def get_message_by_node (self, node): return self._by_node.get(node, None) def get_nodes_with_messages (self): return self._by_node.keys() def output (self, out): msgs = [] msgdict = {} for msg in self._messages: key = (msg.get_context(), msg.get_string()) if msgdict.has_key(key): for source in msg.get_sources(): msgdict[key].add_source(source) for marker in msg.get_markers(): msgdict[key].add_marker(marker) for comment in msg.get_comments(): msgdict[key].add_comment(comment) for idvalue in msg.get_id_values(): msgdict[key].add_id_value(idvalue) if msg.get_preserve_space(): msgdict[key].set_preserve_space() if msg.get_locale_filter() is not None: locale = msgdict[key].get_locale_filter() if locale is not None: msgdict[key].set_locale_filter('%s, %s' % (locale, msg.get_locale_filter())) else: msgdict[key].set_locale_filter(msg.get_locale_filter()) else: msgs.append(msg) msgdict[key] = msg out.write('msgid ""\n') out.write('msgstr ""\n') out.write('"Project-Id-Version: PACKAGE VERSION\\n"\n') out.write('"POT-Creation-Date: %s\\n"\n' % time.strftime("%Y-%m-%d %H:%M%z")) out.write('"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"\n') out.write('"Last-Translator: FULL NAME \\n"\n') out.write('"Language-Team: LANGUAGE \\n"\n') out.write('"MIME-Version: 1.0\\n"\n') out.write('"Content-Type: text/plain; charset=UTF-8\\n"\n') out.write('"Content-Transfer-Encoding: 8bit\\n"\n') out.write('\n') for msg in msgs: out.write(msg.format().encode('utf-8')) out.write('\n') class Comment (object): def __init__ (self, text): self._text = str(text) assert(text is not None) self._markers = [] def add_marker (self, marker): self._markers.append(marker) def get_markers (self): return self._markers def get_text (self): return self._text def format (self): ret = u'' markers = {} for marker in self._markers: if not markers.has_key(marker): ret += '#. (itstool) comment: ' + marker + '\n' markers[marker] = marker if '\n' in self._text: doadd = False for line in self._text.split('\n'): if line != '': doadd = True if not doadd: continue ret += u'#. %s\n' % line else: text = self._text while len(text) > 72: j = text.rfind(' ', 0, 72) if j == -1: j = text.find(' ') if j == -1: break ret += u'#. %s\n' % text[:j] text = text[j+1:] ret += '#. %s\n' % text return ret class Message (object): def __init__ (self): self._message = [] self._empty = True self._ctxt = None self._placeholders = [] self._sources = [] self._markers = [] self._id_values = [] self._locale_filter = None self._comments = [] self._preserve = False def __repr__(self): if self._empty: return "Empty message" return self.get_string() class Placeholder (object): def __init__ (self, node): self.node = node self.name = unicode(node.name, 'utf-8') def escape (self, text): return text.replace('\\','\\\\').replace('"', "\\\"").replace("\n","\\n").replace("\t","\\t") def add_text (self, text): if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)): self._message.append('') if not isinstance(text, unicode): text = unicode(text, 'utf-8') self._message[-1] += text.replace('&', '&').replace('<', '<').replace('>', '>') if re.sub('\s+', ' ', text).strip() != '': self._empty = False def add_entity_ref (self, name): self._message.append('&' + name + ';') self._empty = False def add_placeholder (self, node): holder = Message.Placeholder(node) self._placeholders.append(holder) self._message.append(holder) def get_placeholder (self, name): placeholder = 1 for holder in self._placeholders: holdername = u'%s-%i' % (holder.name, placeholder) if holdername == unicode(name, 'utf-8'): return holder placeholder += 1 def add_start_tag (self, node): if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)): self._message.append('') if node.ns() is not None and node.ns().name is not None: self._message[-1] += (u'<%s:%s' % (unicode(node.ns().name, 'utf-8'), unicode(node.name, 'utf-8'))) else: self._message[-1] += (u'<%s' % unicode(node.name, 'utf-8')) for prop in xml_attr_iter(node): name = prop.name if prop.ns() is not None: name = prop.ns().name + ':' + name atval = prop.content if not isinstance(atval, unicode): atval = unicode(atval, 'utf-8') atval = atval.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"') self._message += " %s=\"%s\"" % (name, atval) if node.children is not None: self._message[-1] += '>' else: self._message[-1] += '/>' def add_end_tag (self, node): if node.children is not None: if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)): self._message.append('') if node.ns() is not None and node.ns().name is not None: self._message[-1] += (u'' % (unicode(node.ns().name, 'utf-8'), unicode(node.name, 'utf-8'))) else: self._message[-1] += (u'' % unicode(node.name, 'utf-8')) def is_empty (self): return self._empty def get_context (self): return self._ctxt def set_context (self, ctxt): self._ctxt = ctxt def add_source (self, source): if not isinstance(source, unicode): source = unicode(source, 'utf-8') self._sources.append(source) def get_sources (self): return self._sources def add_marker (self, marker): if not isinstance(marker, unicode): marker = unicode(marker, 'utf-8') self._markers.append(marker) def get_markers (self): return self._markers def add_id_value(self, id_value): self._id_values.append(id_value) def get_id_values(self): return self._id_values def add_comment (self, comment): if comment is not None: self._comments.append(comment) def get_comments (self): return self._comments def get_string (self): message = u'' placeholder = 1 for msg in self._message: if isinstance(msg, basestring): message += msg elif isinstance(msg, Message.Placeholder): message += u'<_:%s-%i/>' % (msg.name, placeholder) placeholder += 1 if not self._preserve: message = re.sub('\s+', ' ', message).strip() return message def get_preserve_space (self): return self._preserve def set_preserve_space (self, preserve=True): self._preserve = preserve def get_locale_filter(self): return self._locale_filter def set_locale_filter(self, locale): self._locale_filter = locale def format (self): ret = u'' markers = {} for marker in self._markers: if not markers.has_key(marker): ret += '#. (itstool) path: ' + marker + '\n' markers[marker] = marker for idvalue in self._id_values: ret += '#. (itstool) id: ' + idvalue + '\n' if self._locale_filter is not None: ret += '#. (itstool) ' + self._locale_filter[1] + ' locale: ' + self._locale_filter[0] + '\n' comments = [] commentsdict = {} for comment in self._comments: key = comment.get_text() if commentsdict.has_key(key): for marker in comment.get_markers(): commentsdict[key].add_marker(marker) else: comments.append(comment) commentsdict[key] = comment for i in range(len(comments)): if i != 0: ret += '#.\n' ret += comments[i].format() for source in self._sources: ret += u'#: %s\n' % source if self._preserve: ret += u'#, no-wrap\n' if self._ctxt is not None: ret += u'msgctxt "%s"\n' % self._ctxt message = self.get_string() if self._preserve: ret += u'msgid ""\n' lines = message.split('\n') for line, no in zip(lines, range(len(lines))): if no == len(lines) - 1: ret += u'"%s"\n' % self.escape(line) else: ret += u'"%s\\n"\n' % self.escape(line) else: ret += u'msgid "%s"\n' % self.escape(message) ret += u'msgstr ""\n' return ret def xml_child_iter (node): child = node.children while child is not None: yield child child = child.next def xml_attr_iter (node): attr = node.get_properties() while attr is not None: yield attr attr = attr.next def xml_is_ns_name (node, ns, name): if node.type != 'element': return False return node.name == name and node.ns() is not None and node.ns().content == ns def xml_get_node_path(node): # The built-in nodePath() method only does numeric indexes # when necessary for disambiguation. For various reasons, # we prefer always using indexes. name = node.name if node.ns() is not None and node.ns().name is not None: name = node.ns().name + ':' + name if node.type == 'attribute': name = '@' + name name = '/' + name if node.type == 'element' and node.parent.type == 'element': count = 1 prev = node.previousElementSibling() while prev is not None: if prev.name == node.name: if prev.ns() is None: if node.ns() is None: count += 1 else: if node.ns() is not None: if prev.ns().name == node.ns().name: count += 1 prev = prev.previousElementSibling() name = '%s[%i]' % (name, count) if node.parent.type == 'element': name = xml_get_node_path(node.parent) + name return name def xml_error_catcher(doc, error): doc._xml_err += " %s" % error def fix_node_ns (node, nsdefs): childnsdefs = nsdefs.copy() nsdef = node.nsDefs() while nsdef is not None: nextnsdef = nsdef.next if nsdefs.has_key(nsdef.name) and nsdefs[nsdef.name] == nsdef.content: node.removeNsDef(nsdef.content) else: childnsdefs[nsdef.name] = nsdef.content nsdef = nextnsdef for child in xml_child_iter(node): if child.type == 'element': fix_node_ns(child, childnsdefs) class LocNote (object): def __init__(self, locnote=None, locnoteref=None, locnotetype=None, space=False): self.locnote = locnote self.locnoteref = locnoteref self.locnotetype = locnotetype if self.locnotetype != 'alert': self.locnotetype = 'description' self._preserve_space=space def __repr__(self): if self.locnote is not None: if self._preserve_space: return self.locnote else: return re.sub('\s+', ' ', self.locnote).strip() elif self.locnoteref is not None: return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip() return '' class Document (object): def __init__ (self, filename, messages, load_dtd=False, keep_entities=False): self._xml_err = '' libxml2.registerErrorHandler(xml_error_catcher, self) try: ctxt = libxml2.createFileParserCtxt(filename) except: sys.stderr.write('Error: cannot open XML file %s\n' % filename) sys.exit(1) ctxt.lineNumbers(1) self._load_dtd = load_dtd self._keep_entities = keep_entities if load_dtd: ctxt.loadSubset(1) if keep_entities: ctxt.replaceEntities(0) else: ctxt.replaceEntities(1) ctxt.parseDocument() self._filename = filename self._doc = ctxt.doc() self._localrules = [] def pre_process (node): for child in xml_child_iter(node): if xml_is_ns_name(child, 'http://www.w3.org/2001/XInclude', 'include'): if child.nsProp('parse', None) == 'text': child.xincludeProcessTree() elif xml_is_ns_name(child, NS_ITS, 'rules'): if child.hasNsProp('href', NS_XLINK): href = child.nsProp('href', NS_XLINK) href = os.path.join(os.path.dirname(filename), href) hctxt = libxml2.createFileParserCtxt(href) hctxt.replaceEntities(1) hctxt.parseDocument() root = hctxt.doc().getRootElement() version = None if root.hasNsProp('version', None): version = root.nsProp('version', None) else: sys.stderr.write('Warning: ITS file %s missing version attribute\n' % os.path.basename(href)) if version is not None and version not in ('1.0', '2.0'): sys.stderr.write('Warning: Skipping ITS file %s with unknown version %s\n' % (os.path.basename(href), root.nsProp('version', None))) else: self._localrules.append(root) version = None if child.hasNsProp('version', None): version = child.nsProp('version', None) else: root = child.doc.getRootElement() if root.hasNsProp('version', NS_ITS): version = root.nsProp('version', NS_ITS) else: sys.stderr.write('Warning: Local ITS rules missing version attribute\n') if version is not None and version not in ('1.0', '2.0'): sys.stderr.write('Warning: Skipping local ITS rules with unknown version %s\n' % version) else: self._localrules.append(child) pre_process(child) pre_process(self._doc) try: self._check_errors() except libxml2.parserError as e: sys.stderr.write('Error: Could not parse document:\n%s\n' % str(e)) sys.exit(1) self._msgs = messages self._its_translate_nodes = {} self._its_within_text_nodes = {} self._its_locale_filters = {} self._its_id_values = {} self._its_loc_notes = {} self._its_preserve_space_nodes = {} self._itst_drop_nodes = {} self._itst_contexts = {} self._its_lang = {} self._itst_lang_attr = {} self._itst_credits = None self._its_externals = {} def _check_errors(self): if self._xml_err: raise libxml2.parserError(self._xml_err) def register_its_params(self, xpath, rules, params={}): for child in xml_child_iter(rules): if xml_is_ns_name(child, NS_ITS, 'param'): name = child.nsProp('name', None) if params.has_key(name): value = params[name] else: value = child.getContent() xpath.xpathRegisterVariable(name, None, value) def apply_its_rule(self, rule, xpath): if rule.type != 'element': return if xml_is_ns_name(rule, NS_ITS, 'translateRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_translate_nodes[node] = rule.nsProp('translate', None) elif xml_is_ns_name(rule, NS_ITS, 'withinTextRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_within_text_nodes[node] = rule.nsProp('withinText', None) elif xml_is_ns_name(rule, NS_ITST, 'preserveSpaceRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): val = rule.nsProp('preserveSpace', None) if val == 'yes': self._its_preserve_space_nodes[node] = 'preserve' elif xml_is_ns_name(rule, NS_ITS, 'preserveSpaceRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_preserve_space_nodes[node] = rule.nsProp('space', None) elif xml_is_ns_name(rule, NS_ITS, 'localeFilterRule'): if rule.nsProp('selector', None) is not None: if rule.hasNsProp('localeFilterList', None): lst = rule.nsProp('localeFilterList', None) else: lst = '*' if rule.hasNsProp('localeFilterType', None): typ = rule.nsProp('localeFilterType', None) else: typ = 'include' for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._its_locale_filters[node] = (lst, typ) elif xml_is_ns_name(rule, NS_ITST, 'dropRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): self._itst_drop_nodes[node] = rule.nsProp('drop', None) elif xml_is_ns_name(rule, NS_ITS, 'idValueRule'): sel = rule.nsProp('selector', None) idv = rule.nsProp('idValue', None) if sel is not None and idv is not None: for node in self._try_xpath_eval(xpath, sel): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) idvalue = self._try_xpath_eval(xpath, idv) if isinstance(idvalue, basestring): self._its_id_values[node] = idvalue else: for val in idvalue: self._its_id_values[node] = val.content break xpath.setContextNode(oldnode) pass elif xml_is_ns_name(rule, NS_ITST, 'contextRule'): if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): if rule.hasNsProp('context', None): self._itst_contexts[node] = rule.nsProp('context', None) elif rule.hasNsProp('contextPointer', None): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) ctxt = self._try_xpath_eval(xpath, rule.nsProp('contextPointer', None)) if isinstance(ctxt, basestring): self._itst_contexts[node] = ctxt else: for ctxt in ctxt: self._itst_contexts[node] = ctxt.content break xpath.setContextNode(oldnode) elif xml_is_ns_name(rule, NS_ITS, 'locNoteRule'): locnote = None notetype = rule.nsProp('locNoteType', None) for child in xml_child_iter(rule): if xml_is_ns_name(child, NS_ITS, 'locNote'): locnote = LocNote(locnote=child.content, locnotetype=notetype) break if locnote is None: if rule.hasNsProp('locNoteRef', None): locnote = LocNote(locnoteref=rule.nsProp('locNoteRef', None), locnotetype=notetype) if rule.nsProp('selector', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): if locnote is not None: self._its_loc_notes.setdefault(node, []).append(locnote) else: if rule.hasNsProp('locNotePointer', None): sel = rule.nsProp('locNotePointer', None) ref = False elif rule.hasNsProp('locNoteRefPointer', None): sel = rule.nsProp('locNoteRefPointer', None) ref = True else: continue try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) note = self._try_xpath_eval(xpath, sel) if isinstance(note, basestring): if ref: nodenote = LocNote(locnoteref=note, locnotetype=notetype) else: nodenote = LocNote(locnote=note, locnotetype=notetype) self._its_loc_notes.setdefault(node, []).append(nodenote) else: for note in note: if ref: nodenote = LocNote(locnoteref=note.content, locnotetype=notetype) else: nodenote = LocNote(locnote=note.content, locnotetype=notetype, space=self.get_preserve_space(note)) self._its_loc_notes.setdefault(node, []).append(nodenote) break xpath.setContextNode(oldnode) elif xml_is_ns_name(rule, NS_ITS, 'langRule'): if rule.nsProp('selector', None) is not None and rule.nsProp('langPointer', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('selector', None)): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) res = self._try_xpath_eval(xpath, rule.nsProp('langPointer', None)) if len(res) > 0: self._its_lang[node] = res[0].content # We need to construct language attributes, not just read # language information. Technically, langPointer could be # any XPath expression. But if it looks like an attribute # accessor, just use the attribute name. if rule.nsProp('langPointer', None)[0] == '@': self._itst_lang_attr[node] = rule.nsProp('langPointer', None)[1:] xpath.setContextNode(oldnode) elif xml_is_ns_name(rule, NS_ITST, 'credits'): if rule.nsProp('appendTo', None) is not None: for node in self._try_xpath_eval(xpath, rule.nsProp('appendTo', None)): self._itst_credits = (node, rule) break elif (xml_is_ns_name(rule, NS_ITS, 'externalResourceRefRule') or xml_is_ns_name(rule, NS_ITST, 'externalRefRule')): sel = rule.nsProp('selector', None) if xml_is_ns_name(rule, NS_ITS, 'externalResourceRefRule'): ptr = rule.nsProp('externalResourceRefPointer', None) else: ptr = rule.nsProp('refPointer', None) if sel is not None and ptr is not None: for node in self._try_xpath_eval(xpath, sel): try: oldnode = xpath.contextNode() except: oldnode = None xpath.setContextNode(node) res = self._try_xpath_eval(xpath, ptr) if len(res) > 0: self._its_externals[node] = res[0].content xpath.setContextNode(oldnode) def apply_its_rules(self, builtins, params={}): if builtins: dirs = [] ddir = os.getenv('XDG_DATA_HOME', '') if ddir == '': ddir = os.path.join(os.path.expanduser('~'), '.local', 'share') dirs.append(ddir) ddir = os.getenv('XDG_DATA_DIRS', '') if ddir == '': if DATADIR not in ('/usr/local/share', '/usr/share'): ddir += DATADIR + ':' ddir += '/usr/local/share:/usr/share' dirs.extend(ddir.split(':')) ddone = {} for ddir in dirs: itsdir = os.path.join(ddir, 'itstool', 'its') if not os.path.exists(itsdir): continue for dfile in os.listdir(itsdir): if dfile.endswith('.its'): if not ddone.get(dfile, False): self.apply_its_file(os.path.join(itsdir, dfile), params=params) ddone[dfile] = True self.apply_local_its_rules(params=params) def apply_its_file(self, filename, params={}): doc = libxml2.parseFile(filename) root = doc.getRootElement() if not xml_is_ns_name(root, NS_ITS, 'rules'): return version = None if root.hasNsProp('version', None): version = root.nsProp('version', None) else: sys.stderr.write('Warning: ITS file %s missing version attribute\n' % os.path.basename(filename)) if version is not None and version not in ('1.0', '2.0'): sys.stderr.write('Warning: Skipping ITS file %s with unknown version %s\n' % (os.path.basename(filename), root.nsProp('version', None))) return matched = True for match in xml_child_iter(root): if xml_is_ns_name(match, NS_ITST, 'match'): matched = False xpath = self._doc.xpathNewContext() par = match nss = {} while par is not None: nsdef = par.nsDefs() while nsdef is not None: if nsdef.name is not None: if not nss.has_key(nsdef.name): nss[nsdef.name] = nsdef.content xpath.xpathRegisterNs(nsdef.name, nsdef.content) nsdef = nsdef.next par = par.parent if match.hasNsProp('selector', None): if len(self._try_xpath_eval(xpath, match.nsProp('selector', None))) > 0: matched = True break if matched == False: return for rule in xml_child_iter(root): xpath = self._doc.xpathNewContext() par = match nss = {} while par is not None: nsdef = par.nsDefs() while nsdef is not None: if nsdef.name is not None: if not nss.has_key(nsdef.name): nss[nsdef.name] = nsdef.content xpath.xpathRegisterNs(nsdef.name, nsdef.content) nsdef = nsdef.next par = par.parent self.register_its_params(xpath, root, params=params) self.apply_its_rule(rule, xpath) def apply_local_its_rules(self, params={}): for rules in self._localrules: def reg_ns(xpath, node): if node.parent is not None: reg_ns(xpath, node.parent) nsdef = node.nsDefs() while nsdef is not None: if nsdef.name is not None: xpath.xpathRegisterNs(nsdef.name, nsdef.content) nsdef = nsdef.next xpath = self._doc.xpathNewContext() reg_ns(xpath, rules) self.register_its_params(xpath, rules, params=params) for rule in xml_child_iter(rules): if rule.type != 'element': continue if rule.nsDefs() is not None: rule_xpath = self._doc.xpathNewContext() reg_ns(rule_xpath, rule) self.register_its_params(rule_xpath, rules, params=params) else: rule_xpath = xpath self.apply_its_rule(rule, rule_xpath) def _append_credits(self, parent, node, trdata): if xml_is_ns_name(node, NS_ITST, 'for-each'): select = node.nsProp('select', None) if select == 'years': for year in trdata[2].split(','): for child in xml_child_iter(node): self._append_credits(parent, child, trdata + (year.strip(),)) elif xml_is_ns_name(node, NS_ITST, 'value-of'): select = node.nsProp('select', None) val = None if select == 'name': val = trdata[0] elif select == 'email': val = trdata[1] elif select == 'years': val = trdata[2] elif select == 'year' and len(trdata) == 4: val = trdata[3] if val is not None: val = val.encode('utf-8') parent.addContent(val) else: newnode = node.copyNode(2) parent.addChild(newnode) for child in xml_child_iter(node): self._append_credits(newnode, child, trdata) def merge_credits(self, translations, language, node): if self._itst_credits is None: return # Dear Python, please implement pgettext. # http://bugs.python.org/issue2504 # Sincerely, Shaun trans = translations.ugettext('_\x04translator-credits') if trans is None or trans == 'translator-credits': return regex = re.compile('(.*) \<(.*)\>, (.*)') for credit in trans.split('\n'): match = regex.match(credit) if not match: continue trdata = match.groups() for node in xml_child_iter(self._itst_credits[1]): self._append_credits(self._itst_credits[0], node, trdata) def join_translations(self, translations, node=None, strict=False): is_root = False if node is None: is_root = True self.generate_messages(comments=False) node = self._doc.getRootElement() if node is None or node.type != 'element': return if self.get_itst_drop(node) == 'yes': prev = node.prev node.unlinkNode() node.freeNode() if prev is not None and prev.isBlankNode(): prev.unlinkNode() prev.freeNode() return msg = self._msgs.get_message_by_node(node) if msg is None: self.translate_attrs(node, node) children = [child for child in xml_child_iter(node)] for child in children: self.join_translations(translations, node=child, strict=strict) else: prevnode = None if node.prev is not None and node.prev.type == 'text': prevtext = node.prev.content if re.sub('\s+', '', prevtext) == '': prevnode = node.prev for lang in sorted(translations.keys(), reverse=True): locale = self.get_its_locale_filter(node) lmatch = match_locale_list(locale[0], lang) if (locale[1] == 'include' and not lmatch) or (locale[1] == 'exclude' and lmatch): continue newnode = self.get_translated(node, translations[lang], strict=strict, lang=lang) if newnode != node: newnode.setProp('xml:lang', lang) node.addNextSibling(newnode) if prevnode is not None: node.addNextSibling(prevnode.copyNode(0)) if is_root: # Because of the way we create nodes and rewrite the document, # we end up with lots of redundant namespace definitions. We # kill them off in one fell swoop at the end. fix_node_ns(node, {}) self._check_errors() def merge_translations(self, translations, language, node=None, strict=False): is_root = False if node is None: is_root = True self.generate_messages(comments=False) node = self._doc.getRootElement() if node is None or node.type != 'element': return drop = False locale = self.get_its_locale_filter(node) if locale[1] == 'include': if locale[0] != '*': if not match_locale_list(locale[0], language): drop = True elif locale[1] == 'exclude': if match_locale_list(locale[0], language): drop = True if self.get_itst_drop(node) == 'yes' or drop: prev = node.prev node.unlinkNode() node.freeNode() if prev is not None and prev.isBlankNode(): prev.unlinkNode() prev.freeNode() return if is_root: self.merge_credits(translations, language, node) msg = self._msgs.get_message_by_node(node) if msg is None: self.translate_attrs(node, node) children = [child for child in xml_child_iter(node)] for child in children: self.merge_translations(translations, language, node=child, strict=strict) else: newnode = self.get_translated(node, translations, strict=strict, lang=language) if newnode != node: self.translate_attrs(node, newnode) node.replaceNode(newnode) if is_root: # Apply language attributes to untranslated nodes. We don't do # this before processing, because then these attributes would # be copied into the new nodes. We apply the attribute without # checking whether it was translated, because any that were will # just be floating around, unattached to a document. for lcnode in self._msgs.get_nodes_with_messages(): attr = self._itst_lang_attr.get(lcnode) if attr is None: continue origlang = None lcpar = lcnode while lcpar is not None: origlang = self._its_lang.get(lcpar) if origlang is not None: break lcpar = lcpar.parent if origlang is not None: lcnode.setProp(attr, origlang) # And then set the language attribute on the root node. if language is not None: attr = self._itst_lang_attr.get(node) if attr is not None: node.setProp(attr, language) # Because of the way we create nodes and rewrite the document, # we end up with lots of redundant namespace definitions. We # kill them off in one fell swoop at the end. fix_node_ns(node, {}) self._check_errors() def translate_attrs(self, oldnode, newnode): trans_attrs = [attr for attr in xml_attr_iter(oldnode) if self._its_translate_nodes.get(attr, 'no') == 'yes'] for attr in trans_attrs: newcontent = translations.ugettext(attr.get_content()) if newcontent: newnode.setProp(attr.name, translations.ugettext(attr.get_content())) def get_translated (self, node, translations, strict=False, lang=None): msg = self._msgs.get_message_by_node(node) if msg is None: return node msgstr = msg.get_string() # Dear Python, please implement pgettext. # http://bugs.python.org/issue2504 # Sincerely, Shaun if msg.get_context() is not None: msgstr = msg.get_context() + '\x04' + msgstr trans = translations.ugettext(msgstr) if trans is None: return node nss = {} def reg_ns(node, nss): if node.parent is not None: reg_ns(node.parent, nss) nsdef = node.nsDefs() while nsdef is not None: nss[nsdef.name] = nsdef.content nsdef = nsdef.next reg_ns(node, nss) nss['_'] = NS_BLANK try: blurb = node.doc.intSubset().serialize('utf-8') except: blurb = '' blurb += '<' + node.name for nsname in nss.keys(): if nsname is None: blurb += ' xmlns="%s"' % nss[nsname] else: blurb += ' xmlns:%s="%s"' % (nsname, nss[nsname]) blurb += '>%s' % (trans.encode('utf-8'), node.name) ctxt = libxml2.createDocParserCtxt(blurb) if self._load_dtd: ctxt.loadSubset(1) ctxt.replaceEntities(0) ctxt.parseDocument() trnode = ctxt.doc().getRootElement() try: self._check_errors() except libxml2.parserError as e: if strict: raise else: sys.stderr.write('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( (lang + ' ') if lang is not None else '', msgstr.encode('utf-8'))) self._xml_err = '' return node def scan_node(node): children = [child for child in xml_child_iter(node)] for child in children: if child.type != 'element': continue if child.ns() is not None and child.ns().content == NS_BLANK: ph_node = msg.get_placeholder(child.name).node if self.has_child_elements(ph_node): self.merge_translations(translations, None, ph_node, strict=strict) child.replaceNode(ph_node) else: repl = self.get_translated(ph_node, translations, strict=strict, lang=lang) child.replaceNode(repl) scan_node(child) scan_node(trnode) retnode = node.copyNode(2) for child in xml_child_iter(trnode): retnode.addChild(child.copyNode(1)) return retnode def generate_messages(self, comments=True): if self._itst_credits is not None: self._msgs.add_credits() for child in xml_child_iter(self._doc): if child.type == 'element': self.generate_message(child, None, comments=comments) break def generate_message (self, node, msg, comments=True, path=None): if node.type in ('text', 'cdata') and msg is not None: msg.add_text(node.content) return if node.type == 'entity_ref': msg.add_entity_ref(node.name); if node.type != 'element': return if node.hasNsProp('drop', NS_ITST) and node.nsProp('drop', NS_ITST) == 'yes': return if self._itst_drop_nodes.get(node, 'no') == 'yes': return locfil = self.get_its_locale_filter(node) if locfil == ('', 'include') or locfil == ('*', 'exclude'): return if path is None: path = '' translate = self.get_its_translate(node) withinText = False if translate == 'no': if msg is not None: msg.add_placeholder(node) is_unit = False msg = None else: is_unit = msg is None or self.is_translation_unit(node) if is_unit: if msg is not None: msg.add_placeholder(node) msg = Message() ctxt = None if node.hasNsProp('context', NS_ITST): ctxt = node.nsProp('context', NS_ITST) if ctxt is None: ctxt = self._itst_contexts.get(node) if ctxt is not None: msg.set_context(ctxt) idvalue = self.get_its_id_value(node) if idvalue is not None: basename = os.path.basename(self._filename) msg.add_id_value(basename + '#' + idvalue) if self.get_preserve_space(node): msg.set_preserve_space() if self.get_its_locale_filter(node) != ('*', 'include'): msg.set_locale_filter(self.get_its_locale_filter(node)) msg.add_source('%s:%i' % (self._doc.name, node.lineNo())) msg.add_marker('%s/%s' % (node.parent.name, node.name)) else: withinText = True msg.add_start_tag(node) if not withinText: # Add msg for translatable node attributes for attr in xml_attr_iter(node): if self._its_translate_nodes.get(attr, 'no') == 'yes': attr_msg = Message() attr_msg.add_source('%s:%i' % (self._doc.name, node.lineNo())) attr_msg.add_marker('%s/%s@%s' % (node.parent.name, node.name, attr.name)) attr_msg.add_text(attr.content) if comments: for locnote in self.get_its_loc_notes(attr): comment = Comment(locnote) comment.add_marker ('%s/%s@%s' % ( node.parent.name, node.name, attr.name)) attr_msg.add_comment(comment) self._msgs.add_message(attr_msg, attr) if comments and msg is not None: cnode = node while cnode is not None: hasnote = False for locnote in self.get_its_loc_notes(cnode, inherit=(not withinText)): comment = Comment(locnote) if withinText: comment.add_marker('.%s/%s' % (path, cnode.name)) msg.add_comment(comment) hasnote = True if hasnote or not is_unit: break cnode = cnode.parent self.generate_external_resource_message(node) for attr in xml_attr_iter(node): self.generate_external_resource_message(attr) idvalue = self.get_its_id_value(attr) if idvalue is not None: basename = os.path.basename(self._filename) msg.add_id_value(basename + '#' + idvalue) if withinText: path = path + '/' + node.name for child in xml_child_iter(node): self.generate_message(child, msg, comments=comments, path=path) if translate: if is_unit and not msg.is_empty(): self._msgs.add_message(msg, node) elif msg is not None: msg.add_end_tag(node) def generate_external_resource_message(self, node): if not self._its_externals.has_key(node): return resref = self._its_externals[node] if node.type == 'element': translate = self.get_its_translate(node) marker = '%s/%s' % (node.parent.name, node.name) else: translate = self.get_its_translate(node.parent) marker = '%s/%s/@%s' % (node.parent.parent.name, node.parent.name, node.name) if translate == 'no': return msg = Message() try: fullfile = os.path.join(os.path.dirname(self._filename), resref) filefp = open(fullfile) filemd5 = hashlib.md5(filefp.read()).hexdigest() filefp.close() except: filemd5 = '__failed__' txt = "external ref='%s' md5='%s'" % (resref, filemd5) msg.set_context('_') msg.add_text(txt) msg.add_source('%s:%i' % (self._doc.name, node.lineNo())) msg.add_marker(marker) msg.add_comment(Comment('This is a reference to an external file such as an image or' ' video. When the file changes, the md5 hash will change to' ' let you know you need to update your localized copy. The' ' msgstr is not used at all. Set it to whatever you like' ' once you have updated your copy of the file.')) self._msgs.add_message(msg, None) def is_translation_unit (self, node): return self.get_its_within_text(node) != 'yes' def has_child_elements(self, node): return len([child for child in xml_child_iter(node) if child.type=='element']) def get_preserve_space (self, node): while node.type in ('attribute', 'element'): if node.getSpacePreserve() == 1: return True if self._its_preserve_space_nodes.has_key(node): return (self._its_preserve_space_nodes[node] == 'preserve') node = node.parent return False def get_its_translate(self, node): val = None if node.hasNsProp('translate', NS_ITS): val = node.nsProp('translate', NS_ITS) elif xml_is_ns_name(node, NS_ITS, 'span') and node.hasNsProp('translate', None): val = node.nsProp('translate', None) elif self._its_translate_nodes.has_key(node): val = self._its_translate_nodes[node] if val is not None: return val if node.type == 'attribute': return 'no' if node.parent.type == 'element': return self.get_its_translate(node.parent) return 'yes' def get_its_within_text(self, node): if node.hasNsProp('withinText', NS_ITS): val = node.nsProp('withinText', NS_ITS) elif xml_is_ns_name(node, NS_ITS, 'span') and node.hasNsProp('withinText', None): val = node.nsProp('withinText', None) else: return self._its_within_text_nodes.get(node, 'no') if val in ('yes', 'nested'): return val return 'no' def get_its_locale_filter(self, node): if node.hasNsProp('localeFilterList', NS_ITS) or node.hasNsProp('localeFilterType', NS_ITS): if node.hasNsProp('localeFilterList', NS_ITS): lst = node.nsProp('localeFilterList', NS_ITS) else: lst = '*' if node.hasNsProp('localeFilterType', NS_ITS): typ = node.nsProp('localeFilterType', NS_ITS) else: typ = 'include' return (lst, typ) if (xml_is_ns_name(node, NS_ITS, 'span') and (node.hasNsProp('localeFilterList', None) or node.hasNsProp('localeFilterType', None))): if node.hasNsProp('localeFilterList', None): lst = node.nsProp('localeFilterList', None) else: lst = '*' if node.hasNsProp('localeFilterType', None): typ = node.nsProp('localeFilterType', None) else: typ = 'include' return (lst, typ) if self._its_locale_filters.has_key(node): return self._its_locale_filters[node] if node.parent.type == 'element': return self.get_its_locale_filter(node.parent) return ('*', 'include') def get_itst_drop(self, node): if node.hasNsProp('drop', NS_ITST) and node.nsProp('drop', NS_ITST) == 'yes': return 'yes' if self._itst_drop_nodes.get(node, 'no') == 'yes': return 'yes' return 'no' def get_its_id_value(self, node): if node.hasNsProp('id', NS_XML): return node.nsProp('id', NS_XML) return self._its_id_values.get(node, None) def get_its_loc_notes(self, node, inherit=True): ret = [] if node.hasNsProp('locNote', NS_ITS) or node.hasNsProp('locNoteRef', NS_ITS) or node.hasNsProp('locNoteType', NS_ITS): notetype = node.nsProp('locNoteType', NS_ITS) if node.hasNsProp('locNote', NS_ITS): ret.append(LocNote(locnote=node.nsProp('locNote', NS_ITS), locnotetype=notetype)) elif node.hasNsProp('locNoteRef', NS_ITS): ret.append(LocNote(locnoteref=node.nsProp('locNoteRef', NS_ITS), locnotetype=notetype)) elif xml_is_ns_name(node, NS_ITS, 'span'): if node.hasNsProp('locNote', None) or node.hasNsProp('locNoteRef', None) or node.hasNsProp('locNoteType', None): notetype = node.nsProp('locNoteType', None) if node.hasNsProp('locNote', None): ret.append(LocNote(locnote=node.nsProp('locNote', None), locnotetype=notetype)) elif node.hasNsProp('locNoteRef', None): ret.append(LocNote(locnoteref=node.nsProp('locNoteRef', None), locnotetype=notetype)) for locnote in reversed(self._its_loc_notes.get(node, [])): ret.append(locnote) if (len(ret) == 0 and inherit and node.type != 'attribute' and node.parent is not None and node.parent.type == 'element'): return self.get_its_loc_notes(node.parent) return ret def output_test_data(self, category, out, node=None): if node is None: node = self._doc.getRootElement() compval = '' if category == 'translate': compval = 'translate="%s"' % self.get_its_translate(node) elif category == 'withinText': if node.type != 'attribute': compval = 'withinText="%s"' % self.get_its_within_text(node) elif category == 'localeFilter': compval = 'localeFilterList="%s"\tlocaleFilterType="%s"' % self.get_its_locale_filter(node) elif category == 'locNote': val = self.get_its_loc_notes(node) if len(val) > 0: if val[0].locnote is not None: compval = 'locNote="%s"\tlocNoteType="%s"' % (str(val[0]), val[0].locnotetype) elif val[0].locnoteref is not None: compval = 'locNoteRef="%s"\tlocNoteType="%s"' % (val[0].locnoteref, val[0].locnotetype) elif category == 'externalResourceRef': val = self._its_externals.get(node, '') if val != '': compval = 'externalResourceRef="%s"' % val elif category == 'idValue': val = self.get_its_id_value(node) if val is not None: compval = 'idValue="%s"' % val elif category == 'preserveSpace': if self.get_preserve_space(node): compval = 'space="preserve"' else: compval = 'space="default"' else: sys.stderr.write('Error: Unrecognized category %s\n' % category) sys.exit(1) if compval != '': out.write('%s\t%s\r\n' % (xml_get_node_path(node), compval)) else: out.write('%s\r\n' % (xml_get_node_path(node))) for attr in sorted(xml_attr_iter(node), lambda x, y: cmp(str(x), str(y))): self.output_test_data(category, out, attr) for child in xml_child_iter(node): if child.type == 'element': self.output_test_data(category, out, child) @staticmethod def _try_xpath_eval (xpath, expr): try: return xpath.xpathEval(expr) except: sys.stderr.write('Warning: Invalid XPath: %s\n' % expr) return [] def match_locale_list(extranges, locale): if extranges.strip() == '': return False for extrange in [extrange.strip() for extrange in extranges.split(',')]: if match_locale(extrange, locale): return True return False def match_locale(extrange, locale): # Extended filtering for extended language ranges as # defined by RFC4647, part of BCP47. # http://tools.ietf.org/html/rfc4647#section-3.3.2 rangelist = [x.lower() for x in extrange.split('-')] localelist = [x.lower() for x in locale.split('-')] if rangelist[0] not in ('*', localelist[0]): return False rangei = localei = 0 while rangei < len(rangelist): if rangelist[rangei] == '*': rangei += 1 continue if localei >= len(localelist): return False if rangelist[rangei] in ('*', localelist[localei]): rangei += 1 localei += 1 continue if len(localelist[localei]) == 1: return False localei += 1 return True _locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?') def convert_locale (locale): # Automatically convert POSIX-style locales to BCP47 match = _locale_pattern.match(locale) if match is None: return locale ret = match.group(1).lower() variant = match.group(3) if variant == '@cyrillic': ret += '-Cyrl' variant = None if variant == '@devanagari': ret += '-Deva' variant = None elif variant == '@latin': ret += '-Latn' variant = None elif variant == '@shaw': ret += '-Shaw' variant = None if match.group(2) is not None: ret += '-' + match.group(2)[1:].upper() if variant is not None and variant != '@euro': ret += '-' + variant[1:].lower() return ret if __name__ == '__main__': options = optparse.OptionParser() options.set_usage('\n itstool [OPTIONS] [XMLFILES]\n itstool -m [OPTIONS] [XMLFILES]') options.add_option('-i', '--its', action='append', dest='itsfile', metavar='ITS', help='Load the ITS rules in the file ITS (can specify multiple times)') options.add_option('-l', '--lang', dest='lang', default=None, metavar='LANGUAGE', help='Explicitly set the language code for output file') options.add_option('-j', '--join', dest='join', metavar='FILE', help='Join multiple MO files with the XML file FILE and output XML file') options.add_option('-m', '--merge', dest='merge', metavar='FILE', help='Merge from a PO or MO file FILE and output XML files') options.add_option('-n', '--no-builtins', action='store_true', dest='nobuiltins', default=False, help='Do not apply the built-in ITS rules') options.add_option('-o', '--output', dest='output', default=None, metavar='OUT', help='Output PO files to file OUT or XML files in directory OUT') options.add_option('-s', '--strict', action='store_true', dest='strict', default=False, help='Exit with error when PO files contain broken XML') options.add_option('-d', '--load-dtd', action='store_true', dest='load_dtd', default=False, help='Load external DTDs used by input XML') options.add_option('-k', '--keep-entities', action='store_true', dest='keep_entities', default=False, help='Keep entity reference unexpanded') options.add_option('-p', '--param', action='append', dest='params', default=[], nargs=2, metavar='NAME VALUE', help='Define the ITS parameter NAME to the value VALUE (can specify multiple times)') options.add_option('-t', '--test', dest='test', default=None, metavar='CATEGORY', help='Generate conformance test output for CATEGORY') options.add_option('-v', '--version', action='store_true', dest='version', default=False, help='Print itstool version and exit') (opts, args) = options.parse_args(sys.argv) if opts.version: print('itstool %s' % VERSION) sys.exit(0) params = {} for name, value in opts.params: params[name] = value if opts.merge is None and opts.join is None: messages = MessageList() for filename in args[1:]: doc = Document(filename, messages, load_dtd=opts.load_dtd, keep_entities=opts.keep_entities) doc.apply_its_rules(not(opts.nobuiltins), params=params) if opts.itsfile is not None: for itsfile in opts.itsfile: doc.apply_its_file(itsfile, params=params) if opts.test is None: doc.generate_messages() if opts.output is None or opts.output == '-': out = sys.stdout else: try: out = file(opts.output, 'w') except: sys.stderr.write('Error: Cannot write to file %s\n' % opts.output) sys.exit(1) if opts.test is not None: doc.output_test_data(opts.test, out) else: messages.output(out) elif opts.merge is not None: try: translations = gettext.GNUTranslations(open(opts.merge, 'rb')) except: sys.stderr.write('Error: cannot open mo file %s\n' % opts.merge) sys.exit(1) translations.add_fallback(NoneTranslations()) if opts.lang is None: opts.lang = convert_locale(os.path.splitext(os.path.basename(opts.merge))[0]) if opts.output is None: out = './' elif os.path.isdir(opts.output): out = opts.output elif len(args) == 2: if opts.output == '-': out = sys.stdout else: out = file(opts.output, 'w') else: sys.stderr.write('Error: Non-directory output for multiple files\n') sys.exit(1) for filename in args[1:]: messages = MessageList() doc = Document(filename, messages, load_dtd=opts.load_dtd, keep_entities=opts.keep_entities) doc.apply_its_rules(not(opts.nobuiltins), params=params) if opts.itsfile is not None: for itsfile in opts.itsfile: doc.apply_its_file(itsfile, params=params) try: doc.merge_translations(translations, opts.lang, strict=opts.strict) except Exception as e: sys.stderr.write('Error: Could not merge translations:\n%s\n' % str(e)) sys.exit(1) fout = out if isinstance(fout, basestring): fout = file(os.path.join(fout, os.path.basename(filename)), 'w') fout.write(doc._doc.serialize('utf-8')) elif opts.join is not None: translations = {} for filename in args[1:]: try: thistr = gettext.GNUTranslations(open(filename, 'rb')) except: sys.stderr.write('Error: cannot open mo file %s\n' % filename) sys.exit(1) thistr.add_fallback(NoneTranslations()) lang = convert_locale(os.path.splitext(os.path.basename(filename))[0]) translations[lang] = thistr if opts.output is None: out = sys.stdout elif os.path.isdir(opts.output): out = file(os.path.join(opts.output, os.path.basename(filename)), 'w') else: out = file(opts.output, 'w') messages = MessageList() doc = Document(opts.join, messages) doc.apply_its_rules(not(opts.nobuiltins), params=params) doc.join_translations(translations, strict=opts.strict) out.write(doc._doc.serialize('utf-8')) if False: if opts.itsfile is not None: for itsfile in opts.itsfile: doc.apply_its_file(itsfile, params=params) try: doc.merge_translations(translations, opts.lang, strict=opts.strict) except Exception as e: sys.stderr.write('Error: Could not merge translations:\n%s\n' % str(e)) sys.exit(1) fout = out if isinstance(fout, basestring): fout = file(os.path.join(fout, os.path.basename(filename)), 'w') fout.write(doc._doc.serialize('utf-8')) itstool-2.0.2/ChangeLog0000664000076400007640000026725312254211646011737 00000000000000commit 6596a9cd30e4c1ff8599caf724e2aed3dd6947bf Author: Shaun McCance Date: Tue Dec 17 22:14:43 2013 -0500 itstool.1: Update man page itstool.1.in | 137 ++++++++++++++++++++++++++++++++++++++-------------------- itstool.in | 2 +- 2 files changed, 91 insertions(+), 48 deletions(-) commit 1cce05f8c3d2b52f030b3e253d37ae5a6eee8003 Author: Ryan Lortie Date: Mon Dec 9 13:17:55 2013 -0500 Don't hardcode python path Instead, use automake to find it at runtime and put #!@PYTHON@ at the top of itstool.in. https://bugs.freedesktop.org/show_bug.cgi?id=72533 configure.ac | 2 ++ itstool.in | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) commit 46067ed60cbe1e5e3efe176da1f40f8219336490 Author: Shaun McCance Date: Sun Nov 24 14:10:03 2013 -0500 Fixed crash in locale filter and drop rule, #715116 When the dropped node has no preceding sibling, itstool crashes because it tries to unlink prev node if it's blank. itstool.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 6d90f59ee2fcd9492501b337a15c65bfce78afcd Author: Shaun McCance Date: Mon Nov 18 11:21:10 2013 -0500 Version 2.0.1 NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit b317a7c7362938098379f2f8db42f0f94d6f98dd Author: Shaun McCance Date: Mon Nov 4 16:32:34 2013 -0500 its: Consolidate ITS rules for better performance its/docbook.its | 313 +++++++++++++++++++++++++++--------------------------- its/docbook5.its | 310 ++++++++++++++++++++++++++--------------------------- its/its.its | 3 +- its/mallard.its | 25 ++--- its/xhtml.its | 67 ++++++------ 5 files changed, 355 insertions(+), 363 deletions(-) commit 3788e65a1fee2b141318b7bffc58d9dce8339d1a Author: Shaun McCance Date: Fri Nov 1 13:48:41 2013 -0400 NEWS: Fixed typo NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dd44edfb9486e4506accb520874d4e62422e1419 Author: Shaun McCance Date: Fri Nov 1 13:43:35 2013 -0400 Version 2.0.0 NEWS | 19 +++++++++++++++++++ configure.ac | 2 +- 2 files changed, 20 insertions(+), 1 deletions(-) commit 17a89300affeac556803c23eefefc9f279a82908 Author: Shaun McCance Date: Fri Nov 1 11:53:28 2013 -0400 docbook*.its: Make info children always not within text Some of the children are marked within text because they should be when appearing in a para. But letting info appear as if it were a text run hits some strange corner cases that cause locale filter not to be applied as you might think it should. its/docbook.its | 3 +++ its/docbook5.its | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) commit 8e4ccd41ad198ebc816a43419c21714bad7dc748 Author: Shaun McCance Date: Fri Nov 1 10:46:21 2013 -0400 its: Exclude editor remarks/comments with locale filter its/docbook.its | 4 ++-- its/docbook5.its | 4 ++-- its/mallard.its | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) commit 770a84a13e30f5e5d8218ae495b430d0c3002f56 Author: Shaun McCance Date: Fri Nov 1 10:14:42 2013 -0400 itstool.in: Allow users to set ITS params its/its.its | 1 + itstool.in | 62 ++++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 39 insertions(+), 24 deletions(-) commit 6ec6088089430eb5e1cd5a2aa82eef3161b11487 Author: Shaun McCance Date: Thu Oct 31 14:16:54 2013 -0400 its: Switched built-in ITS rules to 2.0 its/its.its | 2 +- its/mallard.its | 2 +- its/ttml.its | 2 +- its/xhtml.its | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 7486a069a39b97d84fb76ff85286b40f4c8e5af0 Author: Shaun McCance Date: Thu Oct 31 14:16:31 2013 -0400 docbook5.its: Added DocBook 5 support Also minor fixed to DocBook 4 I ran across its/Makefile.am | 2 +- its/docbook.its | 7 ++- its/docbook5.its | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 207 insertions(+), 3 deletions(-) commit 844bf80669ffe05ad13c5ce540f4c32d6ed0bb31 Author: Shaun McCance Date: Thu Oct 31 09:59:11 2013 -0400 docbook.its: Updated preserve space and external resource its/docbook.its | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) commit 95d331264b29d4ad13cd661d2d3d84e2ef09e7ab Author: Shaun McCance Date: Thu Oct 31 09:54:44 2013 -0400 mallard.its: Updated preserve space and external resource its/mallard.its | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 4af2d64a7987ef2dc4121afc1bb6ebf8077230b3 Author: Shaun McCance Date: Thu Oct 31 09:49:54 2013 -0400 xhtml.its: Updated preserve space and external resource its/xhtml.its | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit d657543826789e263ac9c8861a722f2527b5b0a3 Merge: e338a3e 2928d6f Author: Shaun McCance Date: Mon Oct 28 12:05:03 2013 -0400 Merge branch 'master' into its-2-0 commit e338a3e4463d6f8098ef76c45d44851fe62cb126 Author: Shaun McCance Date: Mon Oct 28 11:06:00 2013 -0400 Support localeFilterType="exclude" itstool.in | 64 ++++++++++++++++++++++------- tests/ITS-2.0-Testsuite/run_tests.sh | 18 ++------ tests/LocaleFilter/Locale1Xml.fr_CA.po | 4 +- tests/LocaleFilter/Locale1Xml.fr_CH.po | 4 +- tests/LocaleFilter/Locale1Xml.fr_FR.po | 4 +- tests/LocaleFilter/Locale1Xml.pot | 4 +- tests/LocaleFilter/Locale2Xml.fr_CA.po | 4 +- tests/LocaleFilter/Locale2Xml.fr_CH.po | 4 +- tests/LocaleFilter/Locale2Xml.fr_FR.po | 4 +- tests/LocaleFilter/Locale2Xml.pot | 4 +- tests/LocaleFilter/Locale3Xml.fr_CA.po | 4 +- tests/LocaleFilter/Locale3Xml.fr_CH.po | 4 +- tests/LocaleFilter/Locale3Xml.fr_FR.po | 4 +- tests/LocaleFilter/Locale3Xml.pot | 4 +- tests/LocaleFilter/Locale4Xml.fr_CA.po | 4 +- tests/LocaleFilter/Locale4Xml.fr_CH.po | 4 +- tests/LocaleFilter/Locale4Xml.fr_FR.po | 4 +- tests/LocaleFilter/Locale4Xml.pot | 4 +- tests/LocaleFilter/Locale5Xml.fr_CA.po | 4 +- tests/LocaleFilter/Locale5Xml.fr_CH.po | 4 +- tests/LocaleFilter/Locale5Xml.fr_FR.po | 4 +- tests/LocaleFilter/Locale5Xml.pot | 4 +- tests/LocaleFilter/Locale6Xml.fr_CA.po | 22 ++++++++++ tests/LocaleFilter/Locale6Xml.fr_CA.xml | 13 ++++++ tests/LocaleFilter/Locale6Xml.fr_CH.po | 23 +++++++++++ tests/LocaleFilter/Locale6Xml.fr_CH.xml | 13 ++++++ tests/LocaleFilter/Locale6Xml.fr_FR.po | 22 ++++++++++ tests/LocaleFilter/Locale6Xml.fr_FR.xml | 13 ++++++ tests/LocaleFilter/Locale6Xml.joined.xml | 22 ++++++++++ tests/LocaleFilter/Locale6Xml.pot | 23 +++++++++++ tests/LocaleFilter/Locale6Xml.xml | 20 +++++++++ tests/run_tests.py | 16 +++++++ 32 files changed, 279 insertions(+), 70 deletions(-) commit 9f85a74071db1fa5ca3a2dd83a3ab187884fb7f7 Author: Shaun McCance Date: Sun Oct 27 22:36:56 2013 -0400 Update ITS 2.0 test suite .../elementswithintext/html/withintext1html.html | 64 ++++++++-------- .../html/withintext1htmlrules.xml | 8 +- .../elementswithintext/html/withintext2html.html | 20 +++--- .../elementswithintext/html/withintext3html.html | 64 ++++++++-------- .../html/withintext3htmlrules.xml | 10 +- .../elementswithintext/html/withintext4html.html | 76 ++++++++++---------- .../elementswithintext/xml/withintext1xml.xml | 24 +++--- .../elementswithintext/xml/withintext2xml.xml | 50 ++++++------ .../elementswithintext/xml/withintext2xmlrules.xml | 12 ++-- .../elementswithintext/xml/withintext3xml.xml | 22 +++--- .../elementswithintext/xml/withintext4xml.xml | 24 +++--- .../elementswithintext/xml/withintext5xml.xml | 50 ++++++------ .../elementswithintext/xml/withintext6xml.xml | 42 +++++----- .../elementswithintext/xml/withintext6xmlrules.xml | 10 +- .../html/externalresource1html.html | 30 ++++---- .../html/externalresource1htmlrules.xml | 8 +- .../html/externalresource2html.html | 34 ++++---- .../html/externalresource2htmlrules.xml | 8 +- .../html/externalresource3html.html | 40 +++++----- .../externalresource/xml/externalresource1xml.xml | 48 ++++++------ .../externalresource/xml/externalresource2xml.xml | 44 ++++++------ .../xml/externalresource2xmlrules.xml | 6 +- .../externalresource/xml/externalresource3xml.xml | 56 +++++++------- .../xml/externalresource3xmlrules.xml | 6 +- .../externalresource/xml/externalresource4xml.xml | 50 ++++++------ .../externalresource/xml/externalresource5xml.xml | 40 +++++----- .../xml/externalresource5xmlrules.xml | 10 +- .../inputdata/idvalue/html/idvalue1html.html | 32 ++++---- .../inputdata/idvalue/html/idvalue1htmlrules.xml | 12 ++-- .../inputdata/idvalue/html/idvalue2html.html | 34 ++++---- .../inputdata/idvalue/html/idvalue2htmlrules.xml | 14 ++-- .../inputdata/idvalue/html/idvalue3html.html | 44 ++++++------ .../inputdata/idvalue/xml/idvalue1xml.xml | 40 +++++----- .../inputdata/idvalue/xml/idvalue2xml.xml | 8 +- .../inputdata/idvalue/xml/idvalue3xml.xml | 26 +++--- .../inputdata/idvalue/xml/idvalue3xmlrules.xml | 6 +- .../inputdata/idvalue/xml/idvalue4xml.xml | 34 ++++---- .../inputdata/idvalue/xml/idvalue4xmlrules.xml | 8 +- .../inputdata/idvalue/xml/idvalue5xml.xml | 40 +++++----- .../inputdata/localefilter/html/locale1html.html | 28 ++++---- .../localefilter/html/locale1htmlrules.xml | 6 +- .../inputdata/localefilter/html/locale2html.html | 24 +++--- .../inputdata/localefilter/html/locale3html.html | 28 ++++---- .../localefilter/html/locale3htmlrules.xml | 8 +- .../inputdata/localefilter/html/locale4html.html | 36 +++++----- .../inputdata/localefilter/html/locale5html.html | 42 +++++----- .../inputdata/localefilter/xml/locale1xml.xml | 24 +++--- .../inputdata/localefilter/xml/locale2xml.xml | 18 ++-- .../inputdata/localefilter/xml/locale3xml.xml | 20 +++--- .../inputdata/localefilter/xml/locale3xmlrules.xml | 6 +- .../inputdata/localefilter/xml/locale4xml.xml | 32 ++++---- .../inputdata/localefilter/xml/locale4xmlrules.xml | 6 +- .../inputdata/localefilter/xml/locale5xml.xml | 16 ++-- .../inputdata/localefilter/xml/locale6xml.xml | 26 +++--- .../inputdata/localefilter/xml/locale7xml.xml | 26 +++--- .../inputdata/localefilter/xml/locale7xmlrules.xml | 8 +- .../inputdata/localefilter/xml/locale8xml.xml | 36 +++++----- .../localizationnote/html/locnote1html.html | 22 +++--- .../localizationnote/html/locnote1htmlrules.xml | 14 ++-- .../localizationnote/html/locnote2html.html | 40 +++++----- .../localizationnote/html/locnote2htmlrules.xml | 8 +- .../localizationnote/html/locnote3html.html | 24 +++--- .../localizationnote/html/locnote3htmlrules.xml | 6 +- .../localizationnote/html/locnote4html.html | 32 ++++---- .../localizationnote/html/locnote4htmlrules.xml | 6 +- .../localizationnote/html/locnote5html.html | 42 +++++----- .../localizationnote/html/locnote5htmlrules.xml | 30 ++++---- .../localizationnote/html/locnote6html.html | 42 +++++----- .../localizationnote/html/locnote6htmlrules.xml | 30 ++++---- .../localizationnote/html/locnote7html.html | 20 +++--- .../localizationnote/html/locnote8html.html | 42 +++++----- .../localizationnote/html/locnote8htmlrules.xml | 32 ++++---- .../localizationnote/html/locnote9html.html | 40 +++++----- .../localizationnote/xml/locnote10xml.xml | 66 ++++++++-------- .../localizationnote/xml/locnote11xml.xml | 36 +++++----- .../localizationnote/xml/locnote11xmlrules.xml | 32 ++++---- .../inputdata/localizationnote/xml/locnote1xml.xml | 26 +++--- .../inputdata/localizationnote/xml/locnote2xml.xml | 38 +++++----- .../inputdata/localizationnote/xml/locnote3xml.xml | 24 +++--- .../inputdata/localizationnote/xml/locnote4xml.xml | 32 ++++---- .../inputdata/localizationnote/xml/locnote5xml.xml | 30 ++++---- .../localizationnote/xml/locnote5xmlrules.xml | 18 ++-- .../inputdata/localizationnote/xml/locnote6xml.xml | 42 +++++----- .../inputdata/localizationnote/xml/locnote7xml.xml | 40 +++++----- .../inputdata/localizationnote/xml/locnote8xml.xml | 34 ++++---- .../inputdata/localizationnote/xml/locnote9xml.xml | 16 ++-- .../preservespace/xml/preservespace1xml.xml | 26 +++--- .../preservespace/xml/preservespace2xml.xml | 16 ++-- .../preservespace/xml/preservespace3xml.xml | 22 +++--- .../preservespace/xml/preservespace3xmlrules.xml | 6 +- .../preservespace/xml/preservespace4xml.xml | 16 ++-- .../preservespace/xml/preservespace5xml.xml | 28 ++++---- .../preservespace/xml/preservespace6xml.xml | 18 ++-- .../preservespace/xml/preservespace6xmlrules.xml | 8 +- .../inputdata/translate/html/translate1html.html | 34 ++++---- .../translate/html/translate1htmlrules.xml | 8 +- .../inputdata/translate/html/translate2html.html | 36 +++++----- .../inputdata/translate/html/translate3html.html | 46 ++++++------ .../translate/html/translate3htmlrules.xml | 8 +- .../inputdata/translate/html/translate4html.html | 46 ++++++------ .../translate/html/translate4htmlrules.xml | 8 +- .../inputdata/translate/html/translate5html.html | 68 +++++++++--------- .../translate/html/translate5htmlrules.xml | 8 +- .../inputdata/translate/html/translate6html.html | 68 +++++++++--------- .../translate/html/translate6htmlrules.xml | 12 ++-- .../inputdata/translate/html/translate7html.html | 38 +++++----- .../inputdata/translate/xml/translate10xml.xml | 14 ++-- .../translate/xml/translate10xmlrules.xml | 10 +- .../inputdata/translate/xml/translate1xml.xml | 78 ++++++++++---------- .../inputdata/translate/xml/translate2xml.xml | 20 +++--- .../inputdata/translate/xml/translate2xmlrules.xml | 10 +- .../inputdata/translate/xml/translate3xml.xml | 26 +++--- .../inputdata/translate/xml/translate3xmlrules.xml | 12 ++-- .../inputdata/translate/xml/translate4xml.xml | 22 +++--- .../inputdata/translate/xml/translate5xml.xml | 26 +++--- .../inputdata/translate/xml/translate6xml.xml | 38 +++++----- .../inputdata/translate/xml/translate7xml.xml | 38 +++++----- .../inputdata/translate/xml/translate8xml.xml | 56 +++++++------- .../inputdata/translate/xml/translate9xml.xml | 22 +++--- 119 files changed, 1650 insertions(+), 1650 deletions(-) commit dde5a9ac006ab839b67e711e27977fbf074dc04e Author: Shaun McCance Date: Sun Oct 27 21:02:46 2013 -0400 Add support for its:param itstool.in | 12 +++++++++++- tests/ITS-2.0-Testsuite/run_tests.sh | 16 +--------------- 2 files changed, 12 insertions(+), 16 deletions(-) commit 45872e7e4252aadd0fc304ab3c9d1d740c690b5f Author: Shaun McCance Date: Sun Oct 27 13:45:12 2013 -0400 Fixed issue with preserveSpace from xml:space attribute itstool.in | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) commit 29d6a9ea85c8fb939b4fdaabb92e08eb42bfdefc Author: Shaun McCance Date: Sun Oct 27 13:45:00 2013 -0400 Updated ITS 2.0 test suite .../html/withintext1htmloutput.txt | 14 +++++--- .../html/withintext3htmloutput.txt | 12 ++++--- .../html/withintext4htmloutput.txt | 16 +++++---- .../html/externalresource1htmloutput.txt | 7 ++-- .../html/externalresource2htmloutput.txt | 21 ++++++------ .../html/externalresource3htmloutput.txt | 7 ++-- .../localefilter/html/locale1htmloutput.txt | 24 +++++++------- .../localefilter/html/locale2htmloutput.txt | 20 ++++++------ .../localefilter/html/locale3htmloutput.txt | 24 +++++++------- .../localefilter/html/locale4htmloutput.txt | 22 ++++++------ .../localefilter/html/locale5htmloutput.txt | 21 ++++++++++++ .../expected/localefilter/xml/locale1xmloutput.txt | 22 ++++++------ .../expected/localefilter/xml/locale2xmloutput.txt | 12 +++--- .../expected/localefilter/xml/locale3xmloutput.txt | 18 +++++----- .../expected/localefilter/xml/locale4xmloutput.txt | 34 ++++++++++---------- .../expected/localefilter/xml/locale5xmloutput.txt | 12 +++--- .../expected/localefilter/xml/locale6xmloutput.txt | 30 +++++++++--------- .../expected/localefilter/xml/locale7xmloutput.txt | 24 +++++++------- .../expected/localefilter/xml/locale8xmloutput.txt | 19 +++++++++++ .../localizationnote/xml/locnote1xmloutput.txt | 1 - .../translate/html/translate1htmloutput.txt | 7 +++- .../translate/html/translate2htmloutput.txt | 6 +++ .../translate/html/translate3htmloutput.txt | 1 + .../translate/html/translate7htmloutput.txt | 4 ++- .../expected/translate/xml/translate4xmloutput.txt | 5 +++ .../elementswithintext/html/withintext1html.html | 12 +++--- .../html/withintext1htmlrules.xml | 2 - .../elementswithintext/html/withintext3html.html | 14 ++++---- .../html/withintext3htmlrules.xml | 5 +-- .../elementswithintext/html/withintext4html.html | 14 +++----- .../html/externalresource1html.html | 4 +-- .../html/externalresource2html.html | 8 ++--- .../html/externalresource2htmlrules.xml | 2 +- .../html/externalresource3html.html | 4 +-- .../inputdata/idvalue/html/idvalue2htmlrules.xml | 9 ++--- .../inputdata/localefilter/html/locale5html.html | 21 ++++++++++++ .../inputdata/localefilter/xml/locale8xml.xml | 18 ++++++++++ .../inputdata/localizationnote/xml/locnote1xml.xml | 3 +- .../inputdata/translate/html/translate1html.html | 1 + .../translate/html/translate1htmlrules.xml | 2 +- .../inputdata/translate/html/translate2html.html | 3 +- .../inputdata/translate/html/translate3html.html | 2 +- .../inputdata/translate/html/translate7html.html | 4 +- .../inputdata/translate/xml/translate4xml.xml | 1 + tests/ITS-2.0-Testsuite/run_tests.sh | 8 +++++ 45 files changed, 309 insertions(+), 211 deletions(-) commit 2928d6f02a0f30415bd993490d1920fd990ce130 Author: Shaun McCance Date: Sat Sep 21 16:24:35 2013 -0400 Added an option to retain entity references You still have to load the DTD if the entities are defined in the external subset, because libxml2 checks references even if it doesn't dereference them. It would be nice if this weren't necessary. itstool.in | 32 +++++++++++++++++++++++++++----- tests/IT-keep-entities-1.ll.po | 21 +++++++++++++++++++++ tests/IT-keep-entities-1.ll.xml | 7 +++++++ tests/IT-keep-entities-1.pot | 21 +++++++++++++++++++++ tests/IT-keep-entities-1.xml | 7 +++++++ tests/IT-keep-entities-2.ll.po | 21 +++++++++++++++++++++ tests/IT-keep-entities-2.ll.xml | 9 +++++++++ tests/IT-keep-entities-2.pot | 21 +++++++++++++++++++++ tests/IT-keep-entities-2.xml | 9 +++++++++ tests/run_tests.py | 20 ++++++++++++++------ 10 files changed, 157 insertions(+), 11 deletions(-) commit 309b2cee105430c5ed387d7862e9405d41e76088 Author: Shaun McCance Date: Sat Sep 21 12:17:12 2013 -0400 Fix utf8 issue introduced in Sep 20 commit itstool.in | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) commit cf30d00a9d4802f9d7479d28a4a3ce420bc36aaf Merge: e4c6ada c9dd17a Author: Shaun McCance Date: Wed Aug 21 09:50:32 2013 -0400 Merge commit 'refs/merge-requests/5' of gitorious.org:itstool/itstool commit e4c6adab00c64141483b322d482a3819968b700e Merge: 5040a32 34cc26b Author: Shaun McCance Date: Wed Aug 21 09:45:39 2013 -0400 Merge commit 'refs/merge-requests/4' of gitorious.org:itstool/itstool commit c9dd17a6504339eb712e0688b68de01566792b7a Author: Clement Chauplannaz Date: Sun Jun 9 16:52:29 2013 +0200 Configure: test for python module libxml2 presence configure.ac | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) commit ab2f5c7430c640cef0dddb7991dc9cfb77284332 Author: Shaun McCance Date: Sat Feb 9 23:03:47 2013 -0500 Properly handle loc note inheritance itstool.in | 11 +++++++---- tests/ITS-2.0-Testsuite/run_tests.sh | 5 ----- 2 files changed, 7 insertions(+), 9 deletions(-) commit 2f77297d840b27a3b294fa098c4a9fb20130a954 Author: Shaun McCance Date: Sat Feb 9 22:43:07 2013 -0500 Add LocNote class to better track localization note info itstool.in | 69 ++++++++++++++++++++++++--------- tests/ITS-2.0-Testsuite/run_tests.sh | 5 -- 2 files changed, 50 insertions(+), 24 deletions(-) commit 64121755e4c515f184acd0f99bab20798a865178 Author: Shaun McCance Date: Sat Feb 9 13:51:37 2013 -0500 Fix IdValue for attributes and nodes with attributes itstool.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a6becc8bbc4ce20217ba6a8bd11016297db2e607 Author: Shaun McCance Date: Sat Feb 2 14:15:56 2013 -0500 Adding the ITS 2.0 test suite, found here: https://github.com/finnle/ITS-2.0-Testsuite/commits/master itstool.in | 33 ++++++++--- tests/ITS-2.0-Testsuite/README | 1 + .../html/withintext1htmloutput.txt | 24 ++++++++ .../html/withintext2htmloutput.txt | 10 +++ .../html/withintext3htmloutput.txt | 24 ++++++++ .../html/withintext4htmloutput.txt | 24 ++++++++ .../xml/withintext1xmloutput.txt | 17 +++++ .../xml/withintext2xmloutput.txt | 28 +++++++++ .../xml/withintext3xmloutput.txt | 15 +++++ .../xml/withintext4xmloutput.txt | 15 +++++ .../xml/withintext5xmloutput.txt | 20 ++++++ .../xml/withintext6xmloutput.txt | 13 ++++ .../html/externalresource1htmloutput.txt | 19 ++++++ .../html/externalresource2htmloutput.txt | 21 +++++++ .../html/externalresource3htmloutput.txt | 18 ++++++ .../xml/externalresource1xmloutput.txt | 17 +++++ .../xml/externalresource2xmloutput.txt | 15 +++++ .../xml/externalresource3xmloutput.txt | 23 +++++++ .../xml/externalresource4xmloutput.txt | 19 ++++++ .../xml/externalresource5xmloutput.txt | 15 +++++ .../expected/idvalue/html/idvalue1htmloutput.txt | 15 +++++ .../expected/idvalue/html/idvalue2htmloutput.txt | 17 +++++ .../expected/idvalue/html/idvalue3htmloutput.txt | 14 ++++ .../expected/idvalue/xml/idvalue1xmloutput.txt | 18 ++++++ .../expected/idvalue/xml/idvalue2xmloutput.txt | 6 ++ .../expected/idvalue/xml/idvalue3xmloutput.txt | 14 ++++ .../expected/idvalue/xml/idvalue4xmloutput.txt | 18 ++++++ .../expected/idvalue/xml/idvalue5xmloutput.txt | 22 +++++++ .../localefilter/html/locale1htmloutput.txt | 12 ++++ .../localefilter/html/locale2htmloutput.txt | 10 +++ .../localefilter/html/locale3htmloutput.txt | 12 ++++ .../localefilter/html/locale4htmloutput.txt | 11 ++++ .../expected/localefilter/xml/locale1xmloutput.txt | 11 ++++ .../expected/localefilter/xml/locale2xmloutput.txt | 6 ++ .../expected/localefilter/xml/locale3xmloutput.txt | 9 +++ .../expected/localefilter/xml/locale4xmloutput.txt | 17 +++++ .../expected/localefilter/xml/locale5xmloutput.txt | 6 ++ .../expected/localefilter/xml/locale6xmloutput.txt | 15 +++++ .../expected/localefilter/xml/locale7xmloutput.txt | 12 ++++ .../localizationnote/html/locnote1htmloutput.txt | 11 ++++ .../localizationnote/html/locnote2htmloutput.txt | 17 +++++ .../localizationnote/html/locnote3htmloutput.txt | 11 ++++ .../localizationnote/html/locnote4htmloutput.txt | 17 +++++ .../localizationnote/html/locnote5htmloutput.txt | 21 +++++++ .../localizationnote/html/locnote6htmloutput.txt | 21 +++++++ .../localizationnote/html/locnote7htmloutput.txt | 11 ++++ .../localizationnote/html/locnote8htmloutput.txt | 21 +++++++ .../localizationnote/html/locnote9htmloutput.txt | 11 ++++ .../localizationnote/xml/locnote10xmloutput.txt | 31 ++++++++++ .../localizationnote/xml/locnote11xmloutput.txt | 19 ++++++ .../localizationnote/xml/locnote1xmloutput.txt | 12 ++++ .../localizationnote/xml/locnote2xmloutput.txt | 20 ++++++ .../localizationnote/xml/locnote3xmloutput.txt | 11 ++++ .../localizationnote/xml/locnote4xmloutput.txt | 17 +++++ .../localizationnote/xml/locnote5xmloutput.txt | 23 +++++++ .../localizationnote/xml/locnote6xmloutput.txt | 29 +++++++++ .../localizationnote/xml/locnote7xmloutput.txt | 20 ++++++ .../localizationnote/xml/locnote8xmloutput.txt | 20 ++++++ .../localizationnote/xml/locnote9xmloutput.txt | 11 ++++ .../preservespace/xml/preservespace1xmloutput.txt | 9 +++ .../preservespace/xml/preservespace2xmloutput.txt | 4 + .../preservespace/xml/preservespace3xmloutput.txt | 7 ++ .../preservespace/xml/preservespace4xmloutput.txt | 4 + .../preservespace/xml/preservespace5xmloutput.txt | 12 ++++ .../preservespace/xml/preservespace6xmloutput.txt | 8 +++ .../translate/html/translate1htmloutput.txt | 13 ++++ .../translate/html/translate2htmloutput.txt | 11 ++++ .../translate/html/translate3htmloutput.txt | 15 +++++ .../translate/html/translate4htmloutput.txt | 15 +++++ .../translate/html/translate5htmloutput.txt | 24 ++++++++ .../translate/html/translate6htmloutput.txt | 24 ++++++++ .../translate/html/translate7htmloutput.txt | 12 ++++ .../translate/xml/translate10xmloutput.txt | 17 +++++ .../expected/translate/xml/translate1xmloutput.txt | 59 ++++++++++++++++++ .../expected/translate/xml/translate2xmloutput.txt | 11 ++++ .../expected/translate/xml/translate3xmloutput.txt | 17 +++++ .../expected/translate/xml/translate4xmloutput.txt | 10 +++ .../expected/translate/xml/translate5xmloutput.txt | 11 ++++ .../expected/translate/xml/translate6xmloutput.txt | 22 +++++++ .../expected/translate/xml/translate7xmloutput.txt | 22 +++++++ .../expected/translate/xml/translate8xmloutput.txt | 28 +++++++++ .../expected/translate/xml/translate9xmloutput.txt | 23 +++++++ .../elementswithintext/html/withintext1html.html | 32 ++++++++++ .../html/withintext1htmlrules.xml | 6 ++ .../elementswithintext/html/withintext2html.html | 10 +++ .../elementswithintext/html/withintext3html.html | 32 ++++++++++ .../html/withintext3htmlrules.xml | 6 ++ .../elementswithintext/html/withintext4html.html | 40 ++++++++++++ .../elementswithintext/xml/withintext1xml.xml | 12 ++++ .../elementswithintext/xml/withintext2xml.xml | 25 ++++++++ .../elementswithintext/xml/withintext2xmlrules.xml | 6 ++ .../elementswithintext/xml/withintext3xml.xml | 11 ++++ .../elementswithintext/xml/withintext4xml.xml | 12 ++++ .../elementswithintext/xml/withintext5xml.xml | 25 ++++++++ .../elementswithintext/xml/withintext6xml.xml | 21 +++++++ .../elementswithintext/xml/withintext6xmlrules.xml | 5 ++ .../html/externalresource1html.html | 17 +++++ .../html/externalresource1htmlrules.xml | 4 + .../html/externalresource2html.html | 19 ++++++ .../html/externalresource2htmlrules.xml | 4 + .../html/externalresource3html.html | 22 +++++++ .../externalresource/xml/externalresource1xml.xml | 24 ++++++++ .../externalresource/xml/externalresource2xml.xml | 22 +++++++ .../xml/externalresource2xmlrules.xml | 3 + .../externalresource/xml/externalresource3xml.xml | 28 +++++++++ .../xml/externalresource3xmlrules.xml | 3 + .../externalresource/xml/externalresource4xml.xml | 25 ++++++++ .../externalresource/xml/externalresource5xml.xml | 20 ++++++ .../xml/externalresource5xmlrules.xml | 5 ++ .../inputdata/idvalue/html/idvalue1html.html | 16 +++++ .../inputdata/idvalue/html/idvalue1htmlrules.xml | 6 ++ .../inputdata/idvalue/html/idvalue2html.html | 17 +++++ .../inputdata/idvalue/html/idvalue2htmlrules.xml | 8 +++ .../inputdata/idvalue/html/idvalue3html.html | 22 +++++++ .../inputdata/idvalue/xml/idvalue1xml.xml | 20 ++++++ .../inputdata/idvalue/xml/idvalue2xml.xml | 4 + .../inputdata/idvalue/xml/idvalue3xml.xml | 13 ++++ .../inputdata/idvalue/xml/idvalue3xmlrules.xml | 3 + .../inputdata/idvalue/xml/idvalue4xml.xml | 17 +++++ .../inputdata/idvalue/xml/idvalue4xmlrules.xml | 4 + .../inputdata/idvalue/xml/idvalue5xml.xml | 20 ++++++ .../inputdata/localefilter/html/locale1html.html | 14 ++++ .../localefilter/html/locale1htmlrules.xml | 3 + .../inputdata/localefilter/html/locale2html.html | 12 ++++ .../inputdata/localefilter/html/locale3html.html | 14 ++++ .../localefilter/html/locale3htmlrules.xml | 4 + .../inputdata/localefilter/html/locale4html.html | 18 ++++++ .../inputdata/localefilter/xml/locale1xml.xml | 12 ++++ .../inputdata/localefilter/xml/locale2xml.xml | 9 +++ .../inputdata/localefilter/xml/locale3xml.xml | 10 +++ .../inputdata/localefilter/xml/locale3xmlrules.xml | 3 + .../inputdata/localefilter/xml/locale4xml.xml | 16 +++++ .../inputdata/localefilter/xml/locale4xmlrules.xml | 3 + .../inputdata/localefilter/xml/locale5xml.xml | 8 +++ .../inputdata/localefilter/xml/locale6xml.xml | 14 ++++ .../inputdata/localefilter/xml/locale7xml.xml | 13 ++++ .../inputdata/localefilter/xml/locale7xmlrules.xml | 4 + .../localizationnote/html/locnote1html.html | 11 ++++ .../localizationnote/html/locnote1htmlrules.xml | 7 ++ .../localizationnote/html/locnote2html.html | 20 ++++++ .../localizationnote/html/locnote2htmlrules.xml | 4 + .../localizationnote/html/locnote3html.html | 12 ++++ .../localizationnote/html/locnote3htmlrules.xml | 3 + .../localizationnote/html/locnote4html.html | 16 +++++ .../localizationnote/html/locnote4htmlrules.xml | 3 + .../localizationnote/html/locnote5html.html | 21 +++++++ .../localizationnote/html/locnote5htmlrules.xml | 15 +++++ .../localizationnote/html/locnote6html.html | 21 +++++++ .../localizationnote/html/locnote6htmlrules.xml | 15 +++++ .../localizationnote/html/locnote7html.html | 10 +++ .../localizationnote/html/locnote8html.html | 21 +++++++ .../localizationnote/html/locnote8htmlrules.xml | 16 +++++ .../localizationnote/html/locnote9html.html | 20 ++++++ .../localizationnote/xml/locnote10xml.xml | 33 ++++++++++ .../localizationnote/xml/locnote11xml.xml | 18 ++++++ .../localizationnote/xml/locnote11xmlrules.xml | 16 +++++ .../inputdata/localizationnote/xml/locnote1xml.xml | 14 ++++ .../inputdata/localizationnote/xml/locnote2xml.xml | 19 ++++++ .../inputdata/localizationnote/xml/locnote3xml.xml | 12 ++++ .../inputdata/localizationnote/xml/locnote4xml.xml | 16 +++++ .../inputdata/localizationnote/xml/locnote5xml.xml | 15 +++++ .../localizationnote/xml/locnote5xmlrules.xml | 9 +++ .../inputdata/localizationnote/xml/locnote6xml.xml | 21 +++++++ .../inputdata/localizationnote/xml/locnote7xml.xml | 20 ++++++ .../inputdata/localizationnote/xml/locnote8xml.xml | 17 +++++ .../inputdata/localizationnote/xml/locnote9xml.xml | 8 +++ .../preservespace/xml/preservespace1xml.xml | 13 ++++ .../preservespace/xml/preservespace2xml.xml | 8 +++ .../preservespace/xml/preservespace3xml.xml | 11 ++++ .../preservespace/xml/preservespace3xmlrules.xml | 3 + .../preservespace/xml/preservespace4xml.xml | 8 +++ .../preservespace/xml/preservespace5xml.xml | 14 ++++ .../preservespace/xml/preservespace6xml.xml | 9 +++ .../preservespace/xml/preservespace6xmlrules.xml | 4 + .../inputdata/translate/html/translate1html.html | 16 +++++ .../translate/html/translate1htmlrules.xml | 4 + .../inputdata/translate/html/translate2html.html | 17 +++++ .../inputdata/translate/html/translate3html.html | 23 +++++++ .../translate/html/translate3htmlrules.xml | 4 + .../inputdata/translate/html/translate4html.html | 23 +++++++ .../translate/html/translate4htmlrules.xml | 4 + .../inputdata/translate/html/translate5html.html | 34 +++++++++++ .../translate/html/translate5htmlrules.xml | 4 + .../inputdata/translate/html/translate6html.html | 34 +++++++++++ .../translate/html/translate6htmlrules.xml | 6 ++ .../inputdata/translate/html/translate7html.html | 19 ++++++ .../inputdata/translate/xml/translate10xml.xml | 7 ++ .../translate/xml/translate10xmlrules.xml | 5 ++ .../inputdata/translate/xml/translate1xml.xml | 39 ++++++++++++ .../inputdata/translate/xml/translate2xml.xml | 10 +++ .../inputdata/translate/xml/translate2xmlrules.xml | 5 ++ .../inputdata/translate/xml/translate3xml.xml | 13 ++++ .../inputdata/translate/xml/translate3xmlrules.xml | 6 ++ .../inputdata/translate/xml/translate4xml.xml | 10 +++ .../inputdata/translate/xml/translate5xml.xml | 13 ++++ .../inputdata/translate/xml/translate6xml.xml | 19 ++++++ .../inputdata/translate/xml/translate7xml.xml | 19 ++++++ .../inputdata/translate/xml/translate8xml.xml | 28 +++++++++ .../inputdata/translate/xml/translate9xml.xml | 11 ++++ tests/ITS-2.0-Testsuite/run_tests.sh | 63 ++++++++++++++++++++ 200 files changed, 3025 insertions(+), 8 deletions(-) commit 24811c8cfcbc14cc480a2fbef2288245019f8a7e Author: Shaun McCance Date: Wed Sep 26 07:46:10 2012 -0400 Implemented ITS 2.0 "ID Value" data category itstool.in | 48 ++++++++++++++++++++++++++++++++++++- tests/IdValue/idvalue1xml.pot | 23 +++++++++++++++++ tests/IdValue/idvalue1xml.xml | 12 +++++++++ tests/IdValue/idvalue2xml.pot | 22 +++++++++++++++++ tests/IdValue/idvalue2xml.xml | 4 +++ tests/IdValue/idvalue3XmlRule.xml | 4 +++ tests/IdValue/idvalue3xml.pot | 23 +++++++++++++++++ tests/IdValue/idvalue3xml.xml | 11 ++++++++ tests/run_tests.py | 9 +++++++ 9 files changed, 155 insertions(+), 1 deletions(-) commit 1440e3b495ae502658e5e5ede6c09babce4bc4f9 Author: Shaun McCance Date: Fri Sep 21 09:39:42 2012 -0400 Support for local withinText itstool.in | 12 ++++++++++-- tests/elementwithintextLocalXml.ll.po | 16 ++++++++++++++++ tests/elementwithintextLocalXml.ll.xml | 6 ++++++ tests/elementwithintextLocalXml.pot | 16 ++++++++++++++++ tests/elementwithintextLocalXml.xml | 8 ++++++++ tests/elementwithintextlocalitsSpanXml.ll.po | 16 ++++++++++++++++ tests/elementwithintextlocalitsSpanXml.ll.xml | 6 ++++++ tests/elementwithintextlocalitsSpanXml.pot | 16 ++++++++++++++++ tests/elementwithintextlocalitsSpanXml.xml | 7 +++++++ tests/run_tests.py | 6 ++++++ 10 files changed, 107 insertions(+), 2 deletions(-) commit 2bca336117edee032ad956994d2ef3650f25e322 Author: Shaun McCance Date: Thu Sep 20 20:12:36 2012 -0400 Fix tests for namespace prefix handling itstool.in | 8 ++++---- tests/IT-prefixes-1.ll.po | 16 +++------------- tests/IT-prefixes-1.ll.xml | 7 ++++++- tests/IT-prefixes-1.pot | 16 +++------------- tests/IT-prefixes-1.xml | 5 +++++ 5 files changed, 21 insertions(+), 31 deletions(-) commit 3a56e53c4cd157da0c5f21c18806047e6b64eddb Merge: 70f6f5e 5040a32 Author: Shaun McCance Date: Thu Sep 20 19:58:18 2012 -0400 Merge branch 'master' into its-2-0 commit 5040a328ba73ec3dd119f013b9a12a2fdc99a6b9 Author: Shaun McCance Date: Thu Sep 20 18:37:44 2012 -0400 Support namespace prefixes on elements itstool.in | 10 ++++++++-- tests/IT-prefixes-1.ll.po | 36 ++++++++++++++++++++++++++++++++++++ tests/IT-prefixes-1.ll.xml | 16 ++++++++++++++++ tests/IT-prefixes-1.pot | 36 ++++++++++++++++++++++++++++++++++++ tests/IT-prefixes-1.xml | 19 +++++++++++++++++++ tests/run_tests.py | 3 +++ 6 files changed, 118 insertions(+), 2 deletions(-) commit 70f6f5ef01dc03e624e47a341b146ac099be4ebd Author: Shaun McCance Date: Wed Sep 19 19:58:37 2012 -0400 Adding test output for External Resource itstool.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit a0880365b8562d59e81889e980429aef840f89c4 Author: Shaun McCance Date: Wed Sep 19 16:49:47 2012 -0400 Use External Resource implementation for itst:externalRefRule itstool.in | 46 +++++------------------------------------- tests/IT-externalRef1.ll.po | 12 +++++----- tests/IT-externalRef1.pot | 12 +++++----- 3 files changed, 18 insertions(+), 52 deletions(-) commit fee986b054284b029b7b870eff6ded9fd53e43a0 Author: Shaun McCance Date: Wed Sep 19 16:44:37 2012 -0400 Implemented ITS 2.0 External Resource data category itstool.in | 51 ++++++++++++++++++++ .../Attr/ExternalResource1AttrXml.pot | 41 ++++++++++++++++ .../Attr/ExternalResource1AttrXml.xml | 24 +++++++++ .../Attr/ExternalResource2AttrRule.xml | 3 + .../Attr/ExternalResource2AttrXml.pot | 41 ++++++++++++++++ .../Attr/ExternalResource2AttrXml.xml | 22 ++++++++ .../Attr/ExternalResource3AttrRule.xml | 3 + .../Attr/ExternalResource3AttrXml.pot | 51 ++++++++++++++++++++ .../Attr/ExternalResource3AttrXml.xml | 28 +++++++++++ tests/ExternalResource/Attr/movie-frame.gif | 1 + tests/ExternalResource/Attr/movie.avi | 1 + tests/ExternalResource/Attr/movie.mp3 | 1 + tests/ExternalResource/ExternalResource1Xml.pot | 41 ++++++++++++++++ tests/ExternalResource/ExternalResource1Xml.xml | 24 +++++++++ tests/ExternalResource/ExternalResource2Rule.xml | 3 + tests/ExternalResource/ExternalResource2Xml.pot | 41 ++++++++++++++++ tests/ExternalResource/ExternalResource2Xml.xml | 22 ++++++++ tests/ExternalResource/ExternalResource3Rule.xml | 3 + tests/ExternalResource/ExternalResource3Xml.pot | 51 ++++++++++++++++++++ tests/ExternalResource/ExternalResource3Xml.xml | 28 +++++++++++ tests/ExternalResource/movie-frame.gif | 1 + tests/ExternalResource/movie.avi | 1 + tests/ExternalResource/movie.mp3 | 1 + tests/run_tests.py | 18 +++++++ 24 files changed, 501 insertions(+), 0 deletions(-) commit bec881523df59fb1380f82ab0a789d67c34a58ed Author: Shaun McCance Date: Wed Sep 19 14:10:24 2012 -0400 Adding a test for itst:externalRefRule Don't know why I never had a test for this before. I'm going to implement the ITS 2.0 External Resource data category, and retool this extension on top, so I need to make sure I don't break it. tests/IT-externalRef1.ll.po | 31 +++++++++++++++++++++++++++++++ tests/IT-externalRef1.ll.xml | 10 ++++++++++ tests/IT-externalRef1.pot | 31 +++++++++++++++++++++++++++++++ tests/IT-externalRef1.txt | 1 + tests/IT-externalRef1.xml | 10 ++++++++++ tests/run_tests.py | 3 +++ 6 files changed, 86 insertions(+), 0 deletions(-) commit ce76559b75fc60ef2a6d69dc99e1781b6adcfe99 Author: Shaun McCance Date: Wed Sep 12 10:21:22 2012 -0400 Moving some of the tests into subdirectories tests/EX-locNote-element-1.pot | 18 ------- tests/EX-locNote-element-1.xml | 14 ------ tests/EX-locNote-selector-2.pot | 37 --------------- tests/EX-locNote-selector-2.xml | 10 ---- tests/EX-locNotePointer-attribute-1.pot | 23 --------- tests/EX-locNotePointer-attribute-1.xml | 19 -------- tests/EX-locNoteRef-attribute-1.pot | 17 ------- tests/EX-locNoteRef-attribute-1.xml | 12 ----- tests/EX-locNoteRefPointer-attribute-1.pot | 23 --------- tests/EX-locNoteRefPointer-attribute-1.xml | 16 ------- tests/LocNote/EX-locNote-element-1.pot | 18 +++++++ tests/LocNote/EX-locNote-element-1.xml | 14 ++++++ tests/LocNote/EX-locNote-selector-2.pot | 37 +++++++++++++++ tests/LocNote/EX-locNote-selector-2.xml | 10 ++++ tests/LocNote/EX-locNotePointer-attribute-1.pot | 23 +++++++++ tests/LocNote/EX-locNotePointer-attribute-1.xml | 19 ++++++++ tests/LocNote/EX-locNoteRef-attribute-1.pot | 17 +++++++ tests/LocNote/EX-locNoteRef-attribute-1.xml | 12 +++++ tests/LocNote/EX-locNoteRefPointer-attribute-1.pot | 23 +++++++++ tests/LocNote/EX-locNoteRefPointer-attribute-1.xml | 16 +++++++ tests/LocNote/LocNote1.pot | 48 ++++++++++++++++++++ tests/LocNote/LocNote1.xml | 21 +++++++++ tests/LocNote/LocNote2.pot | 33 +++++++++++++ tests/LocNote/LocNote2.xml | 15 ++++++ tests/LocNote/LocNote2_LinkedRules.xml | 9 ++++ tests/LocNote/LocNote3.pot | 35 ++++++++++++++ tests/LocNote/LocNote3.xml | 17 +++++++ tests/LocNote/LocNote4.pot | 35 ++++++++++++++ tests/LocNote/LocNote4.xml | 8 +++ tests/LocNote1.pot | 48 -------------------- tests/LocNote1.xml | 21 --------- tests/LocNote2.pot | 33 ------------- tests/LocNote2.xml | 15 ------ tests/LocNote2_LinkedRules.xml | 9 ---- tests/LocNote3.pot | 35 -------------- tests/LocNote3.xml | 17 ------- tests/LocNote4.pot | 35 -------------- tests/LocNote4.xml | 8 --- tests/Translate/Translate1.ll.po | 47 +++++++++++++++++++ tests/Translate/Translate1.ll.xml | 39 ++++++++++++++++ tests/Translate/Translate1.pot | 46 +++++++++++++++++++ tests/Translate/Translate1.xml | 39 ++++++++++++++++ tests/Translate/Translate2.ll.po | 21 +++++++++ tests/Translate/Translate2.ll.xml | 10 ++++ tests/Translate/Translate2.pot | 21 +++++++++ tests/Translate/Translate2.xml | 10 ++++ tests/Translate/Translate2_LinkedRules.xml | 5 ++ tests/Translate/Translate3.ll.po | 25 ++++++++++ tests/Translate/Translate3.ll.wrong.po | 25 ++++++++++ tests/Translate/Translate3.ll.wrong.xml | 12 +++++ tests/Translate/Translate3.ll.xml | 10 ++++ tests/Translate/Translate3.pot | 21 +++++++++ tests/Translate/Translate3.xml | 13 +++++ tests/Translate/Translate4.ll.po | 25 ++++++++++ tests/Translate/Translate4.ll.xml | 10 ++++ tests/Translate/Translate4.pot | 21 +++++++++ tests/Translate/Translate4.xml | 10 ++++ tests/Translate/Translate5.ll.po | 25 ++++++++++ tests/Translate/Translate5.ll.xml | 19 ++++++++ tests/Translate/Translate5.pot | 21 +++++++++ tests/Translate/Translate5.xml | 19 ++++++++ tests/Translate/Translate6.ll.po | 40 ++++++++++++++++ tests/Translate/Translate6.ll.xml | 19 ++++++++ tests/Translate/Translate6.pot | 36 +++++++++++++++ tests/Translate/Translate6.xml | 19 ++++++++ tests/Translate/Translate7.ll.po | 21 +++++++++ tests/Translate/Translate7.ll.xml | 29 ++++++++++++ tests/Translate/Translate7.pot | 21 +++++++++ tests/Translate/Translate7.xml | 28 +++++++++++ tests/Translate/TranslateGlobal.ll.po | 26 +++++++++++ tests/Translate/TranslateGlobal.ll.xml | 13 +++++ tests/Translate/TranslateGlobal.pot | 26 +++++++++++ tests/Translate/TranslateGlobal.xml | 13 +++++ tests/Translate/TranslateGlobal_LinkedRules.xml | 6 +++ tests/Translate1.ll.po | 47 ------------------- tests/Translate1.ll.xml | 39 ---------------- tests/Translate1.pot | 46 ------------------- tests/Translate1.xml | 39 ---------------- tests/Translate2.ll.po | 21 --------- tests/Translate2.ll.xml | 10 ---- tests/Translate2.pot | 21 --------- tests/Translate2.xml | 10 ---- tests/Translate2_LinkedRules.xml | 5 -- tests/Translate3.ll.po | 25 ---------- tests/Translate3.ll.wrong.po | 25 ---------- tests/Translate3.ll.wrong.xml | 12 ----- tests/Translate3.ll.xml | 10 ---- tests/Translate3.pot | 21 --------- tests/Translate3.xml | 13 ----- tests/Translate4.ll.po | 25 ---------- tests/Translate4.ll.xml | 10 ---- tests/Translate4.pot | 21 --------- tests/Translate4.xml | 10 ---- tests/Translate5.ll.po | 25 ---------- tests/Translate5.ll.xml | 19 -------- tests/Translate5.pot | 21 --------- tests/Translate5.xml | 19 -------- tests/Translate6.ll.po | 40 ---------------- tests/Translate6.ll.xml | 19 -------- tests/Translate6.pot | 36 --------------- tests/Translate6.xml | 19 -------- tests/Translate7.ll.po | 21 --------- tests/Translate7.ll.xml | 29 ------------ tests/Translate7.pot | 21 --------- tests/Translate7.xml | 28 ----------- tests/TranslateGlobal.ll.po | 26 ----------- tests/TranslateGlobal.ll.xml | 13 ----- tests/TranslateGlobal.pot | 26 ----------- tests/TranslateGlobal.xml | 13 ----- tests/TranslateGlobal_LinkedRules.xml | 6 --- tests/run_tests.py | 44 +++++++++--------- 111 files changed, 1223 insertions(+), 1223 deletions(-) commit 30c0c2c8f86119dc861f5ff8036b79e52eed0292 Author: Shaun McCance Date: Wed Sep 12 09:07:23 2012 -0400 Adding more Locale Filter tests tests/LocaleFilter/Locale2Xml.fr_CA.po | 23 +++++++++++ tests/LocaleFilter/Locale2Xml.fr_CA.xml | 8 ++++ tests/LocaleFilter/Locale2Xml.fr_CH.po | 23 +++++++++++ tests/LocaleFilter/Locale2Xml.fr_CH.xml | 8 ++++ tests/LocaleFilter/Locale2Xml.fr_FR.po | 23 +++++++++++ tests/LocaleFilter/Locale2Xml.fr_FR.xml | 5 ++ tests/LocaleFilter/Locale2Xml.joined.xml | 16 +++++++ tests/LocaleFilter/Locale2Xml.pot | 23 +++++++++++ tests/LocaleFilter/Locale2Xml.xml | 14 ++++++ tests/LocaleFilter/Locale3Rule.xml | 5 ++ tests/LocaleFilter/Locale3Xml.fr_CA.po | 23 +++++++++++ tests/LocaleFilter/Locale3Xml.fr_CA.xml | 9 ++++ tests/LocaleFilter/Locale3Xml.fr_CH.po | 23 +++++++++++ tests/LocaleFilter/Locale3Xml.fr_CH.xml | 9 ++++ tests/LocaleFilter/Locale3Xml.fr_FR.po | 23 +++++++++++ tests/LocaleFilter/Locale3Xml.fr_FR.xml | 6 +++ tests/LocaleFilter/Locale3Xml.joined.xml | 17 ++++++++ tests/LocaleFilter/Locale3Xml.pot | 23 +++++++++++ tests/LocaleFilter/Locale3Xml.xml | 16 +++++++ tests/LocaleFilter/Locale4Rule.xml | 3 + tests/LocaleFilter/Locale4Xml.fr_CA.po | 23 +++++++++++ tests/LocaleFilter/Locale4Xml.fr_CA.xml | 12 ++++++ tests/LocaleFilter/Locale4Xml.fr_CH.po | 23 +++++++++++ tests/LocaleFilter/Locale4Xml.fr_CH.xml | 12 ++++++ tests/LocaleFilter/Locale4Xml.fr_FR.po | 23 +++++++++++ tests/LocaleFilter/Locale4Xml.fr_FR.xml | 9 ++++ tests/LocaleFilter/Locale4Xml.joined.xml | 17 ++++++++ tests/LocaleFilter/Locale4Xml.pot | 23 +++++++++++ tests/LocaleFilter/Locale4Xml.xml | 16 +++++++ tests/LocaleFilter/Locale5Xml.fr_CA.po | 23 +++++++++++ tests/LocaleFilter/Locale5Xml.fr_CA.xml | 8 ++++ tests/LocaleFilter/Locale5Xml.fr_CH.po | 23 +++++++++++ tests/LocaleFilter/Locale5Xml.fr_CH.xml | 8 ++++ tests/LocaleFilter/Locale5Xml.fr_FR.po | 23 +++++++++++ tests/LocaleFilter/Locale5Xml.fr_FR.xml | 5 ++ tests/LocaleFilter/Locale5Xml.joined.xml | 16 +++++++ tests/LocaleFilter/Locale5Xml.pot | 23 +++++++++++ tests/LocaleFilter/Locale5Xml.xml | 13 ++++++ tests/run_tests.py | 64 ++++++++++++++++++++++++++++++ 39 files changed, 664 insertions(+), 0 deletions(-) commit 429131c2ffe3fd69d3f29a66ae7eb9ea127b4e72 Author: Shaun McCance Date: Tue Sep 11 22:57:18 2012 -0400 Sort attribute names in test output itstool.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 13e8e0c2ab1fb8c793e86e35fa12cbd7694f7f63 Author: Shaun McCance Date: Tue Sep 11 16:48:44 2012 -0400 Renaming IT-join-1 test output file I changed the naming convention to make it easier to reuse other test input files to also test joins. tests/IT-join-1.joined.xml | 36 ++++++++++++++++++++++++++++++++++++ tests/IT-join-1.ll.xml | 36 ------------------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) commit 2d37295f5ccdafc3372ea0e576400524fc688e45 Author: Shaun McCance Date: Tue Sep 11 16:47:19 2012 -0400 Updating test files for --no-builtins tests/IT-locNote-inline.pot | 5 +++++ tests/IT-locNote-multiples.pot | 5 +++++ tests/IT-placeholder-1.ll.xml | 2 +- tests/LocNote1.pot | 20 ++++++++++++++++++++ tests/LocNote2.pot | 5 +++++ tests/Translate3.ll.wrong.xml | 2 +- tests/Translate3.ll.xml | 2 +- tests/Translate4.ll.xml | 2 +- 8 files changed, 39 insertions(+), 4 deletions(-) commit 0e6a42ffd5fe7cdac8197f22b89e57fe55926687 Author: Shaun McCance Date: Tue Sep 11 16:45:55 2012 -0400 First pass at implementing Locale Filter itstool.in | 161 +++++++++++++++++++++++------- tests/LocaleFilter/Locale1Xml.fr_CA.po | 23 ++++ tests/LocaleFilter/Locale1Xml.fr_CA.xml | 13 +++ tests/LocaleFilter/Locale1Xml.fr_CH.po | 23 ++++ tests/LocaleFilter/Locale1Xml.fr_CH.xml | 13 +++ tests/LocaleFilter/Locale1Xml.fr_FR.po | 23 ++++ tests/LocaleFilter/Locale1Xml.fr_FR.xml | 10 ++ tests/LocaleFilter/Locale1Xml.joined.xml | 21 ++++ tests/LocaleFilter/Locale1Xml.pot | 23 ++++ tests/LocaleFilter/Locale1Xml.xml | 20 ++++ tests/run_tests.py | 75 ++++++++------ 11 files changed, 338 insertions(+), 67 deletions(-) commit cc8084a1596e61363585dea0c13fbe94a4266a1f Author: Shaun McCance Date: Mon Sep 10 12:26:25 2012 -0400 Implemented test suite output for withinText itstool.in | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) commit 7c8434af35f907f5c97741d1d22d8157d51a6a5f Author: Shaun McCance Date: Mon Sep 10 11:38:00 2012 -0400 Adding test suite output for its:translate itstool.in | 110 ++++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 77 insertions(+), 33 deletions(-) commit 231548b2539e281a3e68b08a052cb4b03c5368a0 Author: Shaun McCance Date: Sat Sep 8 17:36:43 2012 -0400 Implemented ITS 2.0 Preserve Space data category itstool.in | 20 +++++++++++++------- tests/preservespace1xml.pot | 23 +++++++++++++++++++++++ tests/preservespace1xml.xml | 15 +++++++++++++++ tests/preservespace2xml.pot | 23 +++++++++++++++++++++++ tests/preservespace2xml.xml | 10 ++++++++++ tests/preservespace3XmlRule.xml | 3 +++ tests/preservespace3xml.pot | 23 +++++++++++++++++++++++ tests/preservespace3xml.xml | 12 ++++++++++++ tests/preservespace4xml.pot | 23 +++++++++++++++++++++++ tests/preservespace4xml.xml | 10 ++++++++++ tests/run_tests.py | 12 ++++++++++++ 11 files changed, 167 insertions(+), 7 deletions(-) commit 34cc26b03424cd3ac72c041c8b576000ce2011d2 Author: Galen Charlton Date: Wed Aug 29 10:21:37 2012 -0400 add --load-dtd option This option tells itstool to load external DTDs when parsing the document to be translated. This prevents errors when the document includes entity references defined in those DTDs. Note that externally-defined entity refs still cannot be used in translated strings in the PO files. Also note that this adds test cases that require either network access or updating the local XML catalog to including the DocBook DTDs. Signed-off-by: Galen Charlton itstool.in | 13 ++++++++++--- tests/IT-uses-external-dtds.ll.po | 21 +++++++++++++++++++++ tests/IT-uses-external-dtds.ll.xml | 7 +++++++ tests/IT-uses-external-dtds.pot | 21 +++++++++++++++++++++ tests/IT-uses-external-dtds.xml | 7 +++++++ tests/run_tests.py | 19 ++++++++++++++++--- 6 files changed, 82 insertions(+), 6 deletions(-) commit 7ee29a46d229bde60c86703730b24d5ac49a1e75 Author: Shaun McCance Date: Sun Jun 24 10:30:01 2012 -0400 Version 1.2.0 NEWS | 9 +++++++++ configure.ac | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) commit 6fce21cd7b4417d8ea8cff3a8f2c79063d5353a3 Merge: f951a0f 470b52a Author: Shaun McCance Date: Sun Jun 24 10:26:00 2012 -0400 Merge branch '1.1' commit f951a0f451451acaa3ffdd8d1e8e598615ab2d21 Author: Shaun McCance Date: Sat Jun 23 11:17:25 2012 -0400 Always use nsProp(), not prop() itstool.in | 94 ++++++++++++++++++++++++++++++------------------------------ 1 files changed, 47 insertions(+), 47 deletions(-) commit 5c47aea87ecd67b69cc7596a61db0ff950e71063 Author: Shaun McCance Date: Wed May 16 11:12:19 2012 -0400 Be much more strict (and correct) about the version attribute its/docbook.its | 2 +- its/its.its | 2 +- its/mallard.its | 2 +- its/ttml.its | 2 +- its/xhtml.its | 2 +- itstool.in | 38 ++++++++++++++++++++++++++++++++++++-- 6 files changed, 41 insertions(+), 7 deletions(-) commit f53cb2b28fafaf6488f283020bc4de6c86f75c0a Author: Shaun McCance Date: Sat May 12 12:21:02 2012 -0400 Show language code when failing to get translation from PO Otherwise you have no idea which translation is causing problems when using join mode. itstool.in | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) commit a3b94bef85d9a96aec2656987d0910cc928573dc Author: Shaun McCance Date: Fri May 11 15:13:46 2012 -0400 Try to maintain indentation in join mode itstool.in | 7 +++++++ tests/IT-join-1.ll.xml | 30 ++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-) commit 4690db4df453dd79cc8df1bdf0ba49475fb6c83c Author: Shaun McCance Date: Fri May 11 13:06:22 2012 -0400 tests: Adding regression test for join mode tests/IT-join-1.cs.po | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tests/IT-join-1.de.po | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tests/IT-join-1.fr.po | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tests/IT-join-1.ll.xml | 18 ++++++++++++++++++ tests/IT-join-1.pot | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tests/IT-join-1.xml | 19 +++++++++++++++++++ tests/run_tests.py | 27 +++++++++++++++++++++++++++ 7 files changed, 248 insertions(+), 0 deletions(-) commit 124f58219a33677f010f4e56fe09d0fb389d2b52 Author: Shaun McCance Date: Tue May 8 12:55:29 2012 -0400 Adding new join mode for multi-lingual XML files itstool.in | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 91 insertions(+), 15 deletions(-) commit 470b52ad6d4f55b32a56d95671d608c483dbeae7 Author: Shaun McCance Date: Mon May 7 16:40:21 2012 -0400 Version 1.1.3 NEWS | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) commit 7daf5389b1b6f2d82e86d2a9aa8289f4c1aa5d12 Author: Shaun McCance Date: Sun May 6 20:10:03 2012 -0400 tests: Added two more tests Already had these XML files from W3C, but I didn't have POT files to test them against tests/EX-locNote-element-1.pot | 18 ++++++++++++++++++ tests/EX-locNoteRef-attribute-1.pot | 17 +++++++++++++++++ tests/run_tests.py | 6 ++++++ 3 files changed, 41 insertions(+), 0 deletions(-) commit 2548f4006f064caf2d6ecd0402f723f650b135d6 Author: Shaun McCance Date: Sun May 6 20:05:53 2012 -0400 tests: msgmerge po files to have new syntax from pot files tests/IT-attributes-1.ll.po | 10 ++++--- tests/IT-context-1.ll.po | 19 ++++++++----- tests/IT-dropRule-1.ll.po | 7 +++-- tests/IT-placeholder-1.ll.po | 17 ++++++++---- tests/Translate1.ll.po | 28 +++++++++++++------- tests/Translate2.ll.po | 10 ++++--- tests/Translate3.ll.po | 18 ++++++++---- tests/Translate3.ll.wrong.po | 18 ++++++++---- tests/Translate4.ll.po | 18 ++++++++---- tests/Translate5.ll.po | 18 ++++++++---- tests/Translate6.ll.po | 27 +++++++++++++------ tests/Translate7.ll.po | 10 ++++--- tests/TranslateGlobal.ll.po | 13 ++++++--- tests/WithinText1.ll.po | 22 ++++++++++------ tests/WithinText2.ll.po | 58 +++++++++++++++++++++++++++++------------- 15 files changed, 191 insertions(+), 102 deletions(-) commit 2c153716eaf5650077741a46ae4bc91365c08e02 Author: Shaun McCance Date: Sun May 6 13:24:50 2012 -0400 Renamed itstool-specific tests to use IT- prefix tests/Attributes1.ll.po | 19 ------------------- tests/Attributes1.ll.xml | 10 ---------- tests/Attributes1.pot | 21 --------------------- tests/Attributes1.xml | 10 ---------- tests/Context.ll.po | 35 ----------------------------------- tests/Context.ll.xml | 15 --------------- tests/Context.pot | 40 ---------------------------------------- tests/Context.xml | 14 -------------- tests/Droprule.ll.po | 15 --------------- tests/Droprule.ll.xml | 11 ----------- tests/Droprule.pot | 16 ---------------- tests/Droprule.xml | 12 ------------ tests/IT-attributes-1.ll.po | 19 +++++++++++++++++++ tests/IT-attributes-1.ll.xml | 10 ++++++++++ tests/IT-attributes-1.pot | 21 +++++++++++++++++++++ tests/IT-attributes-1.xml | 10 ++++++++++ tests/IT-context-1.ll.po | 35 +++++++++++++++++++++++++++++++++++ tests/IT-context-1.ll.xml | 15 +++++++++++++++ tests/IT-context-1.pot | 40 ++++++++++++++++++++++++++++++++++++++++ tests/IT-context-1.xml | 14 ++++++++++++++ tests/IT-dropRule-1.ll.po | 15 +++++++++++++++ tests/IT-dropRule-1.ll.xml | 11 +++++++++++ tests/IT-dropRule-1.pot | 16 ++++++++++++++++ tests/IT-dropRule-1.xml | 12 ++++++++++++ tests/IT-malformed.xml | 6 ++++++ tests/IT-placeholder-1.ll.po | 19 +++++++++++++++++++ tests/IT-placeholder-1.ll.xml | 6 ++++++ tests/IT-placeholder-1.pot | 21 +++++++++++++++++++++ tests/IT-placeholder-1.xml | 5 +++++ tests/Malformed.xml | 6 ------ tests/Placeholder.ll.po | 19 ------------------- tests/Placeholder.ll.xml | 6 ------ tests/Placeholder.pot | 21 --------------------- tests/Placeholder.xml | 5 ----- tests/run_tests.py | 20 ++++++++++---------- 35 files changed, 285 insertions(+), 285 deletions(-) commit d67907f3269ab5bbebae9267ec43df023591c520 Author: Shaun McCance Date: Sat May 5 21:49:54 2012 -0400 tests: Changed test names to match file names tests/run_tests.py | 52 ++++++++++++++++++++++++++-------------------------- 1 files changed, 26 insertions(+), 26 deletions(-) commit 9c5e6b9d2d90c9f5fc4693acd727f45d4512e687 Author: Shaun McCance Date: Sat May 5 20:07:00 2012 -0400 Better handling of comments, new XML path markers Comments were getting lost if they weren't specified at exactly the same level as translation units were taken from. This commit changes how comments are handled to prevent that. I also moved path markers from the file context comment, because it's wrong and messes up some tools. itstool.in | 167 ++++++++++++++++++++-------- tests/Attributes1.pot | 8 +- tests/Context.pot | 17 ++- tests/Droprule.pot | 5 +- tests/EX-locNote-selector-2.pot | 37 ++++++ tests/EX-locNotePointer-attribute-1.pot | 8 +- tests/EX-locNoteRefPointer-attribute-1.pot | 12 +- tests/IT-locNote-inline.pot | 20 ++++ tests/IT-locNote-inline.xml | 15 +++ tests/IT-locNote-multiples.pot | 28 +++++ tests/IT-locNote-multiples.xml | 19 +++ tests/LocNote1.pot | 11 +- tests/LocNote2.pot | 11 +- tests/LocNote3.pot | 18 ++- tests/LocNote4.pot | 19 ++- tests/Placeholder.pot | 21 ++++ tests/Translate1.pot | 23 +++-- tests/Translate2.pot | 8 +- tests/Translate3.pot | 21 ++++ tests/Translate4.pot | 21 ++++ tests/Translate5.pot | 8 +- tests/Translate6.pot | 36 ++++++ tests/Translate7.pot | 8 +- tests/TranslateGlobal.pot | 11 +- tests/WithinText1.pot | 11 +- tests/WithinText2.pot | 32 ++++-- tests/run_tests.py | 9 ++- 27 files changed, 481 insertions(+), 123 deletions(-) commit 63e2b5739977a99a70898e6c78798b7eaa66293e Author: Shaun McCance Date: Wed Apr 4 12:39:06 2012 -0400 Don't error out when invalid msgstr is non-ascii itstool.in | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 367d347cfc0d7bfcc25ab5b83c59e8824af4ae27 Author: Shaun McCance Date: Mon Apr 2 10:16:29 2012 -0400 Proper error message when source XML file can't be read itstool.in | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 3ff47350b0386c971e4fb1955f87fefc2c5aafd1 Author: Shaun McCance Date: Mon Apr 2 09:51:30 2012 -0400 Handle UTF-8 in attribute values itstool.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 1e0fa47194bbfcbd30e402a4897a0856a6045b73 Author: Shaun McCance Date: Fri Mar 23 10:09:55 2012 -0400 Don't output external ref messages under its:translate="no" itstool.in | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit 80b34e2870abd08cb96f2929d8ee32acab3d89e9 Author: Shaun McCance Date: Sun Feb 5 11:53:41 2012 -0500 Version 1.1.2 NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit ed24c8ab3b22a085daea614638cbc15796011f15 Author: Shaun McCance Date: Tue Sep 27 10:16:55 2011 -0400 Better handling of XML errors in PO files Rather than let an exception kill itstool, just issue a warning and use the original-language node. Added --strict to error out for XML errors in PO files. https://bugs.freedesktop.org/show_bug.cgi?id=41254 itstool.in | 38 ++++++++++++++++++++++++++++++-------- tests/Translate3.ll.wrong.xml | 12 ++++++++++++ tests/run_tests.py | 23 +++++++++++++++++------ 3 files changed, 59 insertions(+), 14 deletions(-) commit e5c3be76682a1e1d224ad89fa3798cf3a7b81900 Author: Shaun McCance Date: Mon Sep 19 09:12:30 2011 -0400 Version 1.1.1 NEWS | 7 +++++++ configure.ac | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit 0520144626db679e81725aebfaba273a52fd0bf4 Merge: 092a264 7e07396 Author: Shaun McCance Date: Sat Sep 3 13:21:09 2011 -0400 Merge: Proper XML error catching [claude] commit 092a26470a5032c85ba8a40570ee6fd6c9fe9b30 Merge: c3566db 48e4257 Author: Shaun McCance Date: Sat Sep 3 13:10:19 2011 -0400 Merge commit '48e4257421beb439f23a78507f43aae694775974' commit c3566dbec79ecd2d0bbef5b42044d7b12380c034 Merge: 6e6ca0d 6411b09 Author: Shaun McCance Date: Sat Sep 3 10:56:58 2011 -0400 Merge commit 'refs/merge-requests/2' of git://gitorious.org/itstool/itstool commit 7e0739641507d92e1d2ec7e9b7f5e5c7c09a940a Author: Claude Paroz Date: Wed Aug 17 13:32:42 2011 +0200 Catch XML errors in translated content itstool.in | 1 + tests/Translate3.ll.wrong.po | 19 +++++++++++++++++++ tests/run_tests.py | 24 ++++++++++++++++++------ 3 files changed, 38 insertions(+), 6 deletions(-) commit 1abdf1b0d83b37a9f298563e139c118c9a62629b Author: Claude Paroz Date: Wed Aug 17 12:10:36 2011 +0200 Catch XML parsing errors so itstool does properly exit with error code itstool.in | 10 ++++++++++ tests/Malformed.xml | 6 ++++++ tests/run_tests.py | 18 ++++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) commit 6411b09431eb72ed5426d40a0142e7479c486d3b Author: Claude Paroz Date: Wed Jun 29 21:15:46 2011 +0200 Fix placeholder translation when it contains sub-elements itstool.in | 12 ++++++++++-- tests/Placeholder.ll.po | 19 +++++++++++++++++++ tests/Placeholder.ll.xml | 6 ++++++ tests/Placeholder.xml | 5 +++++ tests/run_tests.py | 4 +++- 5 files changed, 43 insertions(+), 3 deletions(-) commit 6e6ca0daf4084aaa94268f062461e1ec712698fa Author: Shaun McCance Date: Mon Jun 27 14:59:56 2011 -0400 Version 1.1.0 NEWS | 14 ++++++++++++++ configure.ac | 2 +- 2 files changed, 15 insertions(+), 1 deletions(-) commit 187fcbe585560f128c7436e66f6b8e3a789a73b0 Author: Shaun McCance Date: Sun Jun 26 12:28:10 2011 -0400 mallard.its: Set msgctxt on info titles its/mallard.its | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit b57dfa4327da4d889dbfc5d26d824482fd7b2f54 Author: Shaun McCance Date: Sun Jun 26 12:27:46 2011 -0400 Don't bomb if a locNotePointer returns a string itstool.in | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) commit 8d97758ac43f2079d252fedf2a9666b33a751fd0 Author: Shaun McCance Date: Sat Jun 25 14:49:53 2011 -0400 Added itst:context to specify a msgctxt for a node itstool.in | 35 ++++++++++++++++++++++++++++++++++- tests/Context.ll.po | 35 +++++++++++++++++++++++++++++++++++ tests/Context.ll.xml | 15 +++++++++++++++ tests/Context.pot | 35 +++++++++++++++++++++++++++++++++++ tests/Context.xml | 14 ++++++++++++++ tests/run_tests.py | 3 +++ 6 files changed, 136 insertions(+), 1 deletions(-) commit e84f296dd21de75b9244896be9d2acc6aeed4dea Author: Claude Paroz Date: Fri Jun 24 12:25:17 2011 -0400 Fixes for Python 3 itstool.in | 2 +- tests/run_tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b13436f2a75ffded500e5f26028237d337510394 Author: Shaun McCance Date: Fri Jun 24 11:21:38 2011 -0400 Use #!/usr/bin/python -s for shebang, RH bug #702989 itstool.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d8b399ae628e822ee9a9762657969361c5aebc93 Author: Shaun McCance Date: Fri Jun 24 10:19:54 2011 -0400 Make itst:drop work on non-inline nodes itstool.in | 15 ++++++++++++++- tests/Droprule.xml | 2 ++ 2 files changed, 16 insertions(+), 1 deletions(-) commit 56cd8382ae979fab1a4a4a25f052d93d1070fc6d Author: Shaun McCance Date: Thu Jun 23 17:51:40 2011 -0400 Made dropRule take a drop attribute, like other rules itstool.in | 6 +++--- tests/Droprule.ll.xml | 2 +- tests/Droprule.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 333218d4978a7b203252d35e7979f64cfb3b0c1c Author: Claude Paroz Date: Tue May 31 22:46:29 2011 +0200 Add itst drop rule The itst Droprule is a rule allowing to ignore completely a tag from the translation, including its content. The resulting xml will not have the tag either. itstool.in | 7 ++++++- tests/Droprule.ll.po | 15 +++++++++++++++ tests/Droprule.ll.xml | 11 +++++++++++ tests/Droprule.pot | 15 +++++++++++++++ tests/Droprule.xml | 10 ++++++++++ tests/run_tests.py | 4 ++++ 6 files changed, 61 insertions(+), 1 deletions(-) commit 7cda8e16e2281e0e6c42f1e47bfc98ee5e4fe4ae Author: Shaun McCance Date: Thu Jun 23 17:45:16 2011 -0400 Renamed attribute test files tests/Attributes1.ll.po | 19 +++++++++++++++++++ tests/Attributes1.ll.xml | 10 ++++++++++ tests/Attributes1.pot | 19 +++++++++++++++++++ tests/Attributes1.xml | 10 ++++++++++ tests/README | 2 -- tests/run_tests.py | 4 ++-- tests/x-attr1.ll.po | 19 ------------------- tests/x-attr1.ll.xml | 10 ---------- tests/x-attr1.pot | 19 ------------------- tests/x-attr1.xml | 10 ---------- 10 files changed, 60 insertions(+), 62 deletions(-) commit 4334f863ae6ab636b3e7c905e15693a188e4bee1 Author: Shaun McCance Date: Thu Jun 23 16:11:42 2011 -0400 Handled translatable attributes in non-translatable elements itstool.in | 25 +++++++++++++++---------- tests/README | 4 +++- tests/run_tests.py | 3 +++ tests/x-attr1.ll.po | 19 +++++++++++++++++++ tests/x-attr1.ll.xml | 10 ++++++++++ tests/x-attr1.pot | 19 +++++++++++++++++++ tests/x-attr1.xml | 10 ++++++++++ 7 files changed, 79 insertions(+), 11 deletions(-) commit 7ecd70b27d5cc22f8d6b35fc68aa9fe9cd3a7def Author: Claude Paroz Date: Sun Jun 12 21:40:36 2011 +0200 Extract and translate node attributes itstool.in | 41 ++++++++++++++++++++++++++++++++++++----- tests/Translate1.ll.po | 4 ++++ tests/Translate1.ll.xml | 2 +- tests/Translate1.pot | 4 ++++ tests/Translate2.ll.po | 4 ++++ tests/Translate2.ll.xml | 2 +- tests/Translate2.pot | 4 ++++ tests/TranslateGlobal.ll.po | 23 +++++++++++++++++++++++ tests/TranslateGlobal.ll.xml | 13 +++++++++++++ tests/TranslateGlobal.pot | 23 +++++++++++++++++++++++ tests/run_tests.py | 7 +++---- 11 files changed, 116 insertions(+), 11 deletions(-) commit fadb43fc37dbe18d9b1204bb13fb5ccea492b649 Merge: 43a518a 1ebcc2a Author: Shaun McCance Date: Wed Jun 1 09:22:03 2011 -0400 Merge branch 'testsuite' commit 1ebcc2af7fa4d6e12687199e173720b44eb823a3 Author: Claude Paroz Date: Wed Jun 1 15:11:51 2011 +0200 Fix LocNote2 test and add README in tests tests/LocNote2.pot | 25 +++++++++++++++++++++++++ tests/README | 5 +++++ tests/run_tests.py | 4 ++-- 3 files changed, 32 insertions(+), 2 deletions(-) commit 43a518a2da4eb11f78b23cbca6291f9cd7c2f4ab Author: Shaun McCance Date: Wed Jun 1 08:59:26 2011 -0400 Adding copyright and license info to itstool itstool.in | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) commit 480a2531c9b8ba0249f9326e8d043de309486e5b Author: Claude Paroz Date: Wed Jun 1 13:45:51 2011 +0200 Add remaining tests itstool.in | 5 ++- tests/EX-locNotePointer-attribute-1.pot | 21 +++++++++++ tests/EX-locNoteRefPointer-attribute-1.pot | 21 +++++++++++ tests/LocNote1.pot | 25 +++++++++++++ tests/LocNote3.pot | 29 ++++++++++++++++ tests/LocNote4.pot | 30 ++++++++++++++++ tests/WithinText1.ll.po | 23 ++++++++++++ tests/WithinText1.ll.xml | 14 ++++++++ tests/WithinText1.pot | 23 ++++++++++++ tests/WithinText2.ll.po | 51 ++++++++++++++++++++++++++++ tests/WithinText2.ll.xml | 21 +++++++++++ tests/WithinText2.pot | 51 ++++++++++++++++++++++++++++ tests/run_tests.py | 40 ++++++++++++++++++++- 13 files changed, 350 insertions(+), 4 deletions(-) commit 66f3fdd0d678bfffefef4b26e0c6812e3a9b8bb8 Author: Shaun McCance Date: Wed Jun 1 08:07:42 2011 -0400 itstool: Allow both XLink and child rules on its:rules We weren't handling tests/WithinText2.xml correctly itstool.in | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 2ffe1d30ea1d5925a75955bc9b88c3d4c14b7b46 Author: Claude Paroz Date: Tue May 31 22:05:00 2011 +0200 Add tests for the Translate* series tests/Translate2.ll.po | 15 +++++++++++++++ tests/Translate2.ll.xml | 10 ++++++++++ tests/Translate2.pot | 15 +++++++++++++++ tests/Translate3.ll.po | 19 +++++++++++++++++++ tests/Translate3.ll.xml | 10 ++++++++++ tests/Translate4.ll.po | 19 +++++++++++++++++++ tests/Translate4.ll.xml | 10 ++++++++++ tests/Translate5.ll.po | 19 +++++++++++++++++++ tests/Translate5.ll.xml | 19 +++++++++++++++++++ tests/Translate5.pot | 19 +++++++++++++++++++ tests/Translate6.ll.po | 31 +++++++++++++++++++++++++++++++ tests/Translate6.ll.xml | 19 +++++++++++++++++++ tests/Translate7.ll.po | 19 +++++++++++++++++++ tests/Translate7.ll.xml | 29 +++++++++++++++++++++++++++++ tests/Translate7.pot | 19 +++++++++++++++++++ tests/run_tests.py | 41 +++++++++++++++++++++++++++++++++++------ 16 files changed, 307 insertions(+), 6 deletions(-) commit d3177444660bac67265ba9cf17d586fd1b0b2907 Author: Claude Paroz Date: Tue May 31 20:41:13 2011 +0200 Fix xml iteration when constructing translated subnodes itstool.in | 3 ++- tests/Translate1.ll.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6c7b6bb9db8e77ec142fac2c9b514ec1769df65b Author: Claude Paroz Date: Tue May 31 16:33:48 2011 +0200 Use unicode strings inside of Message class itstool.in | 40 +++++++++++++++++++++------------------- 1 files changed, 21 insertions(+), 19 deletions(-) commit f4635d084d93212af73221de5165c3fa92f834cd Author: Claude Paroz Date: Mon May 30 21:23:15 2011 +0200 Initial test infrastructure tests/Translate1.ll.po | 35 +++++++++++++++++++++++++ tests/Translate1.ll.xml | 39 +++++++++++++++++++++++++++ tests/Translate1.pot | 35 +++++++++++++++++++++++++ tests/run_tests.py | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 175 insertions(+), 0 deletions(-) commit 00a8df54545a66aa70c20ceecb19709ca0b811a7 Author: Shaun McCance Date: Fri May 27 12:09:10 2011 -0400 Include installation dir in search path if XDG_DATA_DIRS not set configure.ac | 9 +++++++++ itstool.in | 5 ++++- 2 files changed, 13 insertions(+), 1 deletions(-) commit abd3afc9bd7066658d295de3a39c5c0b287d0644 Author: Shaun McCance Date: Mon May 9 21:26:42 2011 -0400 itstool: Allow localization notes to be space-preserving itstool.in | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) commit 04a706ae1057d0a9ed4b36c7e20292d44e97ad80 Author: Shaun McCance Date: Mon May 9 16:32:25 2011 -0400 itstool.1: Added a man page .gitignore | 1 + Makefile.am | 10 +++++++- configure.ac | 1 + itstool.1.in | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletions(-) commit 69db1ded268af460d31b6ab2d86172873468890f Author: Shaun McCance Date: Mon May 9 11:15:02 2011 -0400 Catch XPath exceptions and warn itstool.in | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 deletions(-) commit 6fdaea81bf70023612202cadcd7d9995e571f23e Author: Shaun McCance Date: Fri May 6 17:02:13 2011 -0400 Version 1.0.1 NEWS | 7 +++++++ configure.ac | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit e9344508508112ecd177232ba49b5664e860bc9f Author: Shaun McCance Date: Tue May 3 12:48:53 2011 -0400 itstool: Convert posixy locale strings to BCP47 itstool.in | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) commit 81af5ab154bf68b1e267e1f4c1ecea760a19706f Author: Shaun McCance Date: Sat Apr 30 14:57:48 2011 -0400 Fixed --help string for --version itstool.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4aac006a9f0350f3dbd6588cdb4254e8b895ec78 Author: Shaun McCance Date: Sat Apr 30 14:56:07 2011 -0400 Added --version .gitignore | 1 + Makefile.am | 2 +- configure.ac | 1 + itstool | 786 --------------------------------------------------------- itstool.in | 797 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 800 insertions(+), 787 deletions(-) commit 6d60e6e1d14bc6b62e0c43cb0781d562d23dd684 Author: Shaun McCance Date: Tue Apr 26 17:27:22 2011 -0400 Use #. for comments. Plain # is for notes written by translators itstool | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit e091a4736f972b6de8a62dd934ea7a38b089078a Author: Shaun McCance Date: Tue Apr 26 16:22:24 2011 -0400 Adding the PO header, at Claude's request itstool | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) commit 48e4257421beb439f23a78507f43aae694775974 Author: Javier Jardón Date: Tue Apr 26 17:00:23 2011 +0100 autogen.sh: Improve script to handle out of tree compilations Also handle the option to not run the configure step autogen.sh | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 65ecbc8856e91b991d812e08dfa10300504bfb1b Author: Shaun McCance Date: Tue Apr 26 11:33:03 2011 -0400 Version 1.0.0 NEWS | 3 +++ configure.ac | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit f3d1ea105a2f99a3c5732d10d03011208cf7ed66 Author: Shaun McCance Date: Tue Apr 26 11:22:51 2011 -0400 Makefile.am: Added itstool to EXTRA_DIST Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c9fe5e91ae0096d655377e44fa1328f5bf544978 Author: Shaun McCance Date: Tue Apr 26 11:21:03 2011 -0400 xhtml.its: Preserve space on

 its/xhtml.its |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

commit 93733013d34ed106108e327d9828d5156b9793e2
Author: Shaun McCance 
Date:   Mon Apr 25 20:06:54 2011 -0400

    Switched itst namespace to itstool.org

 its/docbook.its |    2 +-
 its/mallard.its |    2 +-
 its/xhtml.its   |    2 +-
 itstool         |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

commit 749005fbafe481fd7c468db5739d6927f95b637b
Author: Shaun McCance 
Date:   Mon Apr 25 12:28:06 2011 -0400

    xhtml.its: Added a basic XHTML ITS file

 its/Makefile.am |    2 +-
 its/xhtml.its   |   44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletions(-)

commit cb91fbb7fe9bbc543e64723d82c3d00c60f0d313
Author: Shaun McCance 
Date:   Mon Apr 25 11:56:36 2011 -0400

    docbook.its: Some updates

 its/docbook.its |  327 +------------------------------------------------------
 1 files changed, 6 insertions(+), 321 deletions(-)

commit aeec20e8f3d7f0e2fc00b9e47c7e7331be6d588b
Author: Shaun McCance 
Date:   Mon Apr 25 09:45:16 2011 -0400

    Implement external refs, also msgctxt "_" for auto stuff

 its/docbook.its |    5 +++++
 its/mallard.its |    2 ++
 itstool         |   43 +++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 48 insertions(+), 2 deletions(-)

commit 26d4de24ba90a96c33328f1a59a1204ed891ff11
Author: Shaun McCance 
Date:   Mon Apr 11 14:33:20 2011 -0400

    UTF-8 encode translator credit information

 itstool |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

commit a4726b62b145ecc30dea58f07ad391a3f2ad3a0b
Author: Shaun McCance 
Date:   Mon Apr 11 14:30:45 2011 -0400

    Only add translator-credits once, avoid dup comment

 itstool |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

commit dd54d86c4e72f443b8134350e83be8243905851c
Author: Shaun McCance 
Date:   Mon Apr 11 14:19:42 2011 -0400

    Don't translate Mallard credit/email

 its/mallard.its |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

commit 0d10c022365240c382666a97c6fe8d5a4f777cab
Author: Shaun McCance 
Date:   Mon Apr 11 14:06:20 2011 -0400

    Only add translator-credits if itst:credits matched

 itstool |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

commit f2a60e4c0880b8a3111db3aeddd41865b1044162
Author: Shaun McCance 
Date:   Mon Apr 11 14:04:45 2011 -0400

    Support XLink on its:rules

 itstool |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

commit b30a771b03adca4da26d5a21879c5fcd562f67b4
Author: Shaun McCance 
Date:   Mon Apr 11 10:39:57 2011 -0400

    Implemented translator credits

 its/docbook.its |   20 +++++-------------
 its/mallard.its |   18 +++++-----------
 itstool         |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 68 insertions(+), 29 deletions(-)

commit 1a2343bc6164ffe87dad0eb61221c49abb99d544
Author: Shaun McCance 
Date:   Thu Dec 23 12:33:25 2010 -0500

    Read and set language attributes

 its/docbook.its |    3 +
 its/mallard.its |    4 ++
 itstool         |  130 +++++++++++++++++++++++++++++++++++++------------------
 3 files changed, 95 insertions(+), 42 deletions(-)

commit be53ea2c55a64b5362c739552cfef3d164b0066b
Author: Shaun McCance 
Date:   Wed Dec 22 11:43:00 2010 -0500

    [itstool] Got rid of all the redundant extra ns defs

 itstool |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

commit f20dad00869457d2918ca98f04d0d16c4e15b635
Author: Shaun McCance 
Date:   Tue Dec 21 09:11:25 2010 -0500

    [itstool] Fixed up some of the -o handling

 itstool |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

commit 1ff349b299d0acefd6f006c1835afe9f691d1610
Author: Shaun McCance 
Date:   Mon Nov 8 11:05:55 2010 -0500

    [its/ttml.its] Adding basic TTML ITS, tt:span = withinText

 its/Makefile.am |    2 +-
 its/ttml.its    |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

commit e780a5098352dfc4864701a3568017432fd3fe3c
Author: Shaun McCance 
Date:   Wed Oct 27 13:44:23 2010 -0400

    [its] Don't translate DocBook remark or Mallard comment

 its/docbook.its |    4 +++-
 its/mallard.its |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

commit 854b53dd84d345239fde4e2c26c224c6c81d91b9
Author: Shaun McCance 
Date:   Wed Oct 27 13:37:52 2010 -0400

    [itstool] Implement its:span/@translate & preserve space more greedily
    
    Sometimes messages get merged. Sometimes one of them is no-wrap, and
    another isn't. In this case, prefer no-wrap. Better safe than sorry.

 itstool |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

commit 166fd8dae7aaf3774efedab8ebf6fdc254b5bd9c
Author: Shaun McCance 
Date:   Wed Oct 27 11:33:09 2010 -0400

    [itstool] Fixed a few references of things that don't exist

 itstool |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

commit 83199f895d2d8257f0d2752ac40b920ea34dfa70
Author: Shaun McCance 
Date:   Wed Oct 27 11:18:53 2010 -0400

    [itstool] Set the xpath context node when evaluating locNotePointer

 itstool |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

commit 8906f85e0252895bc425dd8d629c20d2f533595f
Author: Shaun McCance 
Date:   Wed Oct 27 11:10:00 2010 -0400

    [itstool] Stop encoding/decoding UTF-8
    
    This was just causing errors because I wasn't keeping close enough
    track of when I had unicode objects and when I had byte strings.
    Turns out we can just treat it all as byte strings.

 itstool |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

commit ca20cb53d62873f1e884018c69359e217061721f
Author: Shaun McCance 
Date:   Wed Oct 27 10:17:45 2010 -0400

    [itstool] Use itst:match to determine if we should apply rules
    
    We scan all installed ITS rules files. Applying all the rules for a
    format as large as DocBook can slow down everything. This allows us
    to skip rules for non-matching formats.

 its/its.its |    4 ----
 itstool     |   31 +++++++++++++++++++++++++++----
 2 files changed, 27 insertions(+), 8 deletions(-)

commit 42ab65c65358d946b811358e355f6e04faf70e37
Author: Shaun McCance 
Date:   Wed Oct 27 09:53:20 2010 -0400

    [its.its] ITS rule to prevent translation of its:locNote elements

 its/Makefile.am |    2 +-
 its/its.its     |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)

commit ff882e3b433fc98bb5595d9af226775a12c87770
Author: Shaun McCance 
Date:   Wed Oct 27 09:52:56 2010 -0400

    [itstool] Implement localization notes

 itstool |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 73 insertions(+), 5 deletions(-)

commit e8c9277a233c64ad80d379168f478ef526f81093
Author: Shaun McCance 
Date:   Tue Oct 26 15:56:57 2010 -0400

    [itstool] Adding -i option to load in additional ITS rules

 itstool |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

commit bb185efafced05984c99656afca5adabccb45f90
Author: Shaun McCance 
Date:   Tue Oct 26 13:19:26 2010 -0400

    [tests] Add W3C ITS test files

 tests/EX-locNote-element-1.xml             |   14 ++++++++++
 tests/EX-locNote-selector-2.xml            |   10 +++++++
 tests/EX-locNotePointer-attribute-1.xml    |   19 +++++++++++++
 tests/EX-locNoteRef-attribute-1.xml        |   12 ++++++++
 tests/EX-locNoteRefPointer-attribute-1.xml |   16 +++++++++++
 tests/LocNote1.xml                         |   21 +++++++++++++++
 tests/LocNote2.xml                         |   15 ++++++++++
 tests/LocNote2_LinkedRules.xml             |    9 ++++++
 tests/LocNote3.xml                         |   17 ++++++++++++
 tests/LocNote4.xml                         |    8 +++++
 tests/Translate1.xml                       |   39 ++++++++++++++++++++++++++++
 tests/Translate2.xml                       |   10 +++++++
 tests/Translate2_LinkedRules.xml           |    5 +++
 tests/Translate3.xml                       |   13 +++++++++
 tests/Translate4.xml                       |   10 +++++++
 tests/Translate5.xml                       |   19 +++++++++++++
 tests/Translate6.xml                       |   19 +++++++++++++
 tests/Translate7.xml                       |   28 ++++++++++++++++++++
 tests/TranslateGlobal.xml                  |   13 +++++++++
 tests/TranslateGlobal_LinkedRules.xml      |    6 ++++
 tests/WithinText1.xml                      |   12 ++++++++
 tests/WithinText2.xml                      |   25 ++++++++++++++++++
 tests/WithinText2_LinkedRules.xml          |    6 ++++
 23 files changed, 346 insertions(+), 0 deletions(-)

commit dd06cccc33e029be8154500b9ada406ca9c0008c
Author: Shaun McCance 
Date:   Tue Oct 26 13:18:53 2010 -0400

    [itstool] Allow translatable elements inside untranslatable elements

 itstool |   57 +++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 35 insertions(+), 22 deletions(-)

commit 9de7d8245dcf82f79ea7a041ee097fbf79757cc5
Author: Shaun McCance 
Date:   Tue Oct 26 08:12:25 2010 -0400

    Adding build files and other miscellanea

 .gitignore      |   15 ++
 COPYING         |   19 ++
 COPYING.GPL3    |  674 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 INSTALL         |  365 ++++++++++++++++++++++++++++++
 Makefile.am     |   13 +
 autogen.sh      |    3 +
 configure.ac    |    9 +
 its/Makefile.am |    5 +
 8 files changed, 1103 insertions(+), 0 deletions(-)

commit 943cec6e34112cbaf15eee5597e3123b70b9724d
Author: Shaun McCance 
Date:   Mon Oct 25 22:45:00 2010 -0400

    Initial commit of itstool with docbook and mallard defs

 its/docbook.its |  525 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 its/mallard.its |   36 ++++
 itstool         |  460 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1021 insertions(+), 0 deletions(-)
itstool-2.0.2/itstool.1.in0000664000076400007640000000604412254103466012336 00000000000000.TH "ITSTOOL" "1" "December 2013" "itstool @VERSION@"

.SH "NAME"
itstool \- convert between XML and PO using ITS


.SH "SYNOPSIS"
itstool [OPTIONS] XMLFILES...
.br
itstool \fB\-m\fR  [OPTIONS] XMLFILES...
.br
itstool \fB\-j\fR  [OPTIONS] MOFILES...


.SH "DESCRIPTION"
\fBitstool \fR extracts messages from XML files and outputs PO template files,
then merges translations from MO files to create translated XML files. It
determines what to translate and how to chunk it into messages using the W3C
Internationalization Tag Set (ITS).

To extract messages from XML files \fBXMLFILES\fR and output them to \fBOUT.pot\fR:

.BR "itstool \-o OUT.pot XMLFILES"

After merging with existing translations or translating strings, generate an
MO file with \fBmsgfmt(1)\fR, then output translated files to the directory
\fBDIR\fR:

.BR "itstool \-m OUT.mo \-o DIR XMLFILES"

You can also create a single multilingual XML output file using an input XML
file and a set of MO files:

.BR "itstool \-j FILE.xml \-o OUT.xml MOFILES"

ITS definitions are loaded from the built-in rules, rules embedded in the source
XML files, files passed with the \fB-i\fR option, and ITS attributes in the source
XML files. Later definitions take precedence. You can disable built-in rules by
passing the \fB-n\fR option.


.SH "OPTIONS"

.SS "Extracting"

.IP "\fB\-o \fIOUT.pot\fR" 4
.PD 0
.IP "\fB\-\-out \fIOUT.pot\fR" 4
output PO template to the file \fBOUT.pot\fR

.SS "Merging"

.IP "\fB\-m \fIMOFILE\fR \fIXMLFILES\fR" 4
.PD 0
.IP "\fB\-\-merge \fIMOFILE\fR \fIXMLFILES\fR" 4
merge from an MO file \fBMOFILE\fR and output translated XML files for source \fBXMLFILES\fR

.IP "\fB\-l \fILANG\fR" 4
.PD 0
.IP "\fB\-\-lang \fILANG \fR" 4
explicitly set the language code output to XML

.IP "\fB\-o \fIOUT\fR" 4
.PD 0
.IP "\fB\-\-out \fIOUT \fR" 4
output XML files in the directory \fBOUT\fR

.SS "Joining"

.IP "\fB\-j \fXMLIFILE\fR \fIMOFILES\fR" 4
.PD 0
.IP "\fB\-\-join \fIXMLFILE\fR \fIMOFILES\fR" 4
join translations from \fBMOFILES\fR into a multilingual file based on source \fBXMLFILE\fR

.IP "\fB\-o \fIOUT.xml\fR" 4
.PD 0
.IP "\fB\-\-out \fIOUT.xml\fR" 4
output to the XML file \fBOUT.xml\fR

.SS "Common"

.IP "\fB\-i \fIITS\fR" 4
.PD 0
.IP "\fB\-\-its \fIITS\fR" 4
load the ITS rules in the file \fBITS\fR (can specify multiple times)

.IP "\fB\-n\fR" 4
.PD 0
.IP "\fB\-\-no\-builtins\fR" 4
do not apply the built-in ITS rules that ship with itstool

.IP "\fB\-s\fR" 4
.PD 0
.IP "\fB\-\-strict\fR" 4
exit with error when PO files contain broken XML

.IP "\fB\-d\fR" 4
.PD 0
.IP "\fB\-\-load\-dtd\fR" 4
load external DTDs used by input XML files

.IP "\fB\-k\fR" 4
.PD 0
.IP "\fB\-\-keep\-entities\fR" 4
keep entity references unexpanded in PO files

.IP "\fB\-p \fINAME VALUE\fR" 4
.PD 0
.IP "\fB\-\-param \fINAME VALUE\fR" 4
define ITS parameter \fBNAME\fR to the value \fBVALUE\fR (can specify multiple times)


.SH "AUTHOR"
Shaun McCance 


.SH "SEE ALSO"
More documentation for \fBitstool\fR is maintained online. For more information, see:

.BR "http://itstool.org/documentation/"
itstool-2.0.2/INSTALL0000644000076400007640000003633212254211643011201 00000000000000Installation Instructions
*************************

Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009 Free Software Foundation, Inc.

   Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without warranty of any kind.

Basic Installation
==================

   Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package.  The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.  Some packages provide this
`INSTALL' file but do not implement all of the features documented
below.  The lack of an optional feature in a given package is not
necessarily a bug.  More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.

   The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation.  It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions.  Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').

   It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring.  Caching is
disabled by default to prevent problems with accidental use of stale
cache files.

   If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release.  If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.

   The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'.  You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.

   The simplest way to compile this package is:

  1. `cd' to the directory containing the package's source code and type
     `./configure' to configure the package for your system.

     Running `configure' might take a while.  While running, it prints
     some messages telling which features it is checking for.

  2. Type `make' to compile the package.

  3. Optionally, type `make check' to run any self-tests that come with
     the package, generally using the just-built uninstalled binaries.

  4. Type `make install' to install the programs and any data files and
     documentation.  When installing into a prefix owned by root, it is
     recommended that the package be configured and built as a regular
     user, and only the `make install' phase executed with root
     privileges.

  5. Optionally, type `make installcheck' to repeat any self-tests, but
     this time using the binaries in their final installed location.
     This target does not install anything.  Running this target as a
     regular user, particularly if the prior `make install' required
     root privileges, verifies that the installation completed
     correctly.

  6. You can remove the program binaries and object files from the
     source code directory by typing `make clean'.  To also remove the
     files that `configure' created (so you can compile the package for
     a different kind of computer), type `make distclean'.  There is
     also a `make maintainer-clean' target, but that is intended mainly
     for the package's developers.  If you use it, you may have to get
     all sorts of other programs in order to regenerate files that came
     with the distribution.

  7. Often, you can also type `make uninstall' to remove the installed
     files again.  In practice, not all packages have tested that
     uninstallation works correctly, even though it is required by the
     GNU Coding Standards.

  8. Some packages, particularly those that use Automake, provide `make
     distcheck', which can by used by developers to test that all other
     targets like `make install' and `make uninstall' work correctly.
     This target is generally not run by end users.

Compilers and Options
=====================

   Some systems require unusual options for compilation or linking that
the `configure' script does not know about.  Run `./configure --help'
for details on some of the pertinent environment variables.

   You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment.  Here
is an example:

     ./configure CC=c99 CFLAGS=-g LIBS=-lposix

   *Note Defining Variables::, for more details.

Compiling For Multiple Architectures
====================================

   You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory.  To do this, you can use GNU `make'.  `cd' to the
directory where you want the object files and executables to go and run
the `configure' script.  `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.  This
is known as a "VPATH" build.

   With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory.  After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.

   On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor.  Like
this:

     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
                 CPP="gcc -E" CXXCPP="g++ -E"

   This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.

Installation Names
==================

   By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc.  You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.

   You can specify separate installation prefixes for
architecture-specific files and architecture-independent files.  If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.

   In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files.  Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.  In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.

   The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.

   The first method involves providing an override variable for each
affected directory.  For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'.  Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated.  The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.

   The second method involves providing the `DESTDIR' variable.  For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names.  The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters.  On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.

Optional Features
=================

   If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.

   Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System).  The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.

   For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.

   Some packages offer the ability to configure how verbose the
execution of `make' will be.  For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.

Particular systems
==================

   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:

     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"

and if that doesn't work, install pre-built binaries of GCC for HP-UX.

   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `' header file.  The option `-nodtk' can be used as
a workaround.  If GNU CC is not installed, it is therefore recommended
to try

     ./configure CC="cc"

and if that doesn't work, try

     ./configure CC="cc -nodtk"

   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.

   On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'.  It is recommended to use the following options:

     ./configure --prefix=/boot/common

Specifying the System Type
==========================

   There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on.  Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option.  TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:

     CPU-COMPANY-SYSTEM

where SYSTEM can have one of these forms:

     OS
     KERNEL-OS

   See the file `config.sub' for the possible values of each field.  If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.

   If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.

   If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.

Sharing Defaults
================

   If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists.  Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.

Defining Variables
==================

   Variables not defined in a site shell script can be set in the
environment passed to `configure'.  However, some packages may run
configure again during the build, and the customized values of these
variables may be lost.  In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'.  For example:

     ./configure CC=/usr/local2/bin/gcc

causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).

Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug.  Until the bug is fixed you can use this workaround:

     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash

`configure' Invocation
======================

   `configure' recognizes the following options to control how it
operates.

`--help'
`-h'
     Print a summary of all of the options to `configure', and exit.

`--help=short'
`--help=recursive'
     Print a summary of the options unique to this package's
     `configure', and exit.  The `short' variant lists options used
     only in the top level, while the `recursive' variant lists options
     also present in any nested packages.

`--version'
`-V'
     Print the version of Autoconf used to generate the `configure'
     script, and exit.

`--cache-file=FILE'
     Enable the cache: use and save the results of the tests in FILE,
     traditionally `config.cache'.  FILE defaults to `/dev/null' to
     disable caching.

`--config-cache'
`-C'
     Alias for `--cache-file=config.cache'.

`--quiet'
`--silent'
`-q'
     Do not print messages saying which checks are being made.  To
     suppress all normal output, redirect it to `/dev/null' (any error
     messages will still be shown).

`--srcdir=DIR'
     Look for the package's source code in directory DIR.  Usually
     `configure' can determine that directory automatically.

`--prefix=DIR'
     Use DIR as the installation prefix.  *note Installation Names::
     for more details, including other options available for fine-tuning
     the installation locations.

`--no-create'
`-n'
     Run the configure checks, but stop before creating any output
     files.

`configure' also accepts some other, not widely useful, options.  Run
`configure --help' for more details.

itstool-2.0.2/AUTHORS0000664000076400007640000000000011504425560011203 00000000000000itstool-2.0.2/NEWS0000664000076400007640000000444712254211625010653 000000000000002.0.2
=====
* Fixed crash in locale filter and drop rule, #715116
* Don't hardcode python path, #72533 (Ryan Lortie)
* Updated man page

2.0.1
=====
* Reworked default ITS rules for better performance

2.0.0
=====
* Support for ITS 2.0 Preserve Space data category
* Support for ITS 2.0 Locale Filter data category
* Support for ITS 2.0 External Resource data category
* Support for ITS 2.0 ID Value data category
* Support for ITS 2.0 parameters, including user overrides
* Support for ITS 2.0 local withinText attribute
* Fixed handling of localization note inheritance
* Fixed handling of namespace prefixes on elements
* Added option to retain entity references in PO files
* Added option to load external DTDs (Galen Charlton)
* Added built-in rules for DocBook 5
* Updated built-in rules to use ITS 2.0 Preserve Space and External
  Resource instead of 1.x custom extensions
* Excluded editor remarks and comments in built-in DocBook and Mallard
  rules with Locale Filter
* Made all DocBook *info children not within text in built-in rules

1.2.0
=====
* Added new "join mode" for multilingual XML formats
* Correctly handle ITS version attribute
* Better handling of multiple localization notes
* XML path markers are now in dedicated comments
* Show language code when failing to get translation from PO
* Added more regression tests

1.1.3
=====
* Handle UTF-8 in attribute values
* Don't output non-translatable external ref messages
* Better error handling

1.1.2
=====
* Better handling of XML errors in PO files

1.1.1
=====
* Catch XML parsing errors and exit with error code
* Fixed placeholder translation when it contains sub-elements
* Improved autogen.sh for out of tree compilations
* Commits by Claude Paroz, Javier Jardón

1.1.0
=====
* Added itst:context to set msgctxt
* Added itst:drop to drop context from translations
* Allow XML attribute to be translated
* Allow locNotePointer to return a string
* Allow localization notes to be space-preserving
* Allow both XLink and child rules on its:rules
* Fixed Unicode encoding/decoding errors
* Added automated test suite
* Added a man page
* Python 3 fixes
* Commits by Shaun McCance, Claude Paroz

1.0.1
=====
* Convert POSIX-style locales to BCP47
* Use #. instead of plain # for comments
* Added PO header to output
* Added --version

1.0.0
=====
* Initial release
itstool-2.0.2/its/0000775000076400007640000000000012254211646011025 500000000000000itstool-2.0.2/its/Makefile.in0000664000076400007640000002457612254211643013025 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = its
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
    *) f=$$p;; \
  esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
  for p in $$list; do echo "$$p $$p"; done | \
  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
    if (++n[$$2] == $(am__install_max)) \
      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
    END { for (dir in files) print dir, files[dir] }'
am__base_list = \
  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(itsdir)"
DATA = $(its_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CYGPATH_W = @CYGPATH_W@
DATADIR = @DATADIR@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
itsdir = $(datadir)/itstool/its
its_DATA = docbook.its docbook5.its its.its mallard.its ttml.its xhtml.its
EXTRA_DIST = $(its_DATA)
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu its/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu its/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure:  $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-itsDATA: $(its_DATA)
	@$(NORMAL_INSTALL)
	test -z "$(itsdir)" || $(MKDIR_P) "$(DESTDIR)$(itsdir)"
	@list='$(its_DATA)'; test -n "$(itsdir)" || list=; \
	for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  echo "$$d$$p"; \
	done | $(am__base_list) | \
	while read files; do \
	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(itsdir)'"; \
	  $(INSTALL_DATA) $$files "$(DESTDIR)$(itsdir)" || exit $$?; \
	done

uninstall-itsDATA:
	@$(NORMAL_UNINSTALL)
	@list='$(its_DATA)'; test -n "$(itsdir)" || list=; \
	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
	test -n "$$files" || exit 0; \
	echo " ( cd '$(DESTDIR)$(itsdir)' && rm -f" $$files ")"; \
	cd "$(DESTDIR)$(itsdir)" && rm -f $$files
tags: TAGS
TAGS:

ctags: CTAGS
CTAGS:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
	for dir in "$(DESTDIR)$(itsdir)"; do \
	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
	done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am: install-itsDATA

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-itsDATA

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic distclean \
	distclean-generic distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-itsDATA \
	install-man install-pdf install-pdf-am install-ps \
	install-ps-am install-strip installcheck installcheck-am \
	installdirs maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
	uninstall-am uninstall-itsDATA


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
itstool-2.0.2/its/its.its0000664000076400007640000000024612236010700012253 00000000000000
  

itstool-2.0.2/its/mallard.its0000664000076400007640000000360312254057250013103 00000000000000

  

  
  

  
    
      
      
      
    
  

  

  

  

  

  

  
  

itstool-2.0.2/its/Makefile.am0000664000076400007640000000020612234747472013010 00000000000000itsdir = $(datadir)/itstool/its

its_DATA = docbook.its docbook5.its its.its mallard.its ttml.its xhtml.its

EXTRA_DIST = $(its_DATA)
itstool-2.0.2/its/xhtml.its0000664000076400007640000000472312236010753012624 00000000000000

  

  

  

  

  

itstool-2.0.2/its/ttml.its0000664000076400007640000000030012234747472012450 00000000000000
  

itstool-2.0.2/its/docbook.its0000664000076400007640000002744112236011030013077 00000000000000

  
  
  

  

  
    
      
        
      
      
    
    
      
        
      
      
    
  

  
  

  
  

  
  
  
  
  

  
  
  

  
  

  
  

  
  

  
  

  
  

itstool-2.0.2/its/docbook5.its0000664000076400007640000002236012236011043013163 00000000000000