]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
* stepmake/GNUmakefile.in: remove nested stepmake packaging stuff.
[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
111
112 builddir-setup: $(builddir)/share/lilypond-force
113
114 PO_FILES = $(wildcard $(srcdir)/po/*.po)
115 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
116 CATALOGS = $(HELP_CATALOGS:lilypond=) 
117
118 $(builddir)/share/lilypond-force:
119 # Preparing LilyPond tree for builddir exec
120         cd $(builddir) && rm -rf lib share
121         mkdir -p $(builddir)/lib/lilypond
122         mkdir -p $(builddir)/share/lilypond
123         mkdir -p $(builddir)/share/lilypond/fonts
124         mkdir -p $(builddir)/share/lilypond/tex
125         cd $(builddir)/lib/lilypond && \
126                 ln -s  ../../python/$(outconfbase) python
127         cd $(builddir)/share/lilypond && \
128                 ln -s $(abs-srcdir)/ly ly && \
129                 ln -s ../../mf/$(outconfbase) dvips && \
130                 ln -s ../../mf/$(outconfbase) afm && \
131                 ln -s ../../mf/$(outconfbase) tfm && \
132                 ln -s $(abs-srcdir)/mf && \
133                 ln -s $(abs-srcdir)/ps && \
134                 ln -s ../../python/$(outconfbase) python && \
135                 ln -s $(abs-srcdir)/scm
136         cd $(builddir)/share/lilypond/tex && \
137                 ln -s $(abs-srcdir)/tex source && \
138                 ln -s ../../../mf/$(outconfbase) generate
139         cd $(builddir)/share/lilypond/fonts && \
140                 ln -s $(abs-srcdir)/mf source && \
141                 ln -s ../../../mf/$(outconfbase) afm && \
142                 ln -s ../../../mf/$(outconfbase) tfm && \
143                 ln -s ../../../mf/$(outconfbase) type1
144         $(foreach i,$(CATALOGS), \
145                 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
146                 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
147                 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
148         touch $@
149
150 local-clean: builddir-setup-clean
151 builddir-setup-clean:
152         cd $(builddir) && rm -rf share
153
154 $(config_h): configure.in aclocal.m4
155 #
156 # this is to prevent people from getting
157 # undefined symbols  when we add them to config.h.in,
158 # and they blindly run "cvs update; make".
159 #
160         @echo
161         @echo ' *** $(config_h) is out of date'
162         @echo ' *** Remove it and rerun autogen:'
163         @echo '         rm $(config_h); ./autogen.sh'
164         @echo
165         @false
166
167
168 # maybe move into private script?
169 rsync-web:
170         cd out-www &&  mkdir web && tar  -xzf web.tar.gz -C web
171         cd out-www/web &&  rsync --delete --stats --progress -rltvu -e ssh . x:/var/www/lilypond/doc/v1.9/
172         cd out-www && rm -rf web/