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