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