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