2 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 include $(TOPDIR)/include/builddefs
23 SRCTAR=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz
25 LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-*
27 # for clean and clobber
30 # nothing to build here (it's all packaging)
31 default install install-dev install-lib:
35 # Symlink in the TOPDIR is used to pack files relative to
36 # product-version directory.
37 $(MANIFEST) : $(_FORCE)
38 @if [ ! -L $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ] ; then \
39 $(LN_S) . $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ; \
41 @CDIR=`pwd`; cd $(TOPDIR); \
42 $(MAKE) --no-print-directory source | \
43 sed -e 's/^\./$(PKG_NAME)-$(PKG_VERSION)/' > $$CDIR/$@ ;\
44 if [ $$? -ne 0 ] ; then \
48 $(TAR) -T $$CDIR/$@ -cf - | $(ZIP) --best > $$CDIR/$(SRCTAR); \
49 echo Wrote: $$CDIR/$(SRCTAR); \
52 dist : default $(MANIFEST)
53 @DIST_MANIFEST=`pwd`/bin-manifest; DIST_ROOT=/tmp/$$$$; \
54 export DIST_MANIFEST DIST_ROOT; \
55 rm -f $$DIST_MANIFEST; \
56 echo === install === && $(MAKE) -C $(TOPDIR) install || exit $$?; \
57 if [ -x $(TAR) ]; then \
58 ( echo "=== tar ===" && $(MAKEF) -C tar $@ || exit $$? ); \
60 if [ -x $(RPMBUILD) ]; then \
61 ( echo "=== rpm ===" && $(MAKEF) -C rpm $@ || exit $$? ); \
63 test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done