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