]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
release: 1.0.17
[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
88 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
89         mkdir -p $(distdir)/$(localdir)
90         $(LN) $(DIST_FILES) $(distdir)/$(localdir)
91
92 #UGH UGH . make ifdef doesn't mix with string substitution semantics (late expansion vs. early expansion)
93
94         case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
95                 $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir);; \
96         esac
97
98         case "$(OUT_DIST_FILES)x" in x) ;; *) \
99                 mkdir $(distdir)/$(localdir)/out; \
100                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/out;; \
101         esac
102         $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
103
104
105
106 html: $(HTML_FILES)
107
108 TAGS:
109         -if [ "$(TAGS_FILES)" != "" ]; then \
110                 etags -CT $(TAGS_FILES) || \
111                 ctags -h ".h.hh.tcc.icc" $(TAGS_FILES) $(ERROR_LOG); \
112         fi
113
114         $(LOOP)
115
116 # ugh . -> $(outdir)
117 $(outdir)/VERSION: $(depth)/VERSION
118         cp $< $@
119
120 $(outdir)/version.hh: $(outdir)/VERSION
121         sh ./$(step-bindir)/make-version.sh $< > $@
122
123 # should this be in Rules?
124 configure: configure.in aclocal.m4
125         autoconf - < $<> $@
126         chmod +x configure
127
128 localclean:
129
130 local-distclean:
131
132 local-maintainerclean:
133
134 install-strip:
135         $(MAKE) INSTALL="$(INSTALL) -s" install
136
137 install: localinstall
138         $(LOOP)
139
140 localinstall:
141
142 uninstall: localuninstall
143         $(LOOP)
144
145 localuninstall:
146
147 installextradoc:
148         -$(INSTALL) -d $(prefix)/doc/$(package)
149         $(foreach i, $(EXTRA_DOC_FILES),\
150                 cp -r $(i) $(prefix)/doc/$(package) &&) true
151
152 WWW: local-WWW
153         $(LOOP)
154
155 local-WWW:
156
157 include $(stepdir)/package.make
158
159 include $(outdir)/dummy.dep $(DEP_FILES)
160
161 $(outdir)/dummy.dep:
162         -mkdir $(outdir)
163         touch $(outdir)/dummy.dep
164
165
166 check: local-check
167         $(LOOP)
168
169 local-check:
170
171 # ugh.  ugh ugh ugh
172 $(depth)/$(configuration).make: $(depth)/configure
173         @echo "**************************************"
174         @echo "configure changed! You should probably reconfigure manually."
175         @echo "**************************************"
176         (cd $(depth); ./config.status)
177         touch $@                # do something for multiple simultaneous configs.