]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
972d3fd671168a745c0915edf214f6ac40d40f82
[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 # "
73 local-help:
74
75 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
76         mkdir -p $(distdir)/$(localdir)
77         $(LN) $(DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir)
78
79         case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
80                 $(LN) $(NON_ESSENTIAL_DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir);; \
81         esac
82         case "$(OUT_DIST_FILES)x" in x) ;; *) \
83                 mkdir -p $(distdir)/$(localdir)/$(outdir); \
84                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
85         esac
86         $(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
87
88
89
90 html: $(HTML_FILES)
91
92 TAGS:
93         $(LOOP)
94         $(MAKE) local-tags
95
96 DEEPER_TAGS_FILES = $(shell find $(pwd) -mindepth 2 -name 'TAGS')
97 local-tags:
98         -if [ -n "$(TAGS_HEADERS)$(TAGS_SOURCES)$(DEEPER_TAGS_FILES)" ]; then \
99                 etags $(ETAGS_FLAGS) $(DEEPER_TAGS_FILES:%=--include=%) \
100                         $(TAGS_SOURCES) $(TAGS_HEADERS) $(ERROR_LOG) ; \
101                 ctags $(CTAGS_FLAGS) $(TAGS_SOURCES) $(TAGS_HEADERS) \
102                         $(ERROR_LOG) ; \
103         fi
104
105 $(outdir)/version.hh: $(depth)/VERSION $(config_make) $(step-bindir)/make-version.py
106         $(PYTHON) $(step-bindir)/make-version.py $< > $@
107
108 $(outdir)/config.hh: $(config_h)
109         cp -p $< $@
110
111 configure: configure.in aclocal.m4
112         NOCONFIGURE=yes $(src-depth)/autogen.sh
113         chmod +x configure
114
115 local-clean:
116
117 local-distclean:
118
119 local-maintainerclean:
120
121 install-strip:
122         $(MAKE) INSTALLPY="$(INSTALLPY) -s" install
123
124 ifeq ($(strip $(depth)),.)
125 final-install:
126 else
127 final-install:
128         $(LOOP)
129
130 install: local-install
131         $(LOOP)
132 endif
133
134 local-install:
135
136 uninstall: local-uninstall
137         $(LOOP)
138
139 local-uninstall:
140
141 installextradoc:
142         -$(INSTALLPY) -d $(DESTDIR)$(prefix)/doc/$(package)
143         cp -r $(EXTRA_DOC_FILES) $(prefix)/doc/$(package)
144
145 include $(outdir)/dummy.dep $(wildcard $(outdir)/*.dep) # expect a warning here
146
147 $(outdir)/dummy.dep:
148         @echo please ignore innocent warning about dummy.dep
149         -mkdir -p $(outdir)
150         touch $(outdir)/dummy.dep
151
152 check: local-check
153         $(LOOP)
154
155 local-check:
156
157 # ugh.  ugh ugh ugh
158 $(config_make): $(top-src-dir)/configure
159         @echo "************************************************************"
160         @echo "configure changed! You should probably reconfigure manually."
161         @echo "************************************************************"
162         (cd $(top-build-dir); ./config.status)
163         touch $@                # do something for multiple simultaneous configs.
164
165
166 deb:
167         $(MAKE) -C $(depth)/debian
168         cd $(depth) && debuild
169
170 diff:
171         $(PYTHON) $(step-bindir)/package-diff.py  --outdir=$(top-src-dir)/$(outdir) --package=$(top-src-dir) $(makeflags)
172         -ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
173
174 release:
175         $(PYTHON) $(step-bindir)/release.py --outdir=$(top-src-dir)/$(outdir) --package=$(top-src-dir)
176
177
178 ################ website.
179
180 local-WWW:
181 local-WWW-post:
182 web-install:
183
184 WWW: local-WWW
185         $(LOOP)
186
187 WWW-post: local-WWW-post
188         $(LOOP)
189
190 web:
191         $(MAKE) out=www WWW
192         $(MAKE) out=www WWW-post