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