]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
patch::: 1.3.133.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 diff dist 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 $(outdir)\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   exe         update all executables\n\
66   help        this help\n\
67   install     install programs and data (prefix=$(prefix))\n\
68   lib         update all libraries\n\
69   release     roll tarball and generate patch\n\
70   rpm         build RedHat package\n\
71   po          make new translation Portable Object database\n\
72   po-replace  do po-update and replace catalogs with msgmerged versions\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 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
91         mkdir -p $(distdir)/$(localdir)
92         $(LN) $(DIST_FILES) $(distdir)/$(localdir)
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 -p $(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 # absolute for installed stepmake
104         $(foreach i, $(SUBDIRS), $(MAKE) topdir=$(topdir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
105
106
107
108 html: $(HTML_FILES)
109
110 TAGS:
111         -if [ "$(TAGS_FILES)" != "" ]; then \
112                 etags $(ETAGS_FLAGS) $(TAGS_FILES) || \
113                 ctags $(CTAGS_FLAGS) ".h.hh.tcc.icc" $(TAGS_FILES) $(ERROR_LOG); \
114         fi
115
116         $(LOOP)
117
118 # ugh . -> $(outdir)
119 $(outdir)/VERSION: $(depth)/VERSION
120         cp -p $< $@
121
122 $(outdir)/version.hh: $(outdir)/VERSION
123         $(PYTHON) $(step-bindir)/make-version.py $< > $@
124
125 $(outdir)/config.h: $(config_h)
126         cp -p $< $@
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 -p $(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.