2 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
6 include $(TOPDIR)/include/builddefs
9 SRCTAR=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz
11 LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-*
13 # for clean and clobber
16 # nothing to build here (it's all packaging)
17 default install install-dev install-lib:
21 # Symlink in the TOPDIR is used to pack files relative to
22 # product-version directory.
23 $(MANIFEST) : $(_FORCE)
24 @if [ ! -L $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ] ; then \
25 $(LN_S) . $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ; \
27 @CDIR=`pwd`; cd $(TOPDIR); \
28 $(MAKE) --no-print-directory source | \
29 sed -e 's/^\./$(PKG_NAME)-$(PKG_VERSION)/' > $$CDIR/$@ ;\
30 if [ $$? -ne 0 ] ; then \
34 $(TAR) -T $$CDIR/$@ -cf - | $(ZIP) --best > $$CDIR/$(SRCTAR); \
35 echo Wrote: $$CDIR/$(SRCTAR); \
38 dist : default $(MANIFEST)
39 @DIST_MANIFEST=`pwd`/bin-manifest; DIST_ROOT=/tmp/$$$$; \
40 export DIST_MANIFEST DIST_ROOT; \
41 rm -f $$DIST_MANIFEST; \
42 echo === install === && $(MAKE) -C $(TOPDIR) install || exit $$?; \
43 if [ -x $(TAR) ]; then \
44 ( echo "=== tar ===" && $(MAKEF) -C tar $@ || exit $$? ); \
46 if [ -x $(RPMBUILD) ]; then \
47 ( echo "=== rpm ===" && $(MAKEF) -C rpm $@ || exit $$? ); \
49 test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done