]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - build/Makefile
cmd/xfs/bmap/Makefile 1.8 Renamed to cmd/xfsprogs/bmap/Makefile
[thirdparty/xfsprogs-dev.git] / build / Makefile
1 #
2 # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
3 #
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.
7 #
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.
11 #
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.
18 #
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.
22 #
23 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 # Mountain View, CA 94043, or:
25 #
26 # http://www.sgi.com
27 #
28 # For further information regarding this notice, see:
29 #
30 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31 #
32
33 TOPDIR = ..
34 include $(TOPDIR)/include/builddefs
35
36 MANIFEST=src-manifest
37 SRCTAR=$(PACKAGE_NAME)-$(PACKAGE_VERSION).src.tar.gz
38 SRCTAR2=$(PACKAGE_NAME)_$(PACKAGE_VERSION).orig.tar.gz
39
40 LDIRT = $(MANIFEST) $(SRCTAR) $(SRCTAR2) bin-manifest $(TOPDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
41
42 # for clean and clobber
43 SUBDIRS = tar rpm deb
44
45 # nothing to build here (it's all packaging)
46 default install :
47
48 include $(BUILDRULES)
49
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) ; \
55 fi
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 \
60 exit 1; \
61 else \
62 unset TAPE; \
63 $(TAR) -T $$CDIR/$@ -cf - | $(ZIP) --best > $$CDIR/$(SRCTAR); \
64 $(LN_S) $$CDIR/$(SRCTAR) $$CDIR/$(SRCTAR2); \
65 fi
66
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 $$? ); \
74 fi; \
75 if [ -x $(RPM) ]; then \
76 ( echo "=== rpm ===" && $(MAKEF) -C rpm $@ || exit $$? ); \
77 fi; \
78 test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done