* GNUmakefile.in (local-WWW-post): move mutopia-index to toplevel
[lilypond.git] / GNUmakefile.in
blob5238a31b15456457c460a472120baa3f4db4f7cf
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 flower lily \
13 mf ly tex ps scm \
14 po make \
15 cygwin debian $(builddir)/stepmake \
16 Documentation input
19 SCRIPTS = configure aclocal.m4 autogen.sh
20 README_FILES = ChangeLog COPYING DEDICATION README.mandrake 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) vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch server.el.patch darwin.patch .cvsignore lexer-gcc-3.1.sh lilypond.words
24 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
25 INSTALLATION_DIR=$(local_lilypond_datadir)
26 INSTALLATION_FILES=$(config_make) VERSION
28 # bootstrap stepmake:
30 STEPMAKE_TEMPLATES=toplevel po install
31 include $(depth)/make/stepmake.make
33 doc:
34 $(MAKE) -C Documentation
36 pfa-fonts:
37 $(MAKE) MAKE_PFA_FILES=1 -C mf
38 (cd $(builddir)/share/lilypond/fonts && \
39 tar czvf ../../../$(outbase)/type1.tar.gz type1/*.pfa type1/fonts.* type1/lilypond.* )
41 web-install:
42 -$(INSTALL) -m 755 -d $(webdir)
43 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
45 local-install:
46 $(INSTALL) -d $(local_lilypond_datadir)
48 final-install:
49 @echo
50 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
51 @echo " *** must be run. You're advised to source these scripts from your "
52 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
53 @echo
55 web-ext = gz html midi pdf png txt ly
57 footify=$(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
59 local-WWW-post:
60 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
61 $(footify) `$(FIND) $(builddir) -name '*.html' -print`
62 cd $(builddir) && rm -f `find . -name \*.html~ -print`
63 cd $(builddir) && find Documentation input \
64 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
65 > $(outdir)/weblist
66 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
67 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
68 cd $(builddir) && ls *.html >> $(outdir)/weblist
69 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
72 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
74 ALL-TAGS:
75 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
77 web-clean:
78 $(SHELL) $(buildscript-dir)/clean-fonts.sh
79 $(MAKE) out=www clean
83 default: $(config_h) builddir-setup
85 builddir-setup: $(builddir)/share/lilypond-force
87 PO_FILES = $(wildcard $(srcdir)/po/*.po)
88 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
89 CATALOGS = $(HELP_CATALOGS:lilypond=)
91 $(builddir)/share/lilypond-force:
92 # Preparing LilyPond tree for builddir exec
93 cd $(builddir) && rm -rf lib share
94 mkdir -p $(builddir)/lib/lilypond
95 mkdir -p $(builddir)/share/lilypond
96 mkdir -p $(builddir)/share/lilypond/fonts
97 mkdir -p $(builddir)/share/lilypond/tex
98 cd $(builddir)/lib/lilypond && \
99 ln -s ../../python/$(outconfbase) python
100 cd $(builddir)/share/lilypond && \
101 ln -s $(abs-srcdir)/ly ly && \
102 ln -s ../../mf/$(outconfbase) dvips && \
103 ln -s ../../mf/$(outconfbase) afm && \
104 ln -s ../../mf/$(outconfbase) tfm && \
105 ln -s $(abs-srcdir)/mf && \
106 ln -s $(abs-srcdir)/ps && \
107 ln -s ../../python/$(outconfbase) python && \
108 ln -s $(abs-srcdir)/scm
109 cd $(builddir)/share/lilypond/tex && \
110 ln -s $(abs-srcdir)/tex source && \
111 ln -s ../../../mf/$(outconfbase) generate
112 cd $(builddir)/share/lilypond/fonts && \
113 ln -s $(abs-srcdir)/mf source && \
114 ln -s ../../../mf/$(outconfbase) afm && \
115 ln -s ../../../mf/$(outconfbase) tfm && \
116 ln -s ../../../mf/$(outconfbase) type1
117 $(foreach i,$(CATALOGS), \
118 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
119 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
120 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
121 touch $@
123 local-clean: builddir-setup-clean
124 builddir-setup-clean:
125 cd $(builddir) && rm -rf share
127 $(config_h): configure.in aclocal.m4
129 # this is to prevent people from getting
130 # undefined symbols when we add them to config.h.in,
131 # and they blindly run "cvs update; make".
133 @echo
134 @echo ' *** $(config_h) is out of date'
135 @echo ' *** Remove it and rerun autogen:'
136 @echo ' rm $(config_h); ./autogen.sh'
137 @echo
138 @false
141 # maybe move into private script?
142 rsync-web:
143 cd out-www && mkdir web && tar -xzf web.tar.gz -C web
144 cd out-www/web && rsync --delete --stats --progress -lavu -e ssh . x:/var/www/lilypond/doc/v1.8/
145 cd out-www && rm -rf web/