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