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