* GNUmakefile.in: clean up web building.
[lilypond.git] / stepmake / stepmake / generic-targets.make
blobfc567c3910b5ec06f08d86a3831a8b255cfb3356
1 .PHONY : all clean config default diff dist doc exe help html lib TAGS\
2 po
4 all: default
5 $(LOOP)
7 man:
8 $(LOOP)
10 # be careful about deletion.
11 clean: local-clean
12 -rm -f $(outdir)/*
13 $(LOOP)
15 ifneq ($(strip $(depth)),.)
16 dist:
17 make -C $(depth) dist
18 endif
20 distclean: clean
21 $(LOOP)
22 $(MAKE) local-distclean
24 maintainerclean:
25 $(LOOP)
26 $(MAKE) local-maintainerclean
27 $(MAKE) local-distclean
30 # configure:
32 config:
33 ./$(depth)/configure
37 # target help:
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"
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\
63 local-help:
65 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
66 mkdir -p $(distdir)/$(localdir)
67 $(LN) $(DIST_FILES) $(distdir)/$(localdir)
69 case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
70 $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir);; \
71 esac
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
83 html: $(HTML_FILES)
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); \
91 $(LOOP)
93 # ugh . -> $(outdir)
94 $(outdir)/VERSION: $(depth)/VERSION
95 cp -p $< $@
97 $(outdir)/version.hh: $(outdir)/VERSION
98 $(PYTHON) $(step-bindir)/make-version.py $< > $@
100 $(outdir)/config.h: $(config_h)
101 cp -p $< $@
103 configure: configure.in aclocal.m4
104 NOCONFIGURE=yes $(srcdir)/autogen.sh
105 chmod +x configure
107 local-clean:
109 local-distclean:
111 local-maintainerclean:
113 install-strip:
114 $(MAKE) INSTALL="$(INSTALL) -s" install
116 final-install:
118 install: local-install
119 $(LOOP)
120 $(MAKE) final-install
122 local-install:
124 uninstall: local-uninstall
125 $(LOOP)
127 local-uninstall:
129 installextradoc:
130 -$(INSTALL) -d $(prefix)/doc/$(package)
131 $(foreach i, $(EXTRA_DOC_FILES),\
132 cp -r $(i) $(prefix)/doc/$(package) &&) true
134 include $(outdir)/dummy.dep $(DEP_FILES) # expect a warning here
136 $(outdir)/dummy.dep:
137 -mkdir -p $(outdir)
138 touch $(outdir)/dummy.dep
141 check: local-check
142 $(LOOP)
144 local-check:
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.
155 deb:
156 $(MAKE) -C $(depth)/debian
157 cd $(depth) && debuild
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)
163 release:
164 $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
166 local-WWW:
167 local-WWW-post:
169 WWW: local-WWW
170 $(LOOP)
171 $(MAKE) local-WWW-post