From: Jan Nieuwenhuizen Date: Tue, 13 Jan 2009 20:13:06 +0000 (+0100) Subject: install-info-WWW: also install symlink for images in info. X-Git-Tag: release/2.12.2-1~21 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cac75c955dc836087d398e8c54e9de3c68f1ed95;p=lilypond.git install-info-WWW: also install symlink for images in info. --- diff --git a/GNUmakefile.in b/GNUmakefile.in index d405a7668a..09fbeb259f 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -60,11 +60,15 @@ install-help2man: install-WWW: -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir) rsync -rl $(outdir)/offline-root/ $(DESTDIR)$(webdir) + +install-info-WWW: $(MAKE) -C Documentation/user install-info $(MAKE) -C input/lsr install-info + (cd $(DESTDIR)$(infodir) && rm -f lilypond && ln -sf $(shell $(PYTHON) $(buildscript-dir)/relative $(DESTDIR)$(webdir)/Documentation/user) lilypond) web-install: $(MAKE) out=www install-WWW + $(MAKE) out=www install-info-WWW uninstall-WWW: rm -rf $(DESTDIR)$(webdir) diff --git a/scripts/build/relative.py b/scripts/build/relative.py new file mode 100755 index 0000000000..cb1da88433 --- /dev/null +++ b/scripts/build/relative.py @@ -0,0 +1,17 @@ +#! @PYTHON@ + +import os +import sys + +def relative (dir, r=os.getcwd ()): + dir = os.path.normpath (dir) + '/' + r = os.path.normpath (r) + '/' + prefix = len (os.path.commonprefix ((dir, r))) + if prefix == len (dir): + return './' + if prefix > 1: + return '../' * len (r[prefix:].split ('/')) + dir[prefix:] + return dir + +if __name__ == '__main__': + print relative (sys.argv[1])