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