]> git.donarmstrong.com Git - lilypond.git/blob - make/Targets.make
release: 0.0.40
[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         for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
16 #
17
18 # platform specific variables,
19 #
20 include ./$(depth)/make/out/Site.make
21 #
22
23 # where to do this ?
24 .PRECIOUS:  $(makeout)/Site.make
25
26 # ... and configure bootstrap :-)
27 #
28 $(makeout)/Site.make: $(make-dir)/$(genout) $(flower-config) $(lily-config)
29 # this is handy, but runs on second "make distclean" too. ah well...
30 #       if [ \! -d $(makeout) ]; then mkdir $(makeout); fi
31         touch $@
32         @echo "oeps, sources were not configured!"
33         (cd $(depth); ./configure)
34 #
35
36 # dependency list of executable:
37 #
38 EXECUTABLE = $(bindir)/$(NAME)
39 $(EXECUTABLE): $(OFILES) $(CUSTOMLIBES)
40 #       $(STRIPDEBUG) $(STABLEOBS)
41 #       $(LD_COMMAND) -o $@ $^ $(LOADLIBES)
42         $(LD_COMMAND) $(OFILES) $(LOADLIBES)
43         -@touch $(VERSION_DEPENDENCY) $(ERROR_LOG)
44         $(INCREASE_BUILD)
45         touch $(build) #waai necessary?
46 #
47 exe: $(EXECUTABLE)
48 #
49
50 # dependency list of library:
51 #
52 LIBRARY = $(libdir)/$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
53 $(LIBRARY): $(OFILES) $(CUSTOMLIBES)
54         $(AR_COMMAND) $(OFILES)
55         -@touch $(VERSION_DEPENDENCY) $(ERROR_LOG)
56         $(INCREASE_BUILD)
57         touch $(build) #waai necessary?
58 #
59 lib: $(LIBRARY)
60 #
61
62 clean:
63         rm -f $(allexe) core $(allobs) $(alldeps)
64         for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
65
66 distclean: clean
67         rm -rf  $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen)
68
69
70 # configure:
71 #
72 config:
73         ./$(depth)/configure
74 #
75
76 # dummydeps:
77 #
78 dummydep: $(flower-dir)/$(genout) $(lib-dir)/$(genout) $(lily-dir)/$(genout) $(mi2mu-dir)/$(genout) $(DUMMYDEPS)
79 #
80
81 # value of $(OSTYPE) on windhoos; "make $OSTYPE" if you use bash :-)
82 #
83 win32: 
84         $(MAKE) -C . CXX=g++ 
85 #
86
87 # xcompile to doze:
88 #
89 doze:   dos
90 dos: 
91         $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WIN32 -Dcaddr_t=char* -DMAP_SHARED=0"
92 #
93
94 # target help:
95 #
96 help:
97         @echo "Usage:"
98         @echo " $(MAKE) ["VARIABLE=value" ...] [target]"
99         @echo
100         @echo "targets:"
101         @echo " all clean config dist distclean doc doc++"
102         @echo " exe help lib moduledist TAGS"
103         @echo " dos:    xcomplile to dos"
104         @echo " win32:  native cygnus-win32 compile" 
105 #
106
107 doc:
108         $(MAKE) -C Documentation do-doc
109
110 # doc++ documentation of classes
111 doc++: $(progdocs)      
112         doc++ -kp -d $(DOCDIR) $^
113
114 dist:
115         -mkdir $(distdir)
116         $(MAKE) localdist
117         (cd ./$(depth); tar cfz $(DIST_NAME).tar.gz $(DIST_NAME))
118         rm -rf $(distdir)/  # should be trapped
119
120 localdist:
121         ln $(DISTFILES) $(distdir)/$(localdir)
122         for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; done
123         for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
124
125 moduledist:
126         -mkdir $(module-distdir)
127         $(MAKE) localmoduledist
128         (cd ./$(depth); tar cfz $(MODULE_DIST_NAME).tar.gz $(MODULE_DIST_NAME))
129         rm -rf $(module-distdir)/  # should be trapped
130
131 localmoduledist:
132         ln $(DISTFILES) $(module-distdir)/$(localdir)
133         for i in $(SUBDIRS); do mkdir $(module-distdir)/$(localdir)/$$i; done
134         for i in $(SUBDIRS); do $(MAKE) localdir=$(localdir)/$$i -C $$i localmoduledist; done
135
136 all-tags: TAGS
137         for i in $(SUBDIRS); do $(MAKE) -C $$i all-tags; done
138
139 TAGS: $(allcc)
140         etags -CT $(allcc) 
141
142 # to some outdir?
143 autoconf:
144         autoconf -  < configure.in > ac_configure  
145
146
147 # version stuff:
148 #
149 check-flower-version:
150         $(MAKE) flower-version -C ./$(depth)/flower
151 $(lily-version): $(lily-dir)/$(genout) ./$(depth)/.version ./$(bindir)/make_version $(build)
152         ./$(bindir)/make_version "$(MAJOR_VERSION)" "$(MINOR_VERSION)" "$(PATCH_LEVEL)" "$(MY_PATCH_LEVEL)" "$(BUILD)" "$(CXX) $(CXXVER)" > $@
153 check-mi2mu-version:
154         $(MAKE) mi2mu-version -C ./$(depth)/mi2mu
155 #
156