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