]> git.donarmstrong.com Git - lilypond.git/blob - make/Targets.make
release: 0.0.44
[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
11
12 # target all:
13 #
14 all:     default
15 ifdef SUBDIRS
16         set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
17 endif
18
19 #
20
21 # platform specific variables,
22 #
23 include ./$(depth)/make/out/Site.make
24 #
25
26 # where to do this ?
27 .PRECIOUS:  $(makeout)/Site.make
28
29 # dependency list of executable:
30 #
31 EXECUTABLE = $(lily_bindir)/$(NAME)
32 $(EXECUTABLE): $(build) $(OFILES) $(CUSTOMLIBES) 
33         $(INCREASE_BUILD)
34         $(MAKE) -S $(OFILES)  $(SILENT_LOG)
35 #       $(STRIPDEBUG) $(STABLEOBS)
36         $(LD_COMMAND) $(OFILES) $(LOADLIBES)
37
38 exe: $(EXECUTABLE)
39 #
40
41 $(build): $(depth)/.version
42         echo 0 > $@
43
44 # dependency list of library:
45 #
46 LIBRARY = $(libdir)/$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
47 $(LIBRARY): $(build) $(OFILES) $(CUSTOMLIBES)
48         $(INCREASE_BUILD)
49         $(MAKE) $(OFILES)  $(SILENT_LOG)
50         $(AR_COMMAND) $(OFILES)
51         $(RANLIB_COMMAND)
52
53
54 #
55 lib: $(LIBRARY)
56 #
57
58 clean: localclean
59         rm -f $(allobs) $(alldeps)
60 ifdef SUBDIRS
61         set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
62 endif
63
64 distclean: clean
65         rm -rf  $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen)
66
67
68 # configure:
69 #
70 config:
71         ./$(depth)/configure
72 #
73
74 # dummydeps:
75 #
76 dummydep: $(DUMMYDEPS)
77 #
78
79 # value of $(OSTYPE) on windhoos; "make $OSTYPE" if you use bash :-)
80 #
81 win32: 
82         $(MAKE) -C . CXX=g++ 
83 #
84
85 # xcompile to doze:
86 #
87 doze:   dos
88 dos: 
89         $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WIN32 -Dcaddr_t=char* -DMAP_SHARED=0"
90 #
91
92 # target help:
93 #
94 help:
95         @echo "Usage:"
96         @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
97         @echo
98         @echo "targets:"
99         @echo " all clean config dist distclean doc doc++"
100         @echo " exe help lib moduledist TAGS"
101         @echo " dos:    xcomplile to dos"
102         @echo " win32:  native cygnus-win32 compile" 
103 #
104
105 doc:
106         $(MAKE) -C $(depth)/Documentation do-doc
107
108 # doc++ documentation of classes
109 doc++: $(progdocs)      
110         doc++ -kp -d $(DOCDIR) $^
111
112 dist:
113         -mkdir $(distdir)
114         $(MAKE) localdist
115         chmod -Rf a+rX $(distdir)
116
117         (cd ./$(depth); tar cfz $(DIST_NAME).tar.gz $(DIST_NAME))
118         rm -rf $(distdir)/  # should be trapped
119
120 localdist: $(DISTFILES)
121         if [ -d out ]; then mkdir $(distdir)/$(localdir)/out; fi
122         ln $(DISTFILES) $(distdir)/$(localdir)
123 ifdef SUBDIRS
124         set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
125                 $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
126 endif
127
128 moduledist:
129         -mkdir $(module-distdir)
130         $(MAKE) localmoduledist
131         (cd ./$(depth); tar cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
132         rm -rf $(module-distdir)/  # should be trapped
133
134 localmoduledist:
135         ln $(DISTFILES) $(module-distdir)/$(localdir)
136 ifdef SUBDIRS
137         set -e; for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
138         set -e; for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
139 endif
140
141 TAGS:$(all-tag-sources)
142 ifdef all-tag-sources
143         -etags -CT $(all-tag-sources) /dev/null
144 endif
145 ifdef SUBDIRS
146         set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
147 endif
148
149
150 # version stuff:
151 #
152
153 $(outdir)/version.hh: .version
154         ./$(lily_bindir)/make_version > $@
155
156
157 # should this be in Rules?
158 configure: configure.in
159         autoconf - < $<> $@
160         chmod +x configure
161
162 localclean:
163
164
165 install: localinstall
166 ifdef SUBDIRS
167         set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
168 endif
169
170 localinstall:
171
172 uninstall: localuninstall
173 ifdef SUBDIRS
174         set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
175 endif
176
177 localuninstall:
178
179 # specific stuff:
180 #
181 $(LIBFLOWER): check-flower-deps
182
183 check-flower-deps:
184         $(MAKE)  -C $(depth)/flower/ $(outdir)/$(notdir $(LIBFLOWER))
185
186 check-lily-deps: check-flower-deps
187         $(MAKE)  -C $(depth)/lib
188
189 check-doc-deps:
190         $(MAKE) -C $(depth)/Documentation
191
192 $(LIBLILY): dummy
193         $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
194 #
195