]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
Make distributed tarball from Git file list
[lilypond.git] / stepmake / stepmake / generic-targets.make
1 .PHONY : all clean bin-clean config default dist exe help html lib TAGS\
2          po doc doc-stage-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2\
3          log-clean
4
5 all:     default
6         $(LOOP)
7
8 bin:
9         $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C lily
10
11 man:
12         $(LOOP)
13
14 clean: local-clean
15         -rm -rf $(outdir)
16         $(LOOP)
17
18 log-clean:
19         find . -name "*.log" -delete
20
21 ifeq (,$(findstring metafont,$(STEPMAKE_TEMPLATES)))
22 bin-clean: local-bin-clean
23         -rm -rf $(outdir)
24         $(LOOP)
25 else
26 bin-clean:
27 endif
28
29 local-bin-clean: local-clean
30
31 ifneq ($(strip $(depth)),.)
32 dist:
33         $(MAKE) -C $(depth) dist
34 endif
35
36 distclean: clean
37         $(MAKE) local-distclean
38
39 cvs-clean:
40         $(MAKE) local-distclean
41         rm -rf out
42         rm -rf out-www
43         rm -f aclocal.m4 configure
44
45 maintainerclean:
46         $(LOOP)
47         $(MAKE) local-maintainerclean
48         $(MAKE) local-distclean
49
50
51 # This doesn't allow command-line options, is it really useful? -jm
52 config:
53         ./$(src-depth)/configure
54
55
56 generic-help:
57         @echo "Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)"
58         @echo "Usage: make ["VARIABLE=value"]... [TARGET]"
59         @echo
60         @echo "Targets specific to current directory:"
61
62 help: generic-help local-help
63         @echo "Generic targets that recurse into subdirectories*:"
64         @echo "  all          update everything except documentation with images"
65         @echo "  clean        remove all generated stuff in $(outdir)"
66         @echo "  bin-clean    same as clean, except that mf/out is preserved"
67         @echo "  doc          update documentation with images in directory \`out-www'"
68         @echo "  doc-stage-1  update only PDF and Info documentation in directory \`out-www'"
69         @echo "  doc-clean    clean \`out-www' directory"
70         @echo "  install      install programs and data (prefix=$(prefix))"
71         @echo "  uninstall    uninstall programs and data"
72         @echo
73         @echo "  *Note: Prepend \`local-' (eg. \`local-clean') to restrict"
74         @echo "         any of the above commands to the current directory."
75         @echo
76         @echo "Other generic targets:"
77         @echo "  default      same as the empty target"
78         @echo "  bin          check the lily directory and rebuild lilypond.exe if needed"
79         @echo "  exe          update all executables"
80         @echo "  help         this help"
81         @echo "  lib          update all libraries"
82         @echo "  TAGS         generate tagfiles"
83         @echo
84         @echo "\`make' may be invoked from any subdirectory that contains a GNUmakefile."
85
86 local-help:
87
88 local-dist: $(OUT_DIST_FILES)
89         case "$(OUT_DIST_FILES)x" in x) ;; \
90              *) mkdir -p $(distdir)/$(localdir)/$(outdir) && \
91                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
92         esac
93         $(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
94
95
96
97 html: $(HTML_FILES)
98
99 TAGS:
100         $(LOOP)
101         $(MAKE) local-tags
102
103 DEEPER_TAGS_FILES = $(shell find $(pwd) -mindepth 2 -name 'TAGS')
104 local-tags:
105         -if [ -n "$(TAGS_HEADERS)$(TAGS_SOURCES)$(DEEPER_TAGS_FILES)" ]; then \
106                 etags $(ETAGS_FLAGS) $(DEEPER_TAGS_FILES:%=--include=%) \
107                         $(TAGS_SOURCES) $(TAGS_HEADERS) $(ERROR_LOG) ; \
108                 ctags $(CTAGS_FLAGS) $(TAGS_SOURCES) $(TAGS_HEADERS) \
109                         $(ERROR_LOG) ; \
110         fi
111
112 $(outdir)/version.hh: $(depth)/VERSION $(config_make) $(step-bindir)/make-version.py
113         $(PYTHON) $(step-bindir)/make-version.py $< > $@
114
115 $(outdir)/config.hh: $(config_h)
116         cp -p $< $@
117
118 configure: configure.in aclocal.m4
119         NOCONFIGURE=yes $(src-depth)/autogen.sh
120         chmod +x configure
121
122 local-clean:
123
124 local-distclean:
125
126 local-maintainerclean:
127
128 install-strip:
129         $(MAKE) INSTALLPY="$(INSTALLPY) -s" install
130
131 ifeq ($(strip $(depth)),.)
132 final-install:
133 else
134 final-install:
135         $(LOOP)
136
137 install: local-install
138         $(LOOP)
139 endif
140
141 local-install:
142
143 uninstall: local-uninstall
144         $(LOOP)
145
146 local-uninstall:
147
148 installextradoc:
149         -$(INSTALLPY) -d $(DESTDIR)$(prefix)/doc/$(package)
150         cp -r $(EXTRA_DOC_FILES) $(prefix)/doc/$(package)
151
152 -include $(outdir)/dummy.dep $(wildcard $(outdir)/*.dep)
153
154 $(outdir)/dummy.dep:
155         -mkdir -p $(outdir)
156         touch $(outdir)/dummy.dep
157         echo '*' > $(outdir)/.gitignore
158
159 check: local-check
160         $(LOOP)
161
162 local-check:
163
164 # ugh.  ugh ugh ugh
165 $(config_make): $(top-src-dir)/configure
166         @echo "************************************************************"
167         @echo "configure changed! You should probably reconfigure manually."
168         @echo "************************************************************"
169         (cd $(top-build-dir); ./config.status)
170         touch $@                # do something for multiple simultaneous configs.
171
172
173 #### Documentation (website and tarball)
174
175 # documentation is built in two stages,
176 # plus WWW-post (only at toplevel)
177 # see INSTALL for more information.
178
179 ifeq ($(out),www)
180 local-WWW-1:
181 local-WWW-2:
182 WWW-post:
183
184 WWW-1: local-WWW-1
185         $(LOOP)
186
187 WWW-2: local-WWW-2
188         $(LOOP)
189 endif
190
191 doc: doc-stage-1
192         $(MAKE) out=www WWW-2
193         $(MAKE) out=www WWW-post
194
195 local-doc:
196         $(MAKE) out=www local-WWW-1
197         $(MAKE) out=www local-WWW-2
198         $(MAKE) out=www WWW-post
199
200 doc-stage-1:
201         $(MAKE) -C $(depth)/scripts/build out=
202         $(MAKE) out=www WWW-1
203
204 doc-clean:
205         $(MAKE) out=www clean