]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
2e9645b6dae8de1dad2bc300d2bdb85cfbb273fb
[lilypond.git] / stepmake / stepmake / generic-targets.make
1 # title    generic make targets
2 # file     make/Targets.make
3
4 .PHONY : all clean config default dist doc doc++  exe help html lib TAGS\
5          po
6 # VPATH=$(outdir)/              #ugh?
7 # target all:
8 #
9 all:     default
10         $(LOOP)
11
12
13 # be careful about deletion.
14 clean: localclean
15         -rm -f $(outdir)/*
16         $(LOOP)
17
18 distclean: clean 
19         $(LOOP)
20         $(MAKE) local-distclean
21
22 maintainerclean: 
23         $(LOOP)
24         $(MAKE) local-maintainerclean
25         $(MAKE) local-distclean
26
27
28 # configure:
29 #
30 config:
31         ./$(depth)/configure
32 #
33
34
35 # target help:
36 #
37 generic-help:
38         @echo -e "\
39 Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)\n\
40 Usage: $(MAKE) ["VARIABLE=value"]... [TARGET]\n\
41 \n\
42 Targets:\n"
43
44 help: generic-help local-help
45         @echo -e "\
46   all         update everything\n\
47   clean       remove all genated stuff in $(oudir)\n\
48   config      rerun configure\n\
49   deb         build Debian package\n\
50   default     same as the empty target\n\
51   diff        generate patch: $(package)-$(TOPLEVEL_VERSION).diff.gz\n\
52   .           Options:\n\
53   .             from=0.1.74\n\
54   .             help==\n\
55   .             release==\n\
56   .             to=0.1.74.jcn2\n\
57   distclean   cleaner than clean (duh)\n\
58   doc         update all documentation\n\
59   doc++       make doc++ documentation\n\
60   exe         update all executables\n\
61   help        this help\n\
62   install     install programs and data (prefix=$(prefix))\n\
63   lib         update all libraries\n\
64   release     roll tarball and generate patch\n\
65   rpm         build RedHat package\n\
66   tar         same as dist\n\
67   TAGS        genarate tagfiles\n\
68   zip         build binary doze distribution\n\
69 \n\
70 Make may be invoked from any subdirectory\n\
71 Note that all commands recurse into SUBSDIRS\n\
72 "\
73 #
74
75 local-help:
76
77 doc:
78 #UGH
79         true #  $(MAKE) -C $(depth)/Documentation all
80
81
82 # Ugh.  C++ specific.
83 doc++:
84         (cd $(outdir); sh ../$(step-bindir)/tar-docxx.sh $(package)-$(TOPLEVEL_VERSION).tar.gz)
85
86
87 update-state-vector:
88 ifneq ($(strip $(state-vector)),)
89         if [ "`tail -1 $(state-vector)`" != "$(TOPLEVEL_VERSION)" ]; then\
90           echo $(TOPLEVEL_VERSION) >> $(state-vector); \
91         fi
92 endif
93
94 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
95         mkdir -p $(distdir)/$(localdir)
96         $(LN) $(DIST_FILES) $(distdir)/$(localdir)
97
98 #UGH UGH . make ifdef doesn't mix with string substitution semantics (late expansion vs. early expansion)
99
100         case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
101                 $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir);; \
102         esac
103
104         case "$(OUT_DIST_FILES)x" in x) ;; *) \
105                 mkdir $(distdir)/$(localdir)/out; \
106                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/out;; \
107         esac
108         $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
109
110
111
112 html: $(HTML_FILES)
113
114 TAGS:
115         -if [ "$(TAGS_FILES)" != "" ]; then \
116                 etags -CT $(TAGS_FILES) || \
117                 ctags -h ".h.hh.tcc.icc" $(TAGS_FILES) $(ERROR_LOG); \
118         fi
119
120         $(LOOP)
121
122 # ugh . -> $(outdir)
123 $(outdir)/VERSION: $(depth)/VERSION
124         cp $< $@
125
126 $(outdir)/version.hh: $(outdir)/VERSION
127         sh ./$(step-bindir)/make-version.sh $< > $@
128
129 # should this be in Rules?
130 configure: configure.in aclocal.m4
131         autoconf - < $<> $@
132         chmod +x configure
133
134 localclean:
135
136 local-distclean:
137
138 local-maintainerclean:
139
140 install-strip:
141         $(MAKE) INSTALL="$(INSTALL) -s" install
142
143 install: localinstall
144         $(LOOP)
145
146 localinstall:
147
148 uninstall: localuninstall
149         $(LOOP)
150
151 localuninstall:
152
153 installextradoc:
154         -$(INSTALL) -d $(prefix)/doc/$(package)
155         $(foreach i, $(EXTRA_DOC_FILES),\
156                 cp -r $(i) $(prefix)/doc/$(package) &&) true
157
158 WWW: local-WWW
159         $(LOOP)
160
161 local-WWW:
162
163 include $(stepdir)/package.make
164
165 include $(outdir)/dummy.dep $(DEP_FILES)
166
167 $(outdir)/dummy.dep:
168         -mkdir $(outdir)
169         touch $(outdir)/dummy.dep
170
171
172 check: local-check
173         $(LOOP)
174
175 local-check:
176
177 # ugh.  ugh ugh ugh
178 $(depth)/$(configuration).make: $(depth)/configure
179         @echo "**************************************"
180         @echo "configure changed! You should probably reconfigure manually."
181         @echo "**************************************"
182         (cd $(depth); ./config.status)
183         touch $@                # do something for multiple simultaneous configs.