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