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