]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
(WWW-post): Oops, depend
[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 # urg
47 webdir = $(local_package_docdir)
48 help: generic-help local-help
49         @echo -e "\
50   all         update everything\n\
51   clean       remove all genated stuff in $(outdir)\n\
52   check       run selftest\n\
53   default     same as the empty target\n\
54   exe         update all executables\n\
55   help        this help\n\
56   install     install programs and data (prefix=$(prefix))\n\
57   lib         update all libraries\n\
58   web         update website in out-www\n\
59   web-install install website documentation in (webdir=$(webdir))\n\
60   web-clean   clean out-www\n\
61   TAGS        genarate tagfiles\n\
62 \n\
63 Make may be invoked from any subdirectory\n\
64 Note that all commands recurse into SUBDIRS;\n\
65 prepend \`local-' to do only cwd, eg: local-clean\n\
66 "\
67
68 local-help:
69
70 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
71         mkdir -p $(distdir)/$(localdir)
72         $(LN) $(DIST_FILES) $(distdir)/$(localdir)
73
74         case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
75                 $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir);; \
76         esac
77
78         case "$(OUT_DIST_FILES)x" in x) ;; *) \
79                 mkdir -p $(distdir)/$(localdir)/$(outdir); \
80                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
81         esac
82 #       $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
83 # absolute for installed stepmake
84         $(foreach i, $(SUBDIRS), $(MAKE) topdir=$(topdir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
85
86
87
88 html: $(HTML_FILES)
89
90 TAGS:
91         -if [ "$(TAGS_FILES)" != "" ]; then \
92                 etags $(ETAGS_FLAGS) $(TAGS_FILES) || \
93                 ctags $(CTAGS_FLAGS) ".h.hh.tcc.icc" $(TAGS_FILES) $(ERROR_LOG); \
94         fi
95
96         $(LOOP)
97
98 # ugh . -> $(outdir)
99 $(outdir)/VERSION: $(depth)/VERSION
100         cp -p $< $@
101
102 $(outdir)/version.hh: $(outdir)/VERSION
103         $(PYTHON) $(step-bindir)/make-version.py $< > $@
104
105 $(outdir)/config.h: $(config_h)
106         cp -p $< $@
107
108 configure: configure.in aclocal.m4
109         NOCONFIGURE=yes $(srcdir)/autogen.sh
110         chmod +x configure
111
112 local-clean:
113
114 local-distclean:
115
116 local-maintainerclean:
117
118 install-strip:
119         $(MAKE) INSTALL="$(INSTALL) -s" install
120
121 final-install:
122
123 install: local-install
124         $(LOOP)
125         $(MAKE) final-install
126
127 local-install:
128
129 uninstall: local-uninstall
130         $(LOOP)
131
132 local-uninstall:
133
134 installextradoc:
135         -$(INSTALL) -d $(prefix)/doc/$(package)
136         $(foreach i, $(EXTRA_DOC_FILES),\
137                 cp -r $(i) $(prefix)/doc/$(package) &&) true
138
139 include $(outdir)/dummy.dep $(DEP_FILES) # expect a warning here
140
141 $(outdir)/dummy.dep:
142         -mkdir -p $(outdir)
143         touch $(outdir)/dummy.dep
144
145
146 check: local-check
147         $(LOOP)
148
149 local-check:
150
151 # ugh.  ugh ugh ugh
152 $(config_make): $(topdir)/configure
153         @echo "************************************************************"
154         @echo "configure changed! You should probably reconfigure manually."
155         @echo "************************************************************"
156         (cd $(builddir); ./config.status)
157         touch $@                # do something for multiple simultaneous configs.
158
159
160 deb:
161         $(MAKE) -C $(depth)/debian
162         cd $(depth) && debuild
163
164 diff:
165         $(PYTHON) $(step-bindir)/package-diff.py  --outdir=$(topdir)/$(outdir) --package=$(topdir) $(makeflags)
166         -ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
167
168 release: 
169         $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
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