]> git.donarmstrong.com Git - lilypond.git/commitdiff
texi2html: Create map for snippets, link other map files, rename to .xref-map
authorReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 6 Aug 2008 10:56:04 +0000 (12:56 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 6 Aug 2008 10:58:53 +0000 (12:58 +0200)
-) Renamed the map files to .xref-map, so that they are indicated by extension
   only (instead of _xref.map)
-) Add map file as dependency for the snippets page, so that it will be
   generated automatically
-) Linked the map file for the snippets in Documentation/user/out-www and the
   map files from Documentation/user in input/lsr/out-www, so that cross
   references between those manuals work correctly, too.

Documentation/user/GNUmakefile
buildscripts/extract_texi_filenames.py
input/lsr/GNUmakefile
lilypond-texi2html.init
stepmake/stepmake/texinfo-rules.make

index 23c67ec40cab5718816f82207ceb0af214a25587..b930b98e166c5d6373305417e494f6262a0aafcb 100644 (file)
@@ -125,13 +125,15 @@ $(outdir)/%/source:
        mkdir -p $(dir $@)
        ln -sf $(depth)/.. $(@)
 
-local-WWW-1: $(MASTER_TEXI_FILES) $(MASTER_TEXI_FILES:%.texi=%_xref.map) $(PDF_FILES) info
+local-WWW-1: $(MASTER_TEXI_FILES) $(MASTER_TEXI_FILES:%.texi=%.xref-map) $(outdir)/lilypond-snippets.xref-map $(PDF_FILES) info
 
 local-WWW-2: $(HTML_FILES) $(DEEP_HTML_FILES) $(source-links)
 
 $(outdir)/%.bib: %.bib
        ln -f $< $@
 
+$(outdir)/lilypond-snippets.xref-map:
+       ln -fs ../../../input/lsr/$@ $@
 
 # lilypond.texi deps
 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
index e8334f34e610e0dc4e8b7935dbacafc2cfaf9bcf..beea07e43366a485f5e04a103bdfa828a3f49505 100755 (executable)
@@ -14,7 +14,7 @@
 # which is then used for the filename/anchor.
 #
 # If this script is run on a file texifile.texi, it produces a file
-# texifile_xref.map with tab-separated entries of the form
+# texifile.xref-map with tab-separated entries of the form
 #        NODE\tFILENAME\tANCHOR
 # Note: The filename does not have any extension appended!
 # This file can then be used by our texi2html init script to determine 
@@ -104,7 +104,7 @@ unnumbered_re = re.compile (r'unnumbered.*')
 def process_sections (filename, page):
     sections = section_translation_re.findall (page)
     # TODO: Don't rely on the file having a 4-letter extension (texi)!!!
-    p = os.path.join (outdir, filename) [:-5] + '_xref.map'
+    p = os.path.join (outdir, filename) [:-5] + '.xref-map'
     f = open (p, 'w')
 
     this_title = ''
index ed7eeef11331240fd473255554d107ac753917cb..97e188eb887d052616b348eca17b80f62a2407d7 100644 (file)
@@ -58,10 +58,18 @@ local-clean:
 
 local-WWW-1: info $(outdir)/lilypond-snippets.pdf \
   $(outdir)/lilypond-snippets.texi \
-  $(outdir)/lilypond-snippets_xref.map
+  $(outdir)/lilypond-snippets.xref-map \
+  $(outdir)/lilypond.xref-map \
+  $(outdir)/lilypond-learning.xref-map
 
 local-WWW-2: $(outdir)/lilypond-snippets/index.html \
   $(outdir)/lilypond-snippets-big-page.html \
   $(source-links)
 
+%.xref-map: %.texi
+       $(PYTHON) $(buildscript-dir)/extract_texi_filenames.py $<
+
+$(outdir)/lilypond.xref-map $(outdir)/lilypond-learning.xref-map:
+       ln -sf ../../../Documentation/user/$@ $@
+
 .SECONDARY:
index a7eaf9d17fe9b1e3b4868b79b7c275556120d960..f1815cb33959d8c4c95d3594e02ca01825223504 100644 (file)
@@ -326,7 +326,7 @@ sub split_at_numbered_sections($$$)
 sub lilypond_init_map ()
 {
     my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
-    my $map_filename = "$docu_dir/${docu_name}_xref.map";
+    my $map_filename = "$docu_dir/${docu_name}.xref-map";
     $node_to_filename_map = load_map_file ($map_filename);
 }
 push @Texi2HTML::Config::command_handler_init, \&lilypond_init_map;
@@ -427,7 +427,7 @@ sub lilypond_external_href($$$)
     # Load the map if we haven't done so already
     if (!exists($translated_books{$map_name})) {
       my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
-      my $map_filename = "$docu_dir/${map_name}_xref.map";
+      my $map_filename = "$docu_dir/${map_name}.xref-map";
       $translated_books{$map_name} = load_map_file ($map_filename);
     }
 
index a75cb0f5483df961e07026d371e6c495fc24d144..fc23bcb3fd8ee8e2e8916adc315c923dc4f73933 100644 (file)
@@ -26,12 +26,12 @@ endif
 $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep $(outdir)/version.itexi
        $(MAKEINFO) -I$(outdir) --output=$@ $<
 
-$(outdir)/%-big-page.html: $(outdir)/%.texi $(outdir)/%_xref.map $(outdir)/version.itexi
+$(outdir)/%-big-page.html: $(outdir)/%.texi $(outdir)/%.xref-map $(outdir)/version.itexi
        $(TEXI2HTML) --I=$(outdir) -D bigpage --output=$@ $(TEXI2HTML_INIT) $< 
        cp $(top-src-dir)/Documentation/lilypond*.css $(dir $@)
 
 
-$(outdir)/%.html: $(outdir)/%.texi $(outdir)/%_xref.map $(outdir)/version.itexi
+$(outdir)/%.html: $(outdir)/%.texi $(outdir)/%.xref-map $(outdir)/version.itexi
        $(TEXI2HTML) --I=$(outdir) --output=$@ $(TEXI2HTML_INIT) $<
        cp $(top-src-dir)/Documentation/lilypond*.css $(dir $@)
 
@@ -44,7 +44,7 @@ $(outdir)/%.pdf.omf: %.texi
 $(outdir)/%.ps.gz.omf: %.texi
        $(call GENERATE_OMF,ps.gz)
 
-$(outdir)/%/index.html: $(outdir)/%.texi $(outdir)/%_xref.map $(outdir)/version.itexi
+$(outdir)/%/index.html: $(outdir)/%.texi $(outdir)/%.xref-map $(outdir)/version.itexi
        mkdir -p $(dir $@)
        $(TEXI2HTML) --I=$(outdir) --output=$(dir $@) --prefix=index --split=section $(TEXI2HTML_INIT) $<
        cp $(top-src-dir)/Documentation/lilypond*.css $(dir $@)
@@ -59,7 +59,7 @@ $(outdir)/%.texi: %.texi
        rm -f $@
        cp $< $@
 
-%_xref.map: %.texi
+%.xref-map: %.texi
        $(PYTHON) $(buildscript-dir)/extract_texi_filenames.py $<