]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
Update documentation targets
[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         $(LOOP)
31         $(MAKE) local-distclean
32
33 cvs-clean:
34         $(MAKE) local-distclean
35         rm -rf out
36         rm -rf out-www
37         rm -f aclocal.m4 configure
38
39 maintainerclean:
40         $(LOOP)
41         $(MAKE) local-maintainerclean
42         $(MAKE) local-distclean
43
44
45 # This doesn't allow command-line options, is it really useful? -jm
46 config:
47         ./$(src-depth)/configure
48
49
50 generic-help:
51         @echo -e "\
52 Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)\n\
53 Usage: make ["VARIABLE=value"]... [TARGET]\n\
54 \n\
55 Targets specific to current directory:\n"
56
57 help: generic-help local-help
58         @echo -e "Generic targets:\n\
59   all *       update everything except documentation with images\n\
60   clean *     remove all generated stuff in $(outdir)\n\
61   bin-clean * same as clean, except that mf/out is preserved\n\
62   default     same as the empty target\n\
63   doc *       update documentation with images in directory \`out-www'\n\
64   doc-stage-1 * update only PDF and Info documentation in directory \`out-www'\n\
65   doc-clean * clean \`out-www' directory\n\
66   exe         update all executables\n\
67   help        this help\n\
68   install *   install programs and data (prefix=$(prefix))\n\
69   lib         update all libraries\n\
70   uninstall*  uninstall programs and data\n\
71   TAGS        generate tagfiles\n\
72 \n\
73 \`make' may be invoked from any subdirectory.\n\
74 Note that all commands marked with a star (*) recurse into subdirectories;\n\
75 prepend \`local-' to restrict operation to the current directory.\n\
76 Example: \`local-clean'."
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 doc-stage-1:
194         $(MAKE) -C $(depth)/scripts/build out=
195         $(MAKE) out=www WWW-1
196
197 doc-clean:
198         $(MAKE) out=www clean