]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
* GNUmakefile.in: clean up web building.
[lilypond.git] / stepmake / stepmake / generic-targets.make
1 .PHONY : all clean config default diff dist doc exe help html lib TAGS\
2          po
3
4 all:     default
5         $(LOOP)
6
7 man:
8         $(LOOP)
9
10 # be careful about deletion.
11 clean: local-clean
12         -rm -f $(outdir)/*
13         $(LOOP)
14
15 ifneq ($(strip $(depth)),.)
16 dist:
17         make -C $(depth) dist
18 endif
19
20 distclean: clean 
21         $(LOOP)
22         $(MAKE) local-distclean
23
24 maintainerclean: 
25         $(LOOP)
26         $(MAKE) local-maintainerclean
27         $(MAKE) local-distclean
28
29
30 # configure:
31 #
32 config:
33         ./$(depth)/configure
34 #
35
36
37 # target help:
38 #
39 generic-help:
40         @echo -e "\
41 Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)\n\
42 Usage: make ["VARIABLE=value"]... [TARGET]\n\
43 \n\
44 Targets:\n"
45
46 help: generic-help local-help
47         @echo -e "\
48   all         update everything\n\
49   clean       remove all genated stuff in $(outdir)\n\
50   check       run selftest\n\
51   default     same as the empty target\n\
52   exe         update all executables\n\
53   help        this help\n\
54   install     install programs and data (prefix=$(prefix))\n\
55   lib         update all libraries\n\
56   TAGS        genarate tagfiles\n\
57 \n\
58 Make may be invoked from any subdirectory\n\
59 Note that all commands recurse into SUBDIRS;\n\
60 prepend \`local-' to do only cwd, eg: local-clean\n\
61 "\
62
63 local-help:
64
65 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
66         mkdir -p $(distdir)/$(localdir)
67         $(LN) $(DIST_FILES) $(distdir)/$(localdir)
68
69         case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
70                 $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir);; \
71         esac
72
73         case "$(OUT_DIST_FILES)x" in x) ;; *) \
74                 mkdir -p $(distdir)/$(localdir)/$(outdir); \
75                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
76         esac
77 #       $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
78 # absolute for installed stepmake
79         $(foreach i, $(SUBDIRS), $(MAKE) topdir=$(topdir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
80
81
82
83 html: $(HTML_FILES)
84
85 TAGS:
86         -if [ "$(TAGS_FILES)" != "" ]; then \
87                 etags $(ETAGS_FLAGS) $(TAGS_FILES) || \
88                 ctags $(CTAGS_FLAGS) ".h.hh.tcc.icc" $(TAGS_FILES) $(ERROR_LOG); \
89         fi
90
91         $(LOOP)
92
93 # ugh . -> $(outdir)
94 $(outdir)/VERSION: $(depth)/VERSION
95         cp -p $< $@
96
97 $(outdir)/version.hh: $(outdir)/VERSION
98         $(PYTHON) $(step-bindir)/make-version.py $< > $@
99
100 $(outdir)/config.h: $(config_h)
101         cp -p $< $@
102
103 configure: configure.in aclocal.m4
104         NOCONFIGURE=yes $(srcdir)/autogen.sh
105         chmod +x configure
106
107 local-clean:
108
109 local-distclean:
110
111 local-maintainerclean:
112
113 install-strip:
114         $(MAKE) INSTALL="$(INSTALL) -s" install
115
116 final-install:
117
118 install: local-install
119         $(LOOP)
120         $(MAKE) final-install
121
122 local-install:
123
124 uninstall: local-uninstall
125         $(LOOP)
126
127 local-uninstall:
128
129 installextradoc:
130         -$(INSTALL) -d $(prefix)/doc/$(package)
131         $(foreach i, $(EXTRA_DOC_FILES),\
132                 cp -r $(i) $(prefix)/doc/$(package) &&) true
133
134 include $(outdir)/dummy.dep $(DEP_FILES) # expect a warning here
135
136 $(outdir)/dummy.dep:
137         -mkdir -p $(outdir)
138         touch $(outdir)/dummy.dep
139
140
141 check: local-check
142         $(LOOP)
143
144 local-check:
145
146 # ugh.  ugh ugh ugh
147 $(depth)/$(configuration).make: $(depth)/configure
148         @echo "************************************************************"
149         @echo "configure changed! You should probably reconfigure manually."
150         @echo "************************************************************"
151         (cd $(depth); ./config.status)
152         touch $@                # do something for multiple simultaneous configs.
153
154
155 deb:
156         $(MAKE) -C $(depth)/debian
157         cd $(depth) && debuild
158
159 diff:
160         $(PYTHON) $(step-bindir)/package-diff.py  --outdir=$(topdir)/$(outdir) --package=$(topdir) $(makeflags)
161         -ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
162
163 release: 
164         $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
165
166 local-WWW:
167 local-WWW-post:
168
169 WWW: local-WWW
170         $(LOOP)
171         $(MAKE) local-WWW-post