]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
release: 1.0.6
[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
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 $(outdir)/version.hh: VERSION
123         sh ./$(step-bindir)/make-version.sh > $@
124
125
126 # should this be in Rules?
127 configure: configure.in aclocal.m4
128         autoconf - < $<> $@
129         chmod +x configure
130
131 localclean:
132
133 local-distclean:
134
135 local-maintainerclean:
136
137 install-strip:
138         $(MAKE) INSTALL="$(INSTALL) -s" install
139
140 install: localinstall
141         $(LOOP)
142
143 localinstall:
144
145 uninstall: localuninstall
146         $(LOOP)
147
148 localuninstall:
149
150 installextradoc:
151         -$(INSTALL) -d $(prefix)/doc/$(package)
152         $(foreach i, $(EXTRA_DOC_FILES),\
153                 cp -r $(i) $(prefix)/doc/$(package) &&) true
154
155 WWW: local-WWW
156         $(LOOP)
157
158 include $(stepdir)/package.make
159
160 include $(outdir)/dummy.dep $(DEP_FILES)
161
162 $(outdir)/dummy.dep:
163         -mkdir $(outdir)
164         touch $(outdir)/dummy.dep
165
166
167 check: local-check
168         $(LOOP)
169
170 local-check:
171
172 # ugh.  ugh ugh ugh
173 $(depth)/$(configuration).make: $(depth)/configure
174         @echo "**************************************"
175         @echo "configure changed! You should probably reconfigure manually."
176         @echo "**************************************"
177         (cd $(depth); ./config.status)
178         touch $@                # do something for multiple simultaneous configs.