]> git.donarmstrong.com Git - lilypond.git/blob - make/Targets.make
release: 0.1.58
[lilypond.git] / make / Targets.make
1 #
2 # project  LilyPond -- the musical typesetter
3 # title    generic make targets
4 # file     make/Targets.make
5 #
6 # Copyright (c) 1997 by    
7 #       Jan Nieuwenhuizen <jan@digicash.com>
8 #       Han-Wen Nienhuys <hanwen@stack.nl>
9
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
12
13 # target all:
14 #
15 all:     default
16         $(LOOP)
17 # dependency list of executable:
18 #
19
20 $(EXECUTABLE):  $(OFILES) $(outdir)/version.hh
21         $(MAKE) $(MODULE_LIBDEPS) 
22 ifdef STABLEOBS
23         $(DO_STRIP) $(STABLEOBS)
24 endif
25         $(LD_COMMAND) $(OFILES) $(LOADLIBES)
26
27 exe: $(EXECUTABLE)
28
29
30 # dependency list of library:
31 #
32 $(LIBRARY):  $(OFILES)
33         $(AR_COMMAND) $(OFILES)
34         $(RANLIB_COMMAND)
35
36 $(SHAREDLIBRARY):   $(OFILES) $(MODULE_LIBDEPS)
37         $(LD_COMMAND) $(OFILES) -o $@.$(VERSION)
38         rm -f $@
39         ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
40         ln -sf $(LIB_PREFIX)$(NAME).so.$(VERSION) $@
41
42 #
43 lib: $(LIBRARY)
44 #
45
46
47 make-all-outdirs: make-outdir
48         $(LOOP)
49
50 make-outdir:
51         -mkdir $(OUTDIR_NAME)
52
53 # be careful about deletion.
54 clean: localclean
55         -rm -f $(outdir)/*
56         touch $(outdir)/dummy.dep
57         $(LOOP)
58
59 distclean: clean 
60         $(LOOP)
61         $(MAKE) local-distclean
62
63 maintainerclean: 
64         $(LOOP)
65         $(MAKE) local-maintainerclean
66         $(MAKE) local-distclean
67
68
69
70 # configure:
71 #
72 config:
73         ./$(depth)/configure
74 #
75
76 # dummydeps:
77 #
78 dummydep: $(DUMMYDEPS)
79 #
80
81 # value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-)
82 #
83 win32:  windows32 # win/lose?
84 #
85 windows32:
86         $(MAKE) -C . "CXX=g++ -D_WINDOWS32"
87 #
88
89 # xcompile to doze:
90 #
91 doze:   dos
92 dos: 
93         $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0"
94 #
95
96 # target help:
97 #
98 help:
99         @echo "Makefile for LilyPond $(TOPLEVEL_VERSION)"
100         @echo "Usage:"
101         @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
102         @echo
103         @echo "targets:"
104         @echo " all clean config dist distclean doc doc++"
105         @echo " exe help lib TAGS"
106         @echo " dos:    xcomplile to dos"
107         @echo " windows32: native cygnus-gnu compile" 
108 #
109
110 doc:
111         $(MAKE) -C $(depth)/Documentation do-doc
112
113
114 # ugh. should generate in out/
115 dist:
116         rm -rf $(distdir)
117         -mkdir $(distdir)
118         $(MAKE) localdist
119         chmod -R a+r $(distdir)
120         chmod  a+x `find $(distdir) -type d -print`
121
122         (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
123
124 # should be trapped
125         rm -rf $(distdir)/
126
127 # ugh. should generate in out/
128 dozedist: doosdist
129 doosdist:
130         -mkdir $(distdir)
131 #       nogo, SUBDIRS is handed down to subdir...
132 #       $(MAKE) SUBDIRS="Documentation init input tex" localdist
133         $(MAKE) localdist
134         chmod -Rf a+rX $(distdir)
135 #       ugh, the ugly way, then
136         (cd $(distdir); rm -rf $(NO_DOOS_DIST))
137         cp $(lilyout)/lilypond.exe $(distdir)
138         strip -s $(distdir)/lilypond.exe
139         cp $(mi2muout)/mi2mu.exe $(distdir)
140         strip -s $(distdir)/mi2mu.exe
141         (cd ./$(depth); $(ZIP) $(DIST_NAME).exe.zip $(distdir))
142 # should be trapped
143         rm -rf $(distdir)/
144
145
146 localdist: $(DISTFILES) $(OUT_DISTFILES)
147         touch $(outdir)/dummy.dep; \
148         mkdir $(distdir)/$(localdir)/out; \
149         $(LN) $(DISTFILES) $(distdir)/$(localdir)
150         $(LN) $(outdir)/dummy.dep $(OUT_DISTFILES) $(distdir)/$(localdir)/out
151 ifdef SUBDIRS
152         set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
153                 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
154 endif
155
156
157 TAGS:$(all-tag-sources)
158 ifdef all-tag-sources
159         -etags -CT $(all-tag-sources) $(ERROR_LOG)
160         -ctags -CT $(all-tag-sources) $(ERROR_LOG)
161 endif
162         $(LOOP)
163
164
165 # version stuff:
166 #
167
168 $(outdir)/version.hh: VERSION
169         sh ./$(lily_bindir)/make-version.sh > $@
170
171
172 # should this be in Rules?
173 configure: configure.in aclocal.m4
174         autoconf - < $<> $@
175         chmod +x configure
176
177 localclean:
178
179 local-distclean:
180
181 local-maintainerclean:
182
183 install-strip:
184         $(MAKE) INSTALL="$(INSTALL) -s" install
185
186 install: localinstall
187         $(LOOP)
188
189 localinstall:
190
191 uninstall: localuninstall
192         $(LOOP)
193
194 localuninstall:
195
196 # specific stuff:
197 #
198 $(LIBFLOWER): check-flower-deps
199
200 check-flower-deps:
201         $(MAKE)  -C $(depth)/flower/ default
202
203 check-lib-deps: check-flower-deps
204         $(MAKE)  -C $(depth)/lib
205
206 check-doc-deps:
207         $(MAKE) -C $(depth)/Documentation
208
209 $(LIBLILY): dummy
210         $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
211
212
213 # RedHat rpm package:
214 #
215 rpm: check-rpm-doc-deps
216         -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
217 #       -cp $(wildcard $(depth)/Documentation/*.xpm) $(rpm-sources)
218         -cp $(wildcard $(depth)/Documentation/$(outdir)/*.gif) $(rpm-sources)
219         $(MAKE) -C $(make-dir) spec
220         rpm -ba $(makeout)/lilypond.spec
221
222 check-rpm-doc-deps: 
223         $(MAKE) -C $(depth)/Documentation gifs
224
225 check-mf-deps:
226         $(MAKE) -C $(depth)/mf
227
228
229
230
231 ifneq ($(DEPFILES),)
232 include $(DEPFILES)
233 endif