]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/Targets.make
release: 1.0.1
[lilypond.git] / stepmake / stepmake / Targets.make
1 # title    generic make targets
2 # file     make/Targets.make
3
4 .PHONY : all clean config default dist doc doc++  exe help html lib TAGS\
5          po
6
7 # target all:
8 #
9 all:     default
10         $(LOOP)
11
12
13 # be careful about deletion.
14 clean: localclean
15         -rm -f $(outdir)/*
16         $(LOOP)
17
18 distclean: clean 
19         $(LOOP)
20         $(MAKE) local-distclean
21
22 maintainerclean: 
23         $(LOOP)
24         $(MAKE) local-maintainerclean
25         $(MAKE) local-distclean
26
27 new-po:
28         if test -r $(po-dir); then \
29           rm -f $(po-dir)/$(outdir)/$(package).po; \
30           touch $(po-dir)/$(outdir)/$(package).po; \
31         fi
32
33 ifeq ($(strip $(depth)),.)
34 po: new-po
35         $(LOOP)
36 localpo:
37         @true
38 else
39 po: localpo
40         $(LOOP)
41 ALL_PO_SOURCES = $(ALL_C_SOURCES) $(wildcard $(outdir)/*.hh) $(wildcard $(outdir)/*.cc)
42 localpo:
43 ifneq ($(strip $(ALL_PO_SOURCES)),)
44         @echo $(ALL_PO_SOURCES)
45         xgettext --c++ --default-domain=$(package) --join \
46          --output-dir=$(po-dir)/$(outdir) --add-comments \
47          --keyword=_ --keyword=_f $(ALL_PO_SOURCES)
48 endif
49 endif
50
51 po-update: po
52         $(MAKE) -C $(po-dir) po-update
53
54 show-po-changes:
55         $(MAKE) -C $(po-dir) show-po-changes
56
57 # configure:
58 #
59 config:
60         ./$(depth)/configure
61 #
62
63
64 # target help:
65 #
66 generic-help:
67         @echo -e "\
68 Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)\n\
69 Usage: $(MAKE) ["VARIABLE=value"]... [TARGET]\n\
70 \n\
71 Targets:\n"
72
73 help: generic-help local-help
74         @echo -e "\
75   all         update everything\n\
76   clean       remove all genated stuff in $(oudir)\n\
77   config      rerun configure\n\
78   deb         build Debian package\n\
79   default     same as the empty target\n\
80   diff        generate patch: $(package)-$(TOPLEVEL_VERSION).diff.gz\n\
81   .           Options:\n\
82   .             from=0.1.74\n\
83   .             help==\n\
84   .             release==\n\
85   .             to=0.1.74.jcn2\n\
86   distclean   cleaner than clean (duh)\n\
87   doc         update all documentation\n\
88   doc++       make doc++ documentation\n\
89   exe         update all executables\n\
90   help        this help\n\
91   install     install programs and data (prefix=$(prefix))\n\
92   lib         update all libraries\n\
93   release     roll tarball and generate patch\n\
94   rpm         build RedHat package\n\
95   tar         same as dist\n\
96   TAGS        genarate tagfiles\n\
97   zip         build binary doze distribution\n\
98 \n\
99 Make may be invoked from any subdirectory\n\
100 Note that all commands recurse into SUBSDIRS\n\
101 "\
102 #
103
104 local-help:
105
106 doc:
107 #       $(MAKE) -C $(depth)/Documentation do-doc
108         $(MAKE) -C $(depth)/Documentation all
109
110
111 # Ugh.  C++ specific.
112 doc++:
113         (cd $(outdir); sh ../$(step-bindir)/tar-docxx.sh $(package)-$(TOPLEVEL_VERSION).tar.gz)
114
115
116
117 check-state-vector:
118         if [ "`tail -1 $(state-vector)`" != "$(TOPLEVEL_VERSION)" ]; then\
119           echo $(TOPLEVEL_VERSION) >> $(state-vector); \
120         fi
121
122
123 localdist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
124         $(LN) $(DIST_FILES) $(distdir)/$(localdir)
125
126 #UGH UGH . make ifdef doesn't mix with string substitution semantics (late expansion vs. early expansion)
127
128         if [ "$(NON_ESSENTIAL_DIST_FILES)x" != "x" ] ; then \
129                 $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir); \
130         fi
131         if [ "$(OUT_DIST_FILES)x" != "x" ] ; then \
132                 mkdir $(distdir)/$(localdir)/out; \
133                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/out; \
134         fi
135         $(foreach i, $(SUBDIRS), mkdir $(distdir)/$(localdir)/$(i); \
136             $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) localdist &&) true
137
138
139
140 html: $(HTML_FILES)
141
142 TAGS:
143         -if [ "$(TAGS_FILES)" != "" ]; then \
144                 etags -CT $(TAGS_FILES) || \
145                 ctags -h ".h.hh.tcc.icc" $(TAGS_FILES) $(ERROR_LOG); \
146         fi
147
148         $(LOOP)
149
150 $(outdir)/version.hh: VERSION
151         sh ./$(step-bindir)/make-version.sh > $@
152
153
154 # should this be in Rules?
155 configure: configure.in aclocal.m4
156         autoconf - < $<> $@
157         chmod +x configure
158
159 localclean:
160
161 local-distclean:
162
163 local-maintainerclean:
164
165 install-strip:
166         $(MAKE) INSTALL="$(INSTALL) -s" install
167
168 install: localinstall
169         $(LOOP)
170
171 localinstall:
172
173 uninstall: localuninstall
174         $(LOOP)
175
176 localuninstall:
177
178 installextradoc:
179         $(INSTALL) -d $(prefix)/doc/$(package)
180         $(foreach i, $(EXTRA_DOC_FILES),\
181                 cp -r $(i) $(prefix)/doc/$(package) &&) true
182
183 WWW: local-WWW
184         $(LOOP)
185
186 include $(stepdir)/Package.make
187 include $(make-dir)/Targets.make
188
189 include $(outdir)/dummy.dep $(DEP_FILES)
190
191 $(outdir)/dummy.dep:
192         -mkdir $(outdir)
193         touch $(outdir)/dummy.dep
194