]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[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 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 # 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 # "
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         echo '*' > $(outdir)/.gitignore
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
193
194 web-clean:
195         $(MAKE) out=www clean