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