]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
* stepmake/aclocal.m4: Check for libkpathsea.so.
[lilypond.git] / GNUmakefile.in
1 # -*-Makefile-*-
2 # title    specific top level makefile for LilyPond  
3
4 # subdir level:
5 #
6 depth = .
7 #
8
9 # descent order into subdirectories
10
11 SUBDIRS = buildscripts python scripts \
12         elisp \
13         flower kpath-guile ttftool lily \
14         mf ly tex ps scm \
15         po make \
16         cygwin debian stepmake \
17         Documentation input \
18         vim 
19 #
20
21 include VERSION
22 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
23
24 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh
25 README_FILES = ChangeLog  COPYING DEDICATION ROADMAP THANKS 
26 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
27 IN_FILES := $(wildcard *.in)
28 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
29 EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
30   $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES)
31 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
32 INSTALLATION_DIR=$(local_lilypond_datadir)
33 INSTALLATION_FILES=$(config_make) VERSION
34
35 # bootstrap stepmake:
36 #
37 STEPMAKE_TEMPLATES=toplevel po install
38 include $(depth)/make/stepmake.make 
39
40 doc: 
41         $(MAKE) -C Documentation
42
43 install-WWW:
44         -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir) 
45         tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
46 # install-WWW does not recurse; fake it visiting Documentation/user manually
47         $(MAKE) -C Documentation/user local-install-WWW
48         $(MAKE) -C Documentation/user install-info
49
50 web-install:
51         $(MAKE) out=www install-WWW
52
53 uninstall-WWW:
54         #TODO
55
56 web-uninstall:
57         $(MAKE) out=www uninstall-WWW=
58
59 local-install:
60         $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
61
62 final-install:
63         @echo '*** Before using LilyPond, the contents of one of the login scripts'
64         @echo '*** buildscripts/out/lilypond-{profile,login} should be sourced.'
65         @echo '*** LilyPond should have been installed to do that automatically'
66         @echo '*** when you log in.  So, please log out now and log in again.'
67         @echo '*** For more information see Invoking LilyPond in the manual.'
68
69 web-ext = html midi pdf png txt ly
70
71 footify = $(PYTHON) $(step-bindir)/add-html-footer.py  --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
72 footifymail = MAILADDRESS=bug-lilypond@gnu.org
73
74 local-WWW-post:
75         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
76         cd $(builddir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify)
77         cd $(builddir) && find . -name \*.html~ -print | xargs rm -f
78         cd $(builddir) && find Documentation input \
79                 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
80                 > $(outdir)/weblist
81         echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
82         echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
83         cd $(builddir) && ls *.html >> $(outdir)/weblist
84         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
85
86 tree-prefix = $(builddir)/share/lilypond/$(TOPLEVEL_VERSION)
87
88 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
89
90 web-clean:
91         $(MAKE) out=www clean
92         $(MAKE) $(tree-prefix)/lilypond-force
93
94 default: $(config_h) builddir-setup 
95
96 builddir-setup: $(tree-prefix)/lilypond-force
97
98 PO_FILES = $(wildcard $(srcdir)/po/*.po)
99 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
100 CATALOGS = $(HELP_CATALOGS:lilypond=) 
101
102 $(tree-prefix)/lilypond-force:
103 # Preparing LilyPond tree for builddir exec
104         cd $(builddir) && rm -rf lib share
105         mkdir -p $(builddir)/lib/$(package)
106         mkdir -p $(tree-prefix)
107         mkdir -p $(tree-prefix)/dvips
108         mkdir -p $(tree-prefix)/elisp
109         mkdir -p $(tree-prefix)/fonts
110         mkdir -p $(tree-prefix)/tex
111         cd $(builddir)/lib && \
112                 ln -s  ../../python/$(outconfbase) python
113         cd $(tree-prefix) && \
114                 ln -s $(abs-srcdir)/ly ly && \
115                 ln -s ../../mf/$(outconfbase) otf && \
116                 ln -s ../../mf/$(outconfbase) svg && \
117                 ln -s ../../mf/$(outconfbase) tfm && \
118                 ln -s $(abs-srcdir)/mf && \
119                 ln -s $(abs-srcdir)/ps && \
120                 ln -s ../../python/$(outconfbase) python && \
121                 ln -s $(abs-srcdir)/scm
122         cd $(tree-prefix)/dvips && \
123                 ln -s ./../mf/$(outconfbase) mf-out && \
124                 ln -s $(abs-srcdir)/ps
125         cd $(tree-prefix)/tex && \
126                 ln -s $(abs-srcdir)/tex source && \
127                 ln -s ../../../tex/$(outconfbase) tex-out && \
128                 ln -s ../../../mf/$(outconfbase) mf-out
129         cd $(tree-prefix)/fonts && \
130                 ln -s $(abs-srcdir)/mf source && \
131                 ln -s ../../../tex/$(outconfbase) enc && \
132                 ln -s ../../../mf/$(outconfbase) map && \
133                 ln -s ../../../mf/$(outconfbase) otf && \
134                 ln -s ../../../mf/$(outconfbase) tfm && \
135                 ln -s ../../../mf/$(outconfbase) svg && \
136                 ln -s ../../../mf/$(outconfbase) type1
137         cd $(tree-prefix)/elisp && \
138                 ln -sf ../../../elisp/$(outconfbase)/lilypond-words.el . && \
139                 ln -s $(abs-srcdir)/elisp/*.el .
140         $(foreach i,$(CATALOGS), \
141                 mkdir -p $(tree-prefix)/locale/$i/LC_MESSAGES && \
142                 cd $(tree-prefix)/locale/$i/LC_MESSAGES && \
143                 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
144         touch $@
145
146 local-clean: builddir-setup-clean
147 builddir-setup-clean:
148         cd $(builddir) && rm -rf share
149
150 $(config_h): config.hh.in 
151 #
152 # this is to prevent people from getting
153 # undefined symbols  when we add them to config.h.in,
154 # and they blindly run "cvs update; make".
155 #
156         @echo
157         @echo ' *** $(config_h) is out of date'
158         @echo ' *** Remove it and rerun autogen:'
159         @echo '         rm $(config_h); ./autogen.sh'
160         @echo
161         @false
162
163