Add to git.
[makeplus.git] / Makefile+
1 # -*- Makefile -*-
2 #
3 # This is a make+ file. Make+ is a set of scripts which enhance GNU
4 # make and let you build RPMs, and other package types with just one
5 # control file.  To build this package you will need to download make+
6 # from this site: http://www.annexia.org/freeware/makeplus/
7
8 PACKAGE         := makeplus
9 VERSION_MAJOR   := 0
10 VERSION_MINOR   := 2.3
11 VERSION         := $(VERSION_MAJOR).$(VERSION_MINOR)
12
13 SUMMARY         := Advanced build system for GNU make
14 COPYRIGHT       := Public Domain
15 AUTHOR          := Richard W.M. Jones <rich@annexia.org>
16
17 define DESCRIPTION
18 Make+ is a set of scripts which enhance GNU make. The scripts replace
19 the functionality of autoconf, automake, rpm, dpkg and more, allowing
20 you to build, install, make RPMs, make Debian packages and more, all
21 from a single maintainable 'Makefile+' script.
22
23 Read more at http://www.annexia.org/freeware/makeplus/
24
25 The original author is Richard W.M. Jones <rich@annexia.org>
26
27 This software has been explicitly placed in the PUBLIC DOMAIN.  You
28 do not need any sort of license or agreement to use or copy this
29 software. You may also copyright this software yourself, and/or
30 relicense it under any terms you want, at any time and at no cost.
31 This allows you (among other things) to include this software with
32 other packages so that the user does not need to download and
33 install make+ separately.
34 endef
35
36 RPM_REQUIRES    := make >= 3.76, bash
37 RPM_GROUP       := Development/Building
38
39 CFLAGS          += -Wall -Werror -g -O2
40
41 EXTRA_DIST      := doc/*.html doc/*.1
42
43 all:    build
44
45 configure:
46         $(MP_CONFIGURE_START)
47         $(MP_CHECK_GNU_TAR)
48         $(MP_CONFIGURE_END)
49
50 build:  docs
51
52 docs:   doc/index.html doc/make+.1 # doc/makeplus.pdf
53
54 doc/index.html: doc/make+-book.xml
55         rm -f doc/*.html
56         -xmlto html -o doc $^
57
58 doc/make+.1: doc/make+-man.xml
59         -rm -f doc/*.1 ; xmlto man -o doc $^
60
61 doc/makeplus.pdf: doc/make+-book.xml
62         rm -f $@
63         -xmlto pdf -o doc $^
64
65 test:
66
67 # Avoid recursively distributing self.
68 MP_BUNDLE := 0
69
70 install: dist_for_bundles
71         install -d $(DESTDIR)$(bindir)
72         install -d $(DESTDIR)$(sysconfdir)
73         install -d $(DESTDIR)$(pkgdatadir)
74         install -d $(DESTDIR)$(docdir)
75         install -d $(DESTDIR)$(man1dir)
76
77         install -m 0755 $(srcdir)/make+ $(srcdir)/make+-skeleton \
78                 $(DESTDIR)$(bindir)
79         echo "MAKEPLUS_HOME=$(pkgdatadir); export MAKEPLUS_HOME" \
80                 > $(DESTDIR)$(sysconfdir)/make+.conf
81         install -m 0755 $(srcdir)/configure $(DESTDIR)$(pkgdatadir)
82         install -m 0644 $(srcdir)/*.mk $(DESTDIR)$(pkgdatadir)
83         install -m 0755 $(srcdir)/*.sh $(DESTDIR)$(pkgdatadir)
84         install -m 0644 $(srcdir)/README $(DESTDIR)$(docdir) ||:
85 #       # Built docs might be in $(srcdir) or build directory.
86         install -m 0644 doc/*.html $(DESTDIR)$(docdir) ||:
87         install -m 0644 doc/*.1 $(DESTDIR)$(man1dir)   ||:
88         install -m 0644 $(srcdir)/doc/*.html $(DESTDIR)$(docdir) ||:
89         install -m 0644 $(srcdir)/doc/*.1 $(DESTDIR)$(man1dir)   ||:
90 ifdef HAVE_GNU_TAR
91 #       # We do this so that the MP_BUNDLE option works (see dist.mk).
92         install -m 0644 mp-dist_for_bundles.tar.gz \
93                 $(DESTDIR)$(pkgdatadir)/$(PACKAGE).tar.gz
94         install -m 0644 $(srcdir)/README.make+_for_bundles \
95                 $(DESTDIR)$(pkgdatadir)
96         rm mp-dist_for_bundles.tar.gz
97 endif
98
99 # make+ installs a copy of its own distribution so that the MP_BUNDLE
100 # option works (see dist.mk).
101 ifdef HAVE_GNU_TAR
102 dist_for_bundles:
103         $(MAKE) -f $(srcdir)/$(_mp_makefile) \
104           MP_SRC_DIST=mp-dist_for_bundles.tar.gz dist
105 else
106 dist_for_bundles:
107
108 endif
109
110 define WEBSITE
111 <% include page_header.msp %>
112
113 <h1>makeplus - $(SUMMARY)</h1>
114
115 <p>
116 Make+ is a set of scripts which enhance GNU make. The scripts replace
117 the functionality of autoconf, automake, rpm, dpkg and more, allowing
118 you to build, install, make RPMs, make Debian packages and more, all
119 from a single maintainable 'Makefile+' script.
120 </p>
121
122 <h1>Download</h1>
123
124 <h2>Source code</h2>
125
126 <ul>
127 <li> Latest source release is $(VERSION):
128      <a href="$(PACKAGE)-$(VERSION).tar.gz">$(PACKAGE)-$(VERSION).tar.gz</a>
129 <li> Red Hat 7.x Source RPM package:
130      <a href="$(PACKAGE)-$(VERSION)-1.src.rpm">$(PACKAGE)-$(VERSION)-1.src.rpm</a>
131 </ul>
132
133 <h2>Binary packages</h2>
134
135 <ul>
136 <li> Red Hat 7.x RPM package:
137      <a href="$(PACKAGE)-$(VERSION)-1.i386.rpm">$(PACKAGE)-$(VERSION)-1.i386.rpm</a>
138 <li> Binary tarball:
139      <a href="$(PACKAGE)-$(VERSION).bin.tar.gz">$(PACKAGE)-$(VERSION).bin.tar.gz</a>
140 </ul>
141
142 <h1>News</h1>
143
144 <p>
145 <b>Fri Mar 28 14:25:31 GMT 2003:</b>
146 Fixed case where 'uname -m' has spaces, which would cause
147 the build directory name to contain spaces. Fixed the RPM spec
148 file (autogenerated) so that when building make+, make+ builds
149 itself using itself (thanks to ksonney at redhat.com for
150 identifying this problem).
151 </p>
152
153 <p>
154 <b>Sat Mar  1 14:28:35 GMT 2003:</b>
155 Make+ now supports a separate <code>./configure</code>
156 scripts, to make it look very much more like autoconf.
157 Added the ability to check that programs exist on the system.
158 Libraries, etc., can now be required (the configure step will
159 fail if they are not present). Make+ can now bundle itself
160 with your distribution so people don't need to download
161 make+ separately. More extensive testing on FreeBSD and
162 Solaris. Manpages install on the right place on FreeBSD
163 (thanks alane at geeksrus.net).
164 </p>
165
166 <p>
167 <b>Mon Feb 10 09:00:12 GMT 2003:</b>
168 Added missing newline at the end of configure_start.sh, which
169 broke FreeBSD's shell. (Thanks alane at geeksrus.net).
170 </p>
171
172 <p>
173 <b>Sat Feb  8 17:00:47 GMT 2003:</b>
174 Ported to Solaris, OpenBSD and FreeBSD (thanks to
175 <a href="http://www.azazel.net/">Jeremy Sowden</a>
176 and <a href="http://www.mondaymorning.org/">Richard Baker</a>
177 for help and equipment). Configuration information logged
178 to <code>config.log</code> file. Separate <code>config.mk</code>
179 file for Makefile-specific configuration.
180 </p>
181
182 <p>
183 <b>Fri Dec 27 10:40:50 GMT 2002:</b>
184 Multiple patches from Alan E at geekrus dot net which fix compatibility
185 issues with FreeBSD (manual page location can now be chosen, <code>CC</code>
186 and <code>CFLAGS</code> variables can be read on the command line).
187 This is an intermediate release which contains incomplete DocBook
188 documentation (to be completed properly later).
189 </p>
190
191 <p>
192 <b>Fri Dec 20 12:28:09 GMT 2002:</b> A patch which corrects the
193 build directory name on FreeBSD (thanks to Alan E at geeksrus dot
194 net for this).
195 </p>
196
197 <p>
198 <b>Mon Dec 16 22:03:32 GMT 2002:</b> Various improvements to building
199 tar files, binary distributions. This version should work better with
200 *BSD.
201 </p>
202
203 <p>
204 <b>Sun Dec  8 12:46:46 GMT 2002:</b> Extra colon in skeleton removed.
205 '/' in headers no longer breaks the $$(MP_CHECK_HEADERS) rule.
206 Fixed building of dynamic libraries in subdirectories. Various
207 extra fixes for <code>pthrlib</code>.
208 </p>
209
210 <p>
211 <b>Sun Dec  8 11:28:28 GMT 2002:</b> <code>make+</code> on its own now
212 correctly runs the <code>all</code> target.
213 </p>
214
215 <p>
216 <b>Sun Dec  8 10:50:11 GMT 2002:</b> Fixed
217 several bugs in <code>make+-skeleton</code>.
218 </p>
219
220 <% include page_footer.msp %>
221 endef
222
223 upload_website:
224         scp $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)-1.*.rpm \
225         $(PACKAGE)-$(VERSION).bin.tar.gz \
226         rich@10.0.0.248:annexia.org/freeware/makeplus/
227         scp index.html rich@10.0.0.248:annexia.org/freeware/makeplus/index.msp
228
229 .PHONY: build configure docs test upload_website