]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/main.cc (setup_paths)[__MINGW32__]: Do not assume argv0 is
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 2 Nov 2005 12:48:44 +0000 (12:48 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 2 Nov 2005 12:48:44 +0000 (12:48 +0000)
absolute.  Better diagnostics.

* GNUmakefile.in: Add bin/ to tree and populate with some links.
This makes lilypond run from the build directory using argv0
relocation (without any --prefix or LILYPONDPREFIX setting).

ChangeLog
GNUmakefile.in
lily/main.cc

index dcde663b8c4bf62da6b2f7942f31edaa94979afc..25a8e1d623ef5652874919e34a1cc3a0520dcb99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-11-02  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * lily/main.cc (setup_paths)[__MINGW32__]: Do not assume argv0 is
+       absolute.  Better diagnostics.
+
+       * GNUmakefile.in: Add bin/ to tree and populate with some links.
+       This makes lilypond run from the build directory using argv0
+       relocation (without any --prefix or LILYPONDPREFIX setting).
+
 2005-11-02  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * scm/define-grobs.scm: purge self-[XY]-offset varialbes, replace
index 4e14224e2562fa5a7a5d2ce43e53877d1233e6d4..c81a76af8f90560384cce6f2d44a40edc32af943 100644 (file)
@@ -81,76 +81,84 @@ local-WWW-post:
        cd $(top-build-dir) && ls *.html >> $(outdir)/weblist
        cat $(outdir)/weblist | (cd $(top-build-dir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
 
-#share-prefix = $(top-build-dir)/share
-#tree-prefix = $(top-build-dir)/share/lilypond/$(TOPLEVEL_VERSION)
-share-prefix = $(outdir)/share
-tree-prefix = $(share-prefix)/lilypond/$(TOPLEVEL_VERSION)
+tree-prefix = $(outdir)
+tree-bin = $(tree-prefix)/bin
+tree-lib = $(tree-prefix)/lib
+tree-share = $(tree-prefix)/share
+tree-share-prefix = $(tree-share)/lilypond/$(TOPLEVEL_VERSION)
+tree-lib-prefix = $(tree-lib)/lilypond/$(TOPLEVEL_VERSION)
 
 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
 
 web-clean:
        $(MAKE) out=www clean
-       $(MAKE) $(tree-prefix)/lilypond-force
+       $(MAKE) $(tree-share-prefix)/lilypond-force
 
 default: $(config_h) build-dir-setup 
 
-build-dir-setup: $(tree-prefix)/lilypond-force
+build-dir-setup: $(tree-share-prefix)/lilypond-force
 
 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
 HELP_CATALOGS = $(PO_FILES:$(src-depth)/po/%.po=%)
 CATALOGS = $(HELP_CATALOGS:lilypond=) 
 
-$(tree-prefix)/lilypond-force link-tree: GNUmakefile
+$(tree-share-prefix)/lilypond-force link-tree: GNUmakefile
 # Preparing LilyPond tree for build-dir exec
-       cd $(top-build-dir)/$(outbase) && rm -rf lib share
-       mkdir -p $(top-build-dir)/$(outbase)/lib/$(package)
-       mkdir -p $(tree-prefix)
-       mkdir -p $(tree-prefix)/dvips
-       mkdir -p $(tree-prefix)/elisp
-       mkdir -p $(tree-prefix)/fonts
-       mkdir -p $(tree-prefix)/fonts/otf
-       mkdir -p $(tree-prefix)/fonts/tfm
-       mkdir -p $(tree-prefix)/fonts/type1
-       mkdir -p $(tree-prefix)/fonts/svg
-       mkdir -p $(tree-prefix)/fonts/map
-       mkdir -p $(tree-prefix)/fonts/enc
-       mkdir -p $(tree-prefix)/tex
-       cd $(top-build-dir)/$(outbase)/lib && \
-               ln -s ../../../../python/$(outconfbase) python
-       cd $(tree-prefix) && \
+       cd $(top-build-dir)/$(outbase) && rm -rf bin lib share
+       mkdir -p $(tree-bin)
+       mkdir -p $(tree-share-prefix)
+       mkdir -p $(tree-lib-prefix)
+       mkdir -p $(tree-share-prefix)/dvips
+       mkdir -p $(tree-share-prefix)/elisp
+       mkdir -p $(tree-share-prefix)/fonts
+       mkdir -p $(tree-share-prefix)/fonts/otf
+       mkdir -p $(tree-share-prefix)/fonts/tfm
+       mkdir -p $(tree-share-prefix)/fonts/type1
+       mkdir -p $(tree-share-prefix)/fonts/svg
+       mkdir -p $(tree-share-prefix)/fonts/map
+       mkdir -p $(tree-share-prefix)/fonts/enc
+       mkdir -p $(tree-share-prefix)/tex
+       cd $(tree-bin) && \
+               ln -sf ../../lily/$(outconfbase)/lilypond . && \
+               ln -sf ../../scripts/$(outconfbase)/convert-ly . && \
+               ln -sf ../../scripts/$(outconfbase)/lilypond-book . && \
+               ln -sf ../../scripts/$(outconfbase)/*.ly .
+       cd $(tree-lib-prefix) && \
+               ln -s ../../../../../python/$(outconfbase) python
+       cd $(tree-share-prefix) && \
                ln -s $(top-src-dir)/ly ly && \
                ln -s ../../../../mf mf && \
                ln -s $(top-src-dir)/ps && \
                ln -s ../../../../python/$(outconfbase) python && \
                ln -s $(top-src-dir)/scm && \
                ln -s $(top-src-dir)/scripts scripts
-       cd $(tree-prefix)/dvips && \
+       cd $(tree-share-prefix)/dvips && \
                ln -s ./../../../mf/$(outconfbase) mf-out && \
                ln -s $(top-src-dir)/ps
-       cd $(tree-prefix)/tex && \
+       cd $(tree-share-prefix)/tex && \
                ln -s $(top-src-dir)/tex source && \
                ln -s ../../../../../tex/$(outconfbase) tex-out && \
                ln -s ../../../../../mf/$(outconfbase) mf-out
-       -cd $(tree-prefix)/fonts/otf && \
+       -cd $(tree-share-prefix)/fonts/otf && \
                ln -s ../../../../../../mf/$(outconfbase)/*.otf .
-       -cd $(tree-prefix)/fonts/svg && \
+       -cd $(tree-share-prefix)/fonts/svg && \
                ln -s ../../../../../../mf/$(outconfbase)/*.svg .
-       -cd $(tree-prefix)/fonts/tfm && \
+       -cd $(tree-share-prefix)/fonts/tfm && \
                ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
-       -cd $(tree-prefix)/fonts/type1 && \
+       -cd $(tree-share-prefix)/fonts/type1 && \
                ln -s ../../../../../../mf/$(outconfbase)/*.pfa .
-       cd $(tree-prefix)/fonts && \
+       cd $(tree-share-prefix)/fonts && \
                ln -s $(top-src-dir)/mf source && \
                true
-       -cd $(tree-prefix)/elisp && \
+       -cd $(tree-share-prefix)/elisp && \
                ln -sf ../../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
                ln -s $(top-src-dir)/elisp/*.el .
        $(foreach i,$(CATALOGS), \
-               mkdir -p $(share-prefix)/locale/$i/LC_MESSAGES && \
-               cd $(share-prefix)/locale/$i/LC_MESSAGES && \
+               mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
+               cd $(tree-share)/locale/$i/LC_MESSAGES && \
                ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
 #      touch $@
-       touch $(tree-prefix)/lilypond-force
+       touch $(tree-share-prefix)/lilypond-force
 
 local-clean: build-dir-setup-clean
 build-dir-setup-clean:
index 1aae18e923de43549e8cf28fb8fb691153ea075a..f3b8689d9b428badc5bcb598659dcd01e603e0e5 100644 (file)
@@ -322,7 +322,7 @@ setup_paths (char const *argv0)
   if (getenv ("LILYPOND_VERBOSE"))
     be_verbose_global = true;
 
-#ifndef __MINGW32__
+#if 1 /* Huh, argv0 is not absolute on windows?  ndef __MINGW32__ */
   File_path p;
   p.parse_path (getenv ("PATH"));
   String bindir = dir_name (p.find (argv0));
@@ -333,8 +333,10 @@ setup_paths (char const *argv0)
   if (argv0_prefix != dir_name (dir_name (dir_name (prefix_directory))))
     {
       if (be_verbose_global)
-       warning (_f ("argv0 relocation: argv0=%s, prefix=%s", argv0,
-                    prefix_directory));
+       warning (_f ("argv0 relocation: prefix=%s, argv0=%s, argv0_prefix=%s",
+                    prefix_directory,
+                    argv0,
+                    argv0_prefix.to_str0 ()));
       String datadir = argv0_prefix + "/share";
       String libdir = argv0_prefix + "/lib";
       String localedir = datadir + "/locale";