]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
Merge commit 'origin/master' into dev/texi2html
[lilypond.git] / stepmake / stepmake / generic-targets.make
1 .PHONY : all clean bin-clean config default dist doc exe help html lib TAGS\
2          po web web-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2\
3          web-install
4
5 all:     default
6         $(LOOP)
7
8 man:
9         $(LOOP)
10
11 clean: local-clean
12         -rm -rf "./$(outdir)"
13         $(LOOP)
14
15 ifeq (,$(findstring metafont,$(STEPMAKE_TEMPLATES)))
16 bin-clean: local-bin-clean
17         -rm -rf "./$(outdir)"
18         $(LOOP)
19 else
20 bin-clean:
21 endif
22
23 local-bin-clean: local-clean
24
25 ifneq ($(strip $(depth)),.)
26 dist:
27         $(MAKE) -C $(depth) dist
28 endif
29
30 distclean: clean
31         $(LOOP)
32         $(MAKE) local-distclean
33
34 cvs-clean:
35         $(MAKE) local-distclean
36         rm -rf out
37         rm -rf out-www
38         rm -f aclocal.m4 configure
39
40 maintainerclean:
41         $(LOOP)
42         $(MAKE) local-maintainerclean
43         $(MAKE) local-distclean
44
45
46 # This doesn't allow command-line options, is it really useful? -jm
47 config:
48         ./$(src-depth)/configure
49
50
51 generic-help:
52         @echo -e "\
53 Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)\n\
54 Usage: make ["VARIABLE=value"]... [TARGET]\n\
55 \n\
56 Targets specific to current directory:\n"
57
58 help: generic-help local-help
59         @echo -e "Generic targets:\n\
60   all *       update everything except website documentation\n\
61   clean *     remove all generated stuff in $(outdir)\n\
62   bin-clean * same as clean, except that mf/out is preserved\n\
63   default     same as the empty target\n\
64   exe         update all executables\n\
65   help        this help\n\
66   install *   install programs and data (prefix=$(prefix))\n\
67   uninstall*  uninstall programs and data\n\
68   lib         update all libraries\n\
69   web *       update website in directory \`out-www'\n\
70   web-install * install website documentation in (webdir=$(webdir))\n\
71               and Info documentation with images\n\
72   web-clean * clean \`out-www' directory\n\
73   TAGS        generate tagfiles\n\
74 \n\
75 \`make' may be invoked from any subdirectory.\n\
76 Note that all commands marked with a star (*) recurse into subdirectories;\n\
77 prepend \`local-' to restrict operation to the current directory.\n\
78 Example: \`local-clean'."
79
80 local-help:
81
82 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
83         mkdir -p $(distdir)/$(localdir)
84         $(LN) $(DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir)
85
86         case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
87                 $(LN) $(NON_ESSENTIAL_DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir);; \
88         esac
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 local-WWW-1:
180 local-WWW-2:
181 web-install:
182 WWW-post:
183
184 WWW-1: local-WWW-1
185         $(LOOP)
186
187 WWW-2: local-WWW-2
188         $(LOOP)
189
190 web:
191         $(MAKE) out=www WWW-1
192         $(MAKE) out=www WWW-2
193         $(MAKE) out=www WWW-post
194
195 web-1:
196         $(MAKE) out=www WWW-1
197
198 web-clean:
199         $(MAKE) out=www clean