lilypond-0.1.17
[lilypond.git] / make / Targets.make
blobd84b62e30432f8b31915b137c62d0d68ab57e766
2 # project LilyPond -- the musical typesetter
3 # title generic make targets
4 # file make/Targets.make
6 # Copyright (c) 1997 by
7 # Jan Nieuwenhuizen <jan@digicash.com>
8 # Han-Wen Nienhuys <hanwen@stack.nl>
10 .PHONY : all clean config default dist doc doc++ dummy exe help lib TAGS html\
11 check-flower-deps check-lib-deps check-doc-deps
13 # target all:
15 all: default
16 ifdef SUBDIRS
17 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
18 endif
22 # platform specific variables,
24 include ./$(depth)/make/out/Site.make
27 # where to do this ?
28 .PRECIOUS: $(makeout)/Site.make
30 # dependency list of executable:
33 $(EXECUTABLE): $(build) $(OFILES) $(outdir)/version.hh
34 $(MAKE) $(MODULE_LIBDEPS)
35 $(INCREASE_BUILD)
36 $(MAKE) -S $(OFILES) $(SILENT_LOG)
37 ifdef STABLEOBS
38 $(DO_STRIP) $(STABLEOBS)
39 endif
40 $(LD_COMMAND) $(OFILES) $(LOADLIBES)
42 exe: $(EXECUTABLE)
44 $(build): $(depth)/VERSION
45 echo 0 > $@
47 # dependency list of library:
49 LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME).a
50 $(LIBRARY): $(build) $(OFILES)
51 $(INCREASE_BUILD)
52 $(MAKE) $(OFILES) $(SILENT_LOG)
53 $(AR_COMMAND) $(OFILES)
54 $(RANLIB_COMMAND)
56 SHAREDLIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so
57 $(SHAREDLIBRARY): $(build) $(OFILES) $(MODULE_LIBDEPS)
58 $(INCREASE_BUILD)
59 $(MAKE) $(OFILES) $(SILENT_LOG)
60 $(LD_COMMAND) $(OFILES) -o $@
61 # ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $(outdir)/$(LIB_PREFIX)$(NAME).so
63 lib: $(LIBRARY)
66 # be careful about deletion.
67 clean: localclean
68 rm -f core
69 ifdef EXECUTABLE
70 rm -f $(EXECUTABLE)
71 endif
72 ifdef OFILES
73 rm -f $(OFILES)
74 endif
75 ifdef DEPFILES
76 rm -f $(DEPFILES)
77 endif
78 ifdef SUBDIRS
79 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
80 endif
82 # configure:
84 config:
85 ./$(depth)/configure
88 # dummydeps:
90 dummydep: $(DUMMYDEPS)
93 # value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-)
95 win32: windows32 # win/lose?
97 windows32:
98 $(MAKE) -C . "CXX=g++ -D_WINDOWS32"
101 # xcompile to doze:
103 doze: dos
104 dos:
105 $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0"
108 # target help:
110 help:
111 @echo "Usage:"
112 @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
113 @echo
114 @echo "targets:"
115 @echo " all clean config dist distclean doc doc++"
116 @echo " exe help lib moduledist TAGS"
117 @echo " dos: xcomplile to dos"
118 @echo " windows32: native cygnus-gnu compile"
121 doc:
122 $(MAKE) -C $(depth)/Documentation do-doc
124 # doc++ documentation of classes
125 doc++: $(progdocs)
126 $(docxx) $(docxx-opts) -d $(DOCDIR) $^
128 # ugh. should generate in out/
129 dist:
130 -mkdir $(distdir)
131 $(MAKE) localdist
132 chmod -Rf a+rX $(distdir)
134 (cd ./$(depth); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
136 # should be trapped
137 rm -rf $(distdir)/
139 # ugh. should generate in out/
140 dozedist: doosdist
141 doosdist:
142 -mkdir $(distdir)
143 # nogo, SUBDIRS is handed down to subdir...
144 # $(MAKE) SUBDIRS="Documentation init input tex" localdist
145 $(MAKE) localdist
146 chmod -Rf a+rX $(distdir)
147 # ugh, the ugly way, then
148 (cd $(distdir); rm -rf $(NO_DOOS_DIST))
149 cp $(lilyout)/lilypond.exe $(distdir)
150 strip -s $(distdir)/lilypond.exe
151 cp $(mi2muout)/mi2mu.exe $(distdir)
152 strip -s $(distdir)/mi2mu.exe
153 (cd ./$(depth); $(ZIP) $(DIST_NAME).exe.zip $(distdir))
154 # should be trapped
155 rm -rf $(distdir)/
158 localdist: $(DISTFILES)
159 if [ -d out ]; then mkdir $(distdir)/$(localdir)/out; fi
160 $(LN) $(DISTFILES) $(distdir)/$(localdir)
161 ifdef SUBDIRS
162 set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
163 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
164 endif
166 moduledist:
167 -mkdir $(module-distdir)
168 $(MAKE) localmoduledist
169 (cd ./$(depth); $(TAR) cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
170 rm -rf $(module-distdir)/
172 localmoduledist:
173 $(LN) $(DISTFILES) $(module-distdir)/$(localdir)
174 ifdef SUBDIRS
175 set -e; for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
176 set -e; for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
177 endif
179 TAGS:$(all-tag-sources)
180 ifdef all-tag-sources
181 -etags -CT $(all-tag-sources) $(ERROR_LOG)
182 -ctags -CT $(all-tag-sources) $(ERROR_LOG)
183 endif
184 ifdef SUBDIRS
185 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
186 endif
189 # version stuff:
192 $(outdir)/version.hh: VERSION
193 ./$(lily_bindir)/make-version > $@
196 # should this be in Rules?
197 configure: configure.in aclocal.m4
198 autoconf - < $<> $@
199 chmod +x configure
201 localclean:
203 install-strip:
204 $(MAKE) INSTALL="$(INSTALL) -s" install
206 install: localinstall
207 ifdef SUBDIRS
208 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
209 endif
211 localinstall:
213 uninstall: localuninstall
214 ifdef SUBDIRS
215 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
216 endif
218 localuninstall:
220 # specific stuff:
222 $(LIBFLOWER): check-flower-deps
224 check-flower-deps:
225 $(MAKE) -C $(depth)/flower/ default
227 check-lib-deps: check-flower-deps
228 $(MAKE) -C $(depth)/lib
230 check-doc-deps:
231 $(MAKE) -C $(depth)/Documentation
233 $(LIBLILY): dummy
234 $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
237 # RedHat rpm package:
239 rpm: check-rpm-doc-deps
240 -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
241 -cp $< $(rpm-sources)
242 $(MAKE) -C $(make-dir) spec
243 rpm -ba $(makeout)/lilypond.spec
245 check-rpm-doc-deps:
246 $(MAKE) -C $(depth)/Documentation/ xpms
249 installexe:
250 $(INSTALL) -d $(bindir)
251 $(INSTALL) -m 755 $(EXECUTABLES) $(bindir)
253 uninstallexe:
254 for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $$a`; done
256 ifneq ($(DEPFILES),)
257 include $(DEPFILES)
258 endif