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