diff options
-rw-r--r-- | CustomTarget_html.mk | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | helpers/make_icon_link.txt.py | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index b9eab167f7..cd53b9c6a3 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -157,8 +157,10 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \ # link txt file for icon replacement table $(SRCDIR)/helpcontent2/helpers/links.txt.xsl: \ - $(SRCDIR)/icon-themes/colibre/links.txt - $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py $(SRCDIR)/icon-themes/colibre/links.txt $@ + $(SRCDIR)/icon-themes/colibre/links.txt \ + $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py \ + $(call gb_ExternalExecutable_get_dependencies,python) + $(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/helpcontent2/helpers/make_icon_link.txt.py $(SRCDIR)/icon-themes/colibre/links.txt $@ define html_gen_html_dep $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \ diff --git a/helpers/make_icon_link.txt.py b/helpers/make_icon_link.txt.py index e5ef3d2ee8..573af4050c 100755..100644 --- a/helpers/make_icon_link.txt.py +++ b/helpers/make_icon_link.txt.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - # # This file is part of the LibreOffice project. # @@ -18,14 +16,14 @@ try: file_icon = open(sys.argv[1], "r") except IOError: - print "There was an error reading", file_icon + print("There was an error reading", file_icon) sys.exit() try: # open file stream file_xsl = open(sys.argv[2], "w+") except IOError: - print "There was an error writing", file_xsl + print("There was an error writing", file_xsl) sys.exit() file_xsl.write('<?xml version="1.0" encoding="UTF-8"?>\n'); @@ -36,7 +34,7 @@ file_xsl.write('<xsl:choose>\n') for line in file_icon: if line[0] != "#" : - if line.find('png',0, len(line)) <> -1 : + if line.find('png',0, len(line)) != -1 : a = "\'" + line.split()[0] + "\'"; b = line.split()[1].replace(".png",".svg"); file_xsl.write('<xsl:when test="$src1=' + a + '"><xsl:text>'+ b + '</xsl:text></xsl:when>\n'); |