]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
62b9f40e7d89fcef9b14de7c9cae02eda7d22f10
[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 lily \
14         mf ly tex ps scm \
15         po make \
16         cygwin debian stepmake \
17         Documentation input
18 #
19
20 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh
21 README_FILES = ChangeLog  COPYING DEDICATION ROADMAP THANKS 
22 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
23 IN_FILES := $(wildcard *.in)
24 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
25 VIM_FILES = vim/filetype.vim vim/compiler/lilypond.vim vim/ftplugin/lilypond.vimvim/indent/lilypond.vim vim/syntax/lilypond.vim
26 EXTRA_DIST_FILES = VERSION .cvsignore $(README_FILES) $(SCRIPTS) $(IN_FILES) \
27   $(PATCH_FILES) $(VIM_FILES)
28 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
29 INSTALLATION_DIR=$(local_lilypond_datadir)
30 INSTALLATION_FILES=$(config_make) VERSION
31
32 # bootstrap stepmake:
33 #
34 STEPMAKE_TEMPLATES=toplevel po install
35 include $(depth)/make/stepmake.make 
36
37 doc: 
38         $(MAKE) -C Documentation
39
40 install-WWW:
41         -$(INSTALL) -m 755 -d $(webdir) 
42         tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
43 # install-WWW does not recurse; fake it visiting Documentation/user manually
44         $(MAKE) -C Documentation/user local-install-WWW
45
46 web-install:
47         $(MAKE) out=www install-WWW
48         $(MAKE) out=www 
49
50 uninstall-WWW:
51         #TODO
52
53 web-uninstall:
54         $(MAKE) out=www uninstall-WWW=
55
56 local-install:
57         $(INSTALL) -d $(local_lilypond_datadir)
58
59 final-install:
60         @echo
61         @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
62         @echo " *** must be run. You're advised to source these scripts from your "
63         @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
64         @echo
65
66 web-ext = gz html midi pdf png txt ly
67
68 footify = MAILADDRESS=bug-lilypond@gnu.org  $(PYTHON) $(step-bindir)/add-html-footer.py  --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
69
70 local-WWW-post:
71         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
72         cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
73         cd $(builddir) && rm -f `find . -name \*.html~ -print`
74         cd $(builddir) && find Documentation input \
75                 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
76                 > $(outdir)/weblist
77         echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
78         echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
79         cd $(builddir) && ls *.html >> $(outdir)/weblist
80         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
81
82
83 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
84
85 # FIXME: rename to TAGS; should include deeper TAGS files, see guile-core
86 ALL-TAGS:
87         etags $(shell find . $(src-ext:%=-name '*.%' -or) -false \
88                 | grep -v '/out')
89
90 web-clean:
91         $(MAKE) out=www clean
92         $(MAKE) $(builddir)/share/lilypond-force
93
94 default: $(config_h) builddir-setup 
95
96 builddir-setup: $(builddir)/share/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 $(builddir)/share/lilypond-force:
103 # Preparing LilyPond tree for builddir exec
104         cd $(builddir) && rm -rf lib share
105         mkdir -p $(builddir)/lib/lilypond
106         mkdir -p $(builddir)/share/lilypond
107         mkdir -p $(builddir)/share/lilypond/elisp
108         mkdir -p $(builddir)/share/lilypond/fonts
109         mkdir -p $(builddir)/share/lilypond/tex
110         cd $(builddir)/lib/lilypond && \
111                 ln -s  ../../python/$(outconfbase) python
112         cd $(builddir)/share/lilypond && \
113                 ln -s $(abs-srcdir)/ly ly && \
114                 ln -s ../../mf/$(outconfbase) dvips && \
115                 ln -s ../../mf/$(outconfbase) afm && \
116                 ln -s ../../mf/$(outconfbase) tfm && \
117                 ln -s $(abs-srcdir)/mf && \
118                 ln -s $(abs-srcdir)/ps && \
119                 ln -s ../../python/$(outconfbase) python && \
120                 ln -s $(abs-srcdir)/scm
121         cd $(builddir)/share/lilypond/tex && \
122                 ln -s $(abs-srcdir)/tex source && \
123                 ln -s ../../../mf/$(outconfbase) generate
124         cd $(builddir)/share/lilypond/fonts && \
125                 ln -s $(abs-srcdir)/mf source && \
126                 ln -s ../../../mf/$(outconfbase) afm && \
127                 ln -s ../../../mf/$(outconfbase) tfm && \
128                 ln -s ../../../mf/$(outconfbase) type1
129         cd $(builddir)/share/lilypond/elisp && \
130                 ln -sf ../../../elisp/$(outconfbase)/lilypond.words.el . && \
131                 ln -s $(abs-srcdir)/elisp/*.el .
132         $(foreach i,$(CATALOGS), \
133                 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
134                 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
135                 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
136         touch $@
137
138 local-clean: builddir-setup-clean
139 builddir-setup-clean:
140         cd $(builddir) && rm -rf share
141
142 $(config_h): config.hh.in 
143 #
144 # this is to prevent people from getting
145 # undefined symbols  when we add them to config.h.in,
146 # and they blindly run "cvs update; make".
147 #
148         @echo
149         @echo ' *** $(config_h) is out of date'
150         @echo ' *** Remove it and rerun autogen:'
151         @echo '         rm $(config_h); ./autogen.sh'
152         @echo
153         @false
154
155