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