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