summaryrefslogtreecommitdiff
path: root/tools/xml_helper.py
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-09-07 10:52:52 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-09-07 10:52:52 -0400
commitf53192b8ac8806fabea46a71ccee94b0c2afc2a7 (patch)
tree243cba83847ecd5ed1b1dc6e2d6fe478bca593ee /tools/xml_helper.py
parent90333657d3c090677a924d6c41377a2922a7186b (diff)
Build+install manpages
Diffstat (limited to 'tools/xml_helper.py')
-rw-r--r--tools/xml_helper.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/xml_helper.py b/tools/xml_helper.py
index e87126f2f7..598b33f655 100644
--- a/tools/xml_helper.py
+++ b/tools/xml_helper.py
@@ -17,12 +17,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+import os.path
from lxml import etree as tree
class CustomResolver(tree.Resolver):
def resolve(self, url, id, context):
+ topsrcdir = os.path.dirname(os.path.dirname(__file__))
if 'custom-entities.ent' in url:
- return self.resolve_filename('man/custom-entities.ent', context)
+ return self.resolve_filename(os.path.join(topsrcdir, 'man/custom-entities.ent.in'), context)
+ f = os.path.join(topsrcdir, 'man', os.path.basename(url))
+ if os.path.isfile(f):
+ return self.resolve_filename(f, context)
_parser = tree.XMLParser()
_parser.resolvers.add(CustomResolver())