(grob-cause): Bugfix.
[lilypond/patrick.git] / GNUmakefile.in
blobe5f9f0cdf57cee69535bf51e3e08c530462815fc
1 # -*-Makefile-*-
2 # title specific top level makefile for LilyPond
4 # subdir level:
6 depth = .
9 # descent order into subdirectories
11 SUBDIRS = buildscripts python scripts \
12 elisp \
13 flower kpath-guile ttftool lily \
14 mf ly tex ps scm \
15 po make \
16 cygwin debian stepmake \
17 Documentation input \
18 vim
21 #include VERSION
22 #package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
24 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh Doxyfile
25 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS HACKING
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
35 # bootstrap stepmake:
37 STEPMAKE_TEMPLATES=toplevel po install
38 include $(depth)/make/stepmake.make
40 doc:
41 $(MAKE) -C Documentation
43 install-WWW:
44 -$(INSTALL) -m 755 -d $(DESTDIR)$(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 $(MAKE) -C Documentation/user install-info
50 web-install:
51 $(MAKE) out=www install-WWW
53 uninstall-WWW:
54 #TODO
56 web-uninstall:
57 $(MAKE) out=www uninstall-WWW=
59 local-install:
60 $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
62 final-install:
63 @true
65 web-ext = html midi pdf png txt ly
67 footify = $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
68 footifymail = MAILADDRESS=bug-lilypond@gnu.org
70 local-WWW-post:
71 # need UTF8 setting in case this is hosted on a website.
72 echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(builddir)/.htaccess
73 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
74 cd $(builddir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify)
75 cd $(builddir) && find . -name \*.html~ -print | xargs rm -f
76 cd $(builddir) && find Documentation input \
77 $(web-ext:%=-path '*/out-www/*.%' -or) -type l \
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 -)
84 share-prefix = $(builddir)/share
85 tree-prefix = $(builddir)/share/lilypond/$(TOPLEVEL_VERSION)
87 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
89 web-clean:
90 $(MAKE) out=www clean
91 $(MAKE) $(tree-prefix)/lilypond-force
93 default: $(config_h) builddir-setup
95 builddir-setup: $(tree-prefix)/lilypond-force
97 PO_FILES = $(wildcard $(srcdir)/po/*.po)
98 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
99 CATALOGS = $(HELP_CATALOGS:lilypond=)
101 $(tree-prefix)/lilypond-force link-tree: GNUmakefile
102 # Preparing LilyPond tree for builddir exec
103 cd $(builddir) && rm -rf lib share
104 mkdir -p $(builddir)/lib/$(package)
105 mkdir -p $(tree-prefix)
106 mkdir -p $(tree-prefix)/dvips
107 mkdir -p $(tree-prefix)/elisp
108 mkdir -p $(tree-prefix)/fonts
109 mkdir -p $(tree-prefix)/fonts/otf
110 mkdir -p $(tree-prefix)/fonts/tfm
111 mkdir -p $(tree-prefix)/fonts/type1
112 mkdir -p $(tree-prefix)/fonts/svg
113 mkdir -p $(tree-prefix)/fonts/map
114 mkdir -p $(tree-prefix)/fonts/enc
115 mkdir -p $(tree-prefix)/tex
116 cd $(builddir)/lib && \
117 ln -s ../../../python/$(outconfbase) python
118 cd $(tree-prefix) && \
119 ln -s $(abs-srcdir)/ly ly && \
120 ln -s $(abs-srcdir)/ps && \
121 ln -s ../../../python/$(outconfbase) python && \
122 ln -s $(abs-srcdir)/scm && \
123 ln -s $(abs-srcdir)/scripts scripts
124 cd $(tree-prefix)/dvips && \
125 ln -s ./../../mf/$(outconfbase) mf-out && \
126 ln -s $(abs-srcdir)/ps
127 cd $(tree-prefix)/tex && \
128 ln -s $(abs-srcdir)/tex source && \
129 ln -s ../../../../tex/$(outconfbase) tex-out && \
130 ln -s ../../../../mf/$(outconfbase) mf-out
131 cd $(tree-prefix)/fonts/enc && \
132 ln -s ../../../../../mf/$(outconfbase)/*.enc .
133 cd $(tree-prefix)/fonts/map && \
134 ln -s ../../../../../mf/$(outconfbase)/*.map .
135 cd $(tree-prefix)/fonts/otf && \
136 ln -s ../../../../../mf/$(outconfbase)/*.otf .
137 cd $(tree-prefix)/fonts/svg && \
138 ln -s ../../../../../mf/$(outconfbase)/*.svg .
139 cd $(tree-prefix)/fonts/tfm && \
140 ln -s ../../../../../mf/$(outconfbase)/*.tfm .
141 cd $(tree-prefix)/fonts/type1 && \
142 ln -s ../../../../../mf/$(outconfbase)/*.pfa .
143 cd $(tree-prefix)/fonts && \
144 ln -s $(abs-srcdir)/mf source && \
145 true
146 cd $(tree-prefix)/elisp && \
147 ln -sf ../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
148 ln -s $(abs-srcdir)/elisp/*.el .
149 $(foreach i,$(CATALOGS), \
150 mkdir -p $(share-prefix)/locale/$i/LC_MESSAGES && \
151 cd $(share-prefix)/locale/$i/LC_MESSAGES && \
152 ln -sf ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
153 # touch $@
154 touch $(tree-prefix)/lilypond-force
156 local-clean: builddir-setup-clean
157 builddir-setup-clean:
158 cd $(builddir) && rm -rf share
160 $(config_h): config.hh.in
162 # this is to prevent people from getting
163 # undefined symbols when we add them to config.h.in,
164 # and they blindly run "cvs update; make".
166 @echo
167 @echo ' *** $(config_h) is out of date'
168 @echo ' *** Remove it and rerun autogen:'
169 @echo ' rm $(config_h); ./autogen.sh'
170 @echo
171 @false