]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
* GNUmakefile.in (builddir-exec): Add symlink tex/out. Fixes
[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         vim 
19 #
20
21 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh
22 README_FILES = ChangeLog  COPYING DEDICATION ROADMAP THANKS 
23 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
24 IN_FILES := $(wildcard *.in)
25 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
26 EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
27   $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_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 install-WWW:
41         -$(INSTALL) -m 755 -d $(webdir) 
42         tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
43 # install-WWW does not recurse; fake it visiting Documentation/user manually
44         $(MAKE) -C Documentation/user local-install-WWW
45
46 web-install:
47         $(MAKE) out=www install-WWW
48
49 uninstall-WWW:
50         #TODO
51
52 web-uninstall:
53         $(MAKE) out=www uninstall-WWW=
54
55 local-install:
56         $(INSTALL) -d $(local_lilypond_datadir)
57
58 final-install:
59         @echo
60         @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
61         @echo " *** must be run. You're advised to source these scripts from your "
62         @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
63         @echo
64
65 web-ext = gz html midi pdf png txt ly
66
67 footify = MAILADDRESS=bug-lilypond@gnu.org  $(PYTHON) $(step-bindir)/add-html-footer.py  --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
68
69 local-WWW-post:
70         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
71         cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
72         cd $(builddir) && rm -f `find . -name \*.html~ -print`
73         cd $(builddir) && find Documentation input \
74                 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
75                 > $(outdir)/weblist
76         echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
77         echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
78         cd $(builddir) && ls *.html >> $(outdir)/weblist
79         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
80
81
82 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
83
84 web-clean:
85         $(MAKE) out=www clean
86         $(MAKE) $(builddir)/share/lilypond-force
87
88 default: $(config_h) builddir-setup 
89
90 builddir-setup: $(builddir)/share/lilypond-force
91
92 PO_FILES = $(wildcard $(srcdir)/po/*.po)
93 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
94 CATALOGS = $(HELP_CATALOGS:lilypond=) 
95
96 $(builddir)/share/lilypond-force:
97 # Preparing LilyPond tree for builddir exec
98         cd $(builddir) && rm -rf lib share
99         mkdir -p $(builddir)/lib/lilypond
100         mkdir -p $(builddir)/share/lilypond
101         mkdir -p $(builddir)/share/lilypond/elisp
102         mkdir -p $(builddir)/share/lilypond/fonts
103         mkdir -p $(builddir)/share/lilypond/tex
104         cd $(builddir)/lib/lilypond && \
105                 ln -s  ../../python/$(outconfbase) python
106         cd $(builddir)/share/lilypond && \
107                 ln -s $(abs-srcdir)/ly ly && \
108                 ln -s ../../mf/$(outconfbase) dvips && \
109                 ln -s ../../mf/$(outconfbase) afm && \
110                 ln -s ../../mf/$(outconfbase) tfm && \
111                 ln -s $(abs-srcdir)/mf && \
112                 ln -s $(abs-srcdir)/ps && \
113                 ln -s ../../python/$(outconfbase) python && \
114                 ln -s $(abs-srcdir)/scm
115         cd $(builddir)/share/lilypond/tex && \
116                 ln -s $(abs-srcdir)/tex source && \
117                 ln -s ../../../tex/$(outconfbase) tex-out && \
118                 ln -s ../../../mf/$(outconfbase) mf-out
119         cd $(builddir)/share/lilypond/fonts && \
120                 ln -s $(abs-srcdir)/mf source && \
121                 ln -s ../../../mf/$(outconfbase) afm && \
122                 ln -s ../../../mf/$(outconfbase) tfm && \
123                 ln -s ../../../mf/$(outconfbase) type1
124         cd $(builddir)/share/lilypond/elisp && \
125                 ln -sf ../../../elisp/$(outconfbase)/lilypond-words.el . && \
126                 ln -s $(abs-srcdir)/elisp/*.el .
127         $(foreach i,$(CATALOGS), \
128                 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
129                 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
130                 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
131         touch $@
132
133 local-clean: builddir-setup-clean
134 builddir-setup-clean:
135         cd $(builddir) && rm -rf share
136
137 $(config_h): config.hh.in 
138 #
139 # this is to prevent people from getting
140 # undefined symbols  when we add them to config.h.in,
141 # and they blindly run "cvs update; make".
142 #
143         @echo
144         @echo ' *** $(config_h) is out of date'
145         @echo ' *** Remove it and rerun autogen:'
146         @echo '         rm $(config_h); ./autogen.sh'
147         @echo
148         @false
149
150