2 # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of version 2 of the GNU General Public License as
6 # published by the Free Software Foundation.
8 # This program is distributed in the hope that it would be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 # Further, this software is distributed without any warranty that it is
13 # free of the rightful claim of any third person regarding infringement
14 # or the like. Any license provided herein, whether implied or
15 # otherwise, applies only to this software file. Patent licenses, if
16 # any, provided herein do not apply to combinations of this program with
17 # other software, or any other product whatsoever.
19 # You should have received a copy of the GNU General Public License along
20 # with this program; if not, write the Free Software Foundation, Inc., 59
21 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 # Mountain View, CA 94043, or:
28 # For further information regarding this notice, see:
30 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
34 include $(TOPDIR
)/include/builddefs
37 SRCTAR
=$(PACKAGE_NAME
)-$(PACKAGE_VERSION
).src.
tar.gz
38 SRCTAR2
=$(PACKAGE_NAME
)_
$(PACKAGE_VERSION
).orig.
tar.gz
40 LDIRT
= $(MANIFEST
) $(SRCTAR
) $(SRCTAR2
) bin-manifest
$(TOPDIR
)/$(PACKAGE_NAME
)-$(PACKAGE_VERSION
)
42 # for clean and clobber
45 # nothing to build here (it's all packaging)
50 # Symlink in the TOPDIR is used to pack files relative to
51 # product-version directory.
52 $(MANIFEST
) : $(_FORCE
)
53 @if
[ ! -L
$(TOPDIR
)/$(PACKAGE_NAME
)-$(PACKAGE_VERSION
) ] ; then \
54 $(LN_S
) .
$(TOPDIR
)/$(PACKAGE_NAME
)-$(PACKAGE_VERSION
) ; \
56 @CDIR
=`pwd`; cd
$(TOPDIR
); \
57 $(MAKE
) --no-print-directory source | \
58 sed
-e
's/^\./$(PACKAGE_NAME)-$(PACKAGE_VERSION)/' > $$CDIR/$@
;\
59 if
[ $$?
-ne
0 ] ; then \
63 $(TAR
) -T
$$CDIR/$@
-cf
- |
$(ZIP
) --best
> $$CDIR/$(SRCTAR
); \
64 $(LN_S
) $$CDIR/$(SRCTAR
) $$CDIR/$(SRCTAR2
); \
67 dist : default
$(MANIFEST
)
68 @DIST_MANIFEST
=`pwd`/bin-manifest
; DIST_ROOT
=/tmp
/$$$$; \
69 export DIST_MANIFEST DIST_ROOT
; \
70 rm -f
$$DIST_MANIFEST; \
71 echo
=== install === && $(MAKE
) -C
$(TOPDIR
) install || exit
$$?
; \
72 if
[ -x
$(TAR
) ]; then \
73 ( echo
"=== tar ===" && $(MAKEF
) -C
tar $@ || exit
$$?
); \
75 if
[ -x
$(RPM
) ]; then \
76 ( echo
"=== rpm ===" && $(MAKEF
) -C rpm
$@ || exit
$$?
); \
78 test -z
"$$KEEP_DIST_ROOT" ||
rm -rf
$$DIST_ROOT; echo Done