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