From 70adadcf60fa2571d3148115af5d7e96d80d57a5 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Fri, 16 Mar 2012 15:01:14 -0400 Subject: [PATCH] Remove hard-coded links to v2.13 docs (issue 2399). ONLY_WEB_VERSION will take the value vMAJOR.MINOR from the top-level VERSION file. If we ever want to change the online docs to point to e.g. doc/devel, ONLY_WEB_VERSION should take the value devel. --- Documentation/lilypond-texi2html.init | 7 +++---- make/website.make | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/lilypond-texi2html.init b/Documentation/lilypond-texi2html.init index 03e0c903e6..a17428bf4b 100644 --- a/Documentation/lilypond-texi2html.init +++ b/Documentation/lilypond-texi2html.init @@ -1424,11 +1424,10 @@ sub lilypond_external_href($$$) $href = &$default_external_href($node, $node_id, $node_xhtml_id, lc_last($file)); $href = remove_unneeded_anchor($href); - # TODO: very yucky, but will be fixed in issue 1004 if ($web_manual) { - my $only_web = $ENV{ONLY_WEB}; - if ($only_web) { - $href = "../../doc/v2.13/Documentation/web/".$href; + my $only_web_version = $ENV{ONLY_WEB_VERSION}; + if ($only_web_version) { + $href = "../../doc/".$only_web_version."/Documentation/web/".$href; } } diff --git a/make/website.make b/make/website.make index 59ac71d818..0c53f5434c 100644 --- a/make/website.make +++ b/make/website.make @@ -29,6 +29,8 @@ else include $(config_make) endif +include $(top-src-dir)/VERSION + ################################################################ #The 4 lines below present an option to force make website to run # quietly only when it is run as make -s website. However, we've @@ -52,7 +54,7 @@ OUT=out-website WEB_LANGS := $(shell MAKEWEB=1 $(PYTHON) $(top-src-dir)/python/langdefs.py) -TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD \ +TEXI2HTML=ONLY_WEB_VERSION=v$(MAJOR_VERSION).$(MINOR_VERSION) TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD \ $(TEXI2HTML_PROGRAM) -D web_version --prefix=index --split=section \ --init-file=$(texi2html-init-file) \ --I=$(dir $<) \ -- 2.39.2