]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix docs building
authorJohn Mandereau <john.mandereau@gmail.com>
Thu, 21 Feb 2008 18:40:37 +0000 (19:40 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Thu, 21 Feb 2008 18:40:37 +0000 (19:40 +0100)
- use $(OUT_PNG_IMAGES) and $(OUT_PDF_IMAGES) prerequisites more
  appropriately;

- fix $(INFO_IMAGES_DIR) stuff with a .dep file and rules in
  texinfo-vars.rules;

- define .texi/.nexi ly rules depending of out==www, instead of
  disable them later in main makefile.

Documentation/user/GNUmakefile
make/ly-rules.make
stepmake/stepmake/texinfo-rules.make

index 5994526b73e71ae9fcf2d94c0aa09ada0072c0d5..f94800161cf37f1577e46ff92e25bde34fb85717 100644 (file)
@@ -43,7 +43,6 @@ export TEXINPUTS
 include $(depth)/make/stepmake.make
 
 info: $(INFO_FILES)
-
        @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
        @echo export PYTHONPATH=$(PYTHONPATH)
 
@@ -55,23 +54,6 @@ ifeq ($(out),www)
 # This builds all .info targets with images, in out-www.
 # Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
 
-# Cancel the special, non-image info generation rule that skips images:
-$(outdir)/%.info: $(outdir)/%.nexi
-
-# "makeinfo --info" MUST be able to read PNGs from CWD for info images
-# to work, hence lilypond/ -> $(outdir)/ symlink.
-# $(outdir)/lilypond/*.png symlinks are only needed to view
-# out-www/*.info with Emacs -- HTML docs no longer need these
-# symlinks, see replace_symlinks_urls in
-# buildscripts/add_html_footer.py.
-$(outdir)/%.info: lilypond
-lilypond: $(OUT_PNG_IMAGES)
-       rm -f lilypond
-       ln -s $(outdir) lilypond
-       mkdir -p $(outdir)/lilypond
-       find $(outdir)/lilypond/ -name '*'.png | xargs rm -f
-       (cd $(outdir)/lilypond/ ; ln -sf ../*.png . )
-
 local-install-info: info
        -$(INSTALL) -d $(DESTDIR)$(infodir)
 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
@@ -105,9 +87,6 @@ local-uninstall-WWW:
 
 else # out!=www
 
-# Cancel the default info generation rule that generates images:
-$(outdir)/%.info: $(outdir)/%.texi
-
 local-install-info: info
        -$(INSTALL) -d $(DESTDIR)$(package_infodir)
 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
@@ -152,7 +131,7 @@ local-uninstall-WWW: local-uninstall-info
 default:
 
 local-clean:
-       rm -f lilypond
+       rm -f $(INFO_IMAGES_DIR)
 
 local-help: extra-local-help
 
@@ -172,16 +151,13 @@ $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
 # Split manuals in HTML
 #
 $(outdir)/lilypond/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
-$(outdir)/lilypond-program/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
 $(outdir)/lilypond-learning/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
-$(outdir)/music-glossary/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
 
 
 #
 # Manuals in one big HTML page
 #
 $(outdir)/lilypond-big-page.html: $(OUT_PNG_IMAGES)
-$(outdir)/lilypond-program-big-page.html: $(OUT_PNG_IMAGES)
 $(outdir)/lilypond-learning-big-page.html: $(OUT_PNG_IMAGES)
 
 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
@@ -192,8 +168,7 @@ $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internal
        mkdir -p $(dir $@)
        $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
 
-$(outdir)/lilypond.pdf $(outdir)/lilypond-program.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
-$(outdir)/lilypond-learning.pdf $(outdir)/music-glossary.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
+$(outdir)/lilypond.pdf $(outdir)/lilypond-learning.pdf: $(OUT_PDF_IMAGES)
 
 $(outdir)/%.png: %.png
        convert -depth 8 -geometry 50x50% $< $@
@@ -238,8 +213,8 @@ $(outdir)/%.bib: %.bib
 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
        $(MAKE) -C $(top-src-dir)/mf
 
-$(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi: $(ITELY_FILES) $(ITEXI_FILES)
-$(outdir)/lilypond.nexi $(outdir)/lilypond-program.nexi $(outdir)/lilypond-learning.nexi: $(ITELY_FILES) $(ITEXI_FILES)
+$(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi $(outdir)/music-glossary.texi: $(ITELY_FILES) $(ITEXI_FILES)
+$(outdir)/lilypond.nexi $(outdir)/lilypond-program.nexi $(outdir)/lilypond-learning.nexi $(outdir)/music-glossary.nexi: $(ITELY_FILES) $(ITEXI_FILES)
 
 
 # Rules for the automatically generated documentation
index 2e9e5ff0224f7f2eaa02b62553fd417297d28925..1f63f9e4a2e97283665a546ebe3ca76c282df693 100644 (file)
@@ -4,6 +4,8 @@
 $(outdir)/%.latex:  %.doc
        $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BINARY) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir)  $(LILYPOND_BOOK_FLAGS) $<
 
+ifeq ($(out),www)
+
 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
 # it is not, for --srcdir builds
 $(outdir)/%.texi: %.tely
@@ -16,6 +18,8 @@ $(outdir)/%.texi: $(outdir)/%.tely
 # DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE.
 #      rm -f $<
 
+else # out != www
+
 # nexi: n[o-lilypond t]exi
 # for plain info doco: don't run lilypond
 $(outdir)/%.nexi: %.tely
@@ -26,6 +30,8 @@ $(outdir)/%.nexi: %.tely
 $(outdir)/%.info: $(outdir)/%.nexi
        $(MAKEINFO) -I $(outdir) --output=$(outdir)/$(*F).info $<
 
+endif # out != www
+
 $(outdir)/%.html.omf: %.tely
        $(call GENERATE_OMF,html)
 
index c37356207988e2de87157ad08f13d22a70e23872..fbf05402d63f18b18b3b87055a6c17c6d6a27572 100644 (file)
@@ -1,8 +1,36 @@
 
 .SUFFIXES: .html .info .texi .texinfo
 
-$(outdir)/%.info: $(outdir)/%.texi
-# makeinfo MUST have PNGs in cwd for info images to work
+# "makeinfo --info" MUST be able to read PNGs from CWD for info images
+# to work, hence $(INFO_IMAGES_DIR) -> $(outdir)/ symlink.
+# $(outdir)/$(INFO_IMAGES_DIR)/*.png symlinks are only needed to view
+# out-www/*.info with Emacs -- HTML docs no longer need these
+# symlinks, see replace_symlinks_urls in
+# buildscripts/add_html_footer.py.
+
+ifneq ($(INFO_IMAGES_DIR),)
+
+# make dereferences symlinks, and $(INFO_IMAGES_DIR) is a symlink
+# to $(outdir), so we can't use directly $(INFO_IMAGES_DIR) as a
+# prerequisite, otherwise %.info are always outdated (because older
+# than $(outdir), hence this .dep file
+
+$(outdir)/%.info-images-dir.dep: $(outdir)/%.texi
+       rm -f $*
+       ln -s $(outdir) $*
+       mkdir -p $(outdir)/$*
+       find $(outdir)/$*/ -name '*'.png | xargs rm -f
+       (cd $(outdir)/$*/ ; ln -sf ../*.png . )
+       touch $@
+
+else
+
+$(outdir)/.info-images-dir.dep:
+       true
+
+endif
+
+$(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep
        $(MAKEINFO) -I$(outdir) --output=$@ $<
 
 $(outdir)/%-big-page.html: $(outdir)/%.texi