]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
($(outdir)/VERSION): add VERSION target
[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 $(builddir)/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) 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 pfa-fonts:
37         $(MAKE) MAKE_PFA_FILES=1 -C mf
38 # don't make fontball - we have binary packages for that.
39
40 install-pfa-fonts:
41         $(MAKE) MAKE_PFA_FILES=1 -C mf install
42
43 fontball=type1-$(TOPLEVEL_VERSION).tar.gz
44 deb=lilypond_$(TOPLEVEL_VERSION)-1_i386.deb
45 debian-mirror=http://ftp.$(LANG).debian.org
46
47 $(outdir)/$(deb):
48         wget -P $(outdir) $(debian-mirror)/debian/pool/main/l/lilypond/$(deb)
49
50 #lld=.$(local_lilypond_datadir)
51 lld=./usr/share/lilypond/$(TOPLEVEL_VERSION)
52 $(outdir)/$(fontball): $(outdir)/$(deb)
53         rm -rf $(outdir)/./usr
54         ar p $< data.tar.gz | \
55                 tar -C $(outdir) -zxf - $(lld)/dvips $(lld)/fonts/type1
56 # strip the $(lld) part?
57         tar -C $(outdir) -czf $@ ./usr
58
59 get-pfa-fonts: $(outdir)/$(fontball)
60         # install by hand from $<
61
62 lilypond.words:
63         cd $(builddir) && $(PYTHON) $(buildscript-dir)/lilypond.words.py $(outdir)/lilypond.words
64
65 web-install: 
66         -$(INSTALL) -m 755 -d $(webdir) 
67         tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
68
69 local-install:
70         $(INSTALL) -d $(local_lilypond_datadir)
71
72 final-install:
73         @echo
74         @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
75         @echo " *** must be run. You're advised to source these scripts from your "
76         @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
77         @echo 
78
79 web-ext = gz html midi pdf png txt ly
80
81 footify = MAILADDRESS=bug-lilypond@gnu.org  $(PYTHON) $(step-bindir)/add-html-footer.py  --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
82
83 bla:
84         cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
85
86 local-WWW-post:  
87         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
88         cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
89         cd $(builddir) && rm -f `find . -name \*.html~ -print`
90         cd $(builddir) && find Documentation input \
91                 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
92                 > $(outdir)/weblist
93         echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
94         echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
95         cd $(builddir) && ls *.html >> $(outdir)/weblist
96         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
97
98
99 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
100
101 ALL-TAGS:
102         etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
103
104 web-clean:
105         $(SHELL) $(buildscript-dir)/clean-fonts.sh
106         $(MAKE) out=www clean
107         $(MAKE) $(builddir)/share/lilypond-force
108
109
110 default: $(config_h) builddir-setup $(outdir)/VERSION
111
112
113 $(outdir)/VERSION: $(config_make)
114         echo 'MAJOR_VERSION=$(MAJOR_VERSION)' > $@
115         echo 'MINOR_VERSION=$(MINOR_VERSION)' >> $@
116         echo 'PATCH_LEVEL=$(PATCH_LEVEL)' >> $@
117         echo 'MY_PATCH_LEVEL=$(MY_PATCH_LEVEL)' >> $@
118
119 builddir-setup: $(builddir)/share/lilypond-force
120
121 PO_FILES = $(wildcard $(srcdir)/po/*.po)
122 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
123 CATALOGS = $(HELP_CATALOGS:lilypond=) 
124
125 $(builddir)/share/lilypond-force:
126 # Preparing LilyPond tree for builddir exec
127         cd $(builddir) && rm -rf lib share
128         mkdir -p $(builddir)/lib/lilypond
129         mkdir -p $(builddir)/share/lilypond
130         mkdir -p $(builddir)/share/lilypond/fonts
131         mkdir -p $(builddir)/share/lilypond/tex
132         cd $(builddir)/lib/lilypond && \
133                 ln -s  ../../python/$(outconfbase) python
134         cd $(builddir)/share/lilypond && \
135                 ln -s $(abs-srcdir)/ly ly && \
136                 ln -s ../../mf/$(outconfbase) dvips && \
137                 ln -s ../../mf/$(outconfbase) afm && \
138                 ln -s ../../mf/$(outconfbase) tfm && \
139                 ln -s $(abs-srcdir)/mf && \
140                 ln -s $(abs-srcdir)/ps && \
141                 ln -s ../../python/$(outconfbase) python && \
142                 ln -s $(abs-srcdir)/scm
143         cd $(builddir)/share/lilypond/tex && \
144                 ln -s $(abs-srcdir)/tex source && \
145                 ln -s ../../../mf/$(outconfbase) generate
146         cd $(builddir)/share/lilypond/fonts && \
147                 ln -s $(abs-srcdir)/mf source && \
148                 ln -s ../../../mf/$(outconfbase) afm && \
149                 ln -s ../../../mf/$(outconfbase) tfm && \
150                 ln -s ../../../mf/$(outconfbase) type1
151         $(foreach i,$(CATALOGS), \
152                 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
153                 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
154                 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
155         touch $@
156
157 local-clean: builddir-setup-clean
158 builddir-setup-clean:
159         cd $(builddir) && rm -rf share
160
161 $(config_h): configure.in aclocal.m4
162 #
163 # this is to prevent people from getting
164 # undefined symbols  when we add them to config.h.in,
165 # and they blindly run "cvs update; make".
166 #
167         @echo
168         @echo ' *** $(config_h) is out of date'
169         @echo ' *** Remove it and rerun autogen:'
170         @echo '         rm $(config_h); ./autogen.sh'
171         @echo
172         @false
173
174
175 # maybe move into private script?
176 rsync-web:
177         cd out-www &&  mkdir web && tar  -xzf web.tar.gz -C web
178         cd out-www/web &&  rsync --delete --stats --progress -rltvu -e ssh . x:/var/www/lilypond/doc/v1.9/
179         cd out-www && rm -rf web/