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