From ec8bd524c40ef951bc00c9a15051793546cc5a55 Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Fri, 29 Feb 2008 22:15:51 +0100 Subject: [PATCH] Fix changes resulting from Snippets compilation in Info --- buildscripts/add_html_footer.py | 6 +++--- input/lsr/GNUmakefile | 8 +++++++- stepmake/stepmake/texinfo-targets.make | 6 ++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/buildscripts/add_html_footer.py b/buildscripts/add_html_footer.py index da827c1301..7f30c94edc 100644 --- a/buildscripts/add_html_footer.py +++ b/buildscripts/add_html_footer.py @@ -87,7 +87,7 @@ def build_pages_dict (filelist): def source_links_replace (m, source_val): return 'href="' + os.path.join (source_val, m.group (1)) + '"' -splitted_docs_re = re.compile ('(input/lsr/out-www/snippets|Documentation/user/out-www/(lilypond|music-glossary|lilypond-program|lilypond-learning))/') +splitted_docs_re = re.compile ('(input/lsr/out-www/lilypond-snippets|Documentation/user/out-www/(lilypond|music-glossary|lilypond-program|lilypond-learning))/') snippets_ref_re = re.compile (r'href="(\.\./)?lilypond-snippets') @@ -95,7 +95,7 @@ snippets_ref_re = re.compile (r'href="(\.\./)?lilypond-snippets') # This function avoids creating symlinks for splitted HTML manuals # Get rid of symlinks in GNUmakefile.in (local-WWW-post) # this also fixes missing PNGs only present in translated docs -def _urls (s, prefix): +def hack_urls (s, prefix): if splitted_docs_re.match (prefix): s = re.sub ('(href|src)="(lily-.*?|.*?[.]png)"', '\\1="../\\2"', s) @@ -268,7 +268,7 @@ def add_html_footer (translation, in_f.close() s = re.sub ('%', '%%', s) - s = replace_symlinks_urls (s, prefix) + s = hack_urls (s, prefix) s = add_header (s) ### add footer diff --git a/input/lsr/GNUmakefile b/input/lsr/GNUmakefile index ec25f7310d..16946ea380 100644 --- a/input/lsr/GNUmakefile +++ b/input/lsr/GNUmakefile @@ -6,11 +6,15 @@ STEPMAKE_TEMPLATES=documentation texinfo tex LOCALSTEPMAKE_TEMPLATES=lilypond ly EXTRA_DIST_FILES += README $(call src-wildcard,*.snippet-list) +ifneq ($(out),) MAIN_INFO_DOC = lilypond-snippets INFO_DOCS = lilypond-snippets INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info) INFO_IMAGES_DIR = lilypond-snippets DEST_INFO_IMAGES_SUBDIR = input/lsr +endif + +default: include $(depth)/make/stepmake.make @@ -25,9 +29,11 @@ $(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES) info: $(INFO_FILES) ifneq ($(out),www) -# cancel install-info target +# cancel install-info target and $(INFO_FILES) 'default' target # (there is no lilypond-snippets.info without images) local-install-info: + +$(INFO_FILES): true endif diff --git a/stepmake/stepmake/texinfo-targets.make b/stepmake/stepmake/texinfo-targets.make index 8f421dfedc..488b81f24b 100644 --- a/stepmake/stepmake/texinfo-targets.make +++ b/stepmake/stepmake/texinfo-targets.make @@ -20,6 +20,11 @@ install-info: $(INFO_FILES) uninstall-info: $(INFO_INSTALL_COMMAND) local-uninstall +ifeq ($(INFO_FILES),) +local-install-info: +local-uninstall-info: + +else # $(INFO_FILES) non empty # There are two modes for info: with and without images. ifeq ($(out),www) @@ -87,6 +92,7 @@ endif # installing into standard /usr/* root# installing into /usr/... endif # out!=www +endif # $(INFO_FILES) non empty TEXINFO_ALL_MENUS_UPDATE_EL ='\ (let ((error nil)\ -- 2.39.2