]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
* autogen.sh: Generate.
[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   default     same as the empty target\n\
51   exe         update all executables\n\
52   help        this help\n\
53   install     install programs and data (prefix=$(prefix))\n\
54   lib         update all libraries\n\
55   TAGS        genarate tagfiles\n\
56 \n\
57 Make may be invoked from any subdirectory\n\
58 Note that all commands recurse into SUBDIRS;\n\
59 prepend \`local-' to do only cwd, eg: local-clean\n\
60 "\
61
62 local-help:
63
64 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
65         mkdir -p $(distdir)/$(localdir)
66         $(LN) $(DIST_FILES) $(distdir)/$(localdir)
67
68         case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
69                 $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir);; \
70         esac
71
72         case "$(OUT_DIST_FILES)x" in x) ;; *) \
73                 mkdir -p $(distdir)/$(localdir)/$(outdir); \
74                 $(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/$(outdir);; \
75         esac
76 #       $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
77 # absolute for installed stepmake
78         $(foreach i, $(SUBDIRS), $(MAKE) topdir=$(topdir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
79
80
81
82 html: $(HTML_FILES)
83
84 TAGS:
85         -if [ "$(TAGS_FILES)" != "" ]; then \
86                 etags $(ETAGS_FLAGS) $(TAGS_FILES) || \
87                 ctags $(CTAGS_FLAGS) ".h.hh.tcc.icc" $(TAGS_FILES) $(ERROR_LOG); \
88         fi
89
90         $(LOOP)
91
92 # ugh . -> $(outdir)
93 $(outdir)/VERSION: $(depth)/VERSION
94         cp -p $< $@
95
96 $(outdir)/version.hh: $(outdir)/VERSION
97         $(PYTHON) $(step-bindir)/make-version.py $< > $@
98
99 $(outdir)/config.h: $(config_h)
100         cp -p $< $@
101
102 configure: configure.in aclocal.m4
103         NOCONFIGURE=yes $(srcdir)/autogen.sh
104         chmod +x configure
105
106 local-clean:
107
108 local-distclean:
109
110 local-maintainerclean:
111
112 install-strip:
113         $(MAKE) INSTALL="$(INSTALL) -s" install
114
115 install: local-install
116         $(LOOP)
117
118 local-install:
119
120 uninstall: local-uninstall
121         $(LOOP)
122
123 local-uninstall:
124
125 installextradoc:
126         -$(INSTALL) -d $(prefix)/doc/$(package)
127         $(foreach i, $(EXTRA_DOC_FILES),\
128                 cp -r $(i) $(prefix)/doc/$(package) &&) true
129
130 include $(outdir)/dummy.dep $(DEP_FILES)
131
132 $(outdir)/dummy.dep:
133         -mkdir -p $(outdir)
134         touch $(outdir)/dummy.dep
135
136
137 check: local-check
138         $(LOOP)
139
140 local-check:
141
142 # ugh.  ugh ugh ugh
143 $(depth)/$(configuration).make: $(depth)/configure
144         @echo "************************************************************"
145         @echo "configure changed! You should probably reconfigure manually."
146         @echo "************************************************************"
147         (cd $(depth); ./config.status)
148         touch $@                # do something for multiple simultaneous configs.
149
150
151 deb:
152         $(MAKE) -C $(depth)/debian
153         cd $(depth) && debuild
154
155 diff:
156         $(PYTHON) $(step-bindir)/package-diff.py  --outdir=$(topdir)/$(outdir) --package=$(topdir) $(makeflags)
157         -ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
158
159 release: 
160         $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
161
162 rpm: $(depth)/$(package-icon) dist
163         @echo "Assuming Red Hat system" #FIXME: check distro, then issue rpm
164         $(MAKE) -C $(depth)/make
165         cd $(depth) && rpm -bb make/$(outdir)/lilypond.redhat.spec
166 #       su -c 'rpm -tb $(depth)/$(outdir)/$(distname).tar.gz'
167