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