1 # This is make+. Make+ is a set of scripts which enhance GNU make and
2 # let ou build RPMs, and other packages types with just one control
3 # file. Read more at http://www.annexia.org/freeware/makeplus/
5 # The original author is Richard W.M. Jones <rich@annexia.org>.
7 # This software has been explicitly placed in the PUBLIC DOMAIN. You
8 # do not need any sort of license or agreement to use or copy this
9 # software. You may also copyright this software yourself, and/or
10 # relicense it under any terms you want, at any time and at no cost.
11 # This allows you (among other things) to include this software with
12 # other packages so that the user does not need to download and
13 # install make+ separately.
15 # The user can add more exclude patterns by adding to or overriding
16 # this variable. Each pattern is a wildcard passed to the -X option
18 MP_DIST_EXCLUDE = build-* makeplus-* CVS .\#* *~ *.old core
20 # Default name for the source distribution.
21 MP_SRC_DIST = $(PACKAGE)-$(VERSION).tar.gz
23 # Default name for the binary distribution.
24 MP_BIN_DIST = $(PACKAGE)-$(VERSION).bin.tar.gz
26 # Default name for the binary manifest.
27 MP_BIN_MANIFEST = MANIFEST.bin
29 # If set then bundle a copy of make+ with source distributions.
30 # (Note: Doesn't work on platforms with losing non-GNU 'tar').
33 # Build a source distribution.
35 rm -rf $(PACKAGE)-$(VERSION)
37 mkdir $(PACKAGE)-$(VERSION)
38 tar -cf - -X mp-dist.ex $(EXTRA_DIST) -C .. . | \
39 tar -xf - -C $(PACKAGE)-$(VERSION)
40 if [ -n "$(MP_BUNDLE)" -a -r "$(MAKEPLUS_HOME)/makeplus.tar.gz" ]; \
42 gzip -d -c $(MAKEPLUS_HOME)/makeplus.tar.gz | \
43 tar -xf - -C $(PACKAGE)-$(VERSION); \
44 cp $(MAKEPLUS_HOME)/README.make+_for_bundles \
45 $(PACKAGE)-$(VERSION)/README.make+; \
47 tar -cf - $(PACKAGE)-$(VERSION) | gzip --best > $(MP_SRC_DIST)
48 rm -rf $(PACKAGE)-$(VERSION)
52 @for ex in $(MP_DIST_EXCLUDE); do echo $$ex; done > mp-dist.ex
54 # Build a binary distribution.
55 # XXX What's the standard name for this target?
60 $(MAKE) -f $(srcdir)/$(_mp_makefile) DESTDIR=mp-bindist install
61 tar -cf - -C mp-bindist . | gzip --best > $(MP_BIN_DIST)
64 # Build a manifest for the binary distribution.
68 $(MAKE) -f $(srcdir)/$(_mp_makefile) DESTDIR=mp-bindist install
69 find mp-bindist \! -type d | sed 's|^mp-bindist||' > $(MP_BIN_MANIFEST)
72 .PHONY: dist bindist mp_manifest_bin