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