]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-targets.make
1348328f1f9b097132dd3d3b53de85b979e6b0f5
[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 # should this be in Rules?
103 configure: configure.in aclocal.m4
104         autoconf 
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 install: local-install
117         $(LOOP)
118
119 local-install:
120
121 uninstall: local-uninstall
122         $(LOOP)
123
124 local-uninstall:
125
126 installextradoc:
127         -$(INSTALL) -d $(prefix)/doc/$(package)
128         $(foreach i, $(EXTRA_DOC_FILES),\
129                 cp -r $(i) $(prefix)/doc/$(package) &&) true
130
131 include $(outdir)/dummy.dep $(DEP_FILES)
132
133 $(outdir)/dummy.dep:
134         -mkdir -p $(outdir)
135         touch $(outdir)/dummy.dep
136
137
138 check: local-check
139         $(LOOP)
140
141 local-check:
142
143 # ugh.  ugh ugh ugh
144 $(depth)/$(configuration).make: $(depth)/configure
145         @echo "************************************************************"
146         @echo "configure changed! You should probably reconfigure manually."
147         @echo "************************************************************"
148         (cd $(depth); ./config.status)
149         touch $@                # do something for multiple simultaneous configs.
150
151
152 deb:
153         $(MAKE) -C $(depth)/debian
154         cd $(depth) && debuild
155
156 diff:
157         $(PYTHON) $(step-bindir)/package-diff.py  --outdir=$(topdir)/$(outdir) --package=$(topdir) $(makeflags)
158         -ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
159
160 release: 
161         $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
162
163 rpm: $(depth)/$(package-icon) dist
164         @echo "Assuming Red Hat system" #FIXME: check distro, then issue rpm
165         $(MAKE) -C $(depth)/make
166         cd $(depth) && rpm -bb make/$(outdir)/lilypond.redhat.spec
167 #       su -c 'rpm -tb $(depth)/$(outdir)/$(distname).tar.gz'
168