2 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
5 ifeq ("$(origin V)", "command line")
12 ifeq ($(BUILD_VERBOSE
),1)
18 MAKEOPTS
= --no-print-directory Q
=$(Q
)
21 HAVE_BUILDDEFS
= $(shell test -f
$(TOPDIR
)/include/builddefs
&& echo yes || echo no
)
23 ifeq ($(HAVE_BUILDDEFS
), yes
)
24 include $(TOPDIR
)/include/builddefs
27 SRCDIR
= $(PKG_NAME
)-$(PKG_VERSION
)
28 SRCTAR
= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
30 CONFIGURE
= aclocal.m4 configure config.guess config.sub install-sh ltmain.sh
31 LSRCFILES
= configure.in release.sh README VERSION
$(CONFIGURE
)
33 LDIRT
= config.log .ltdep .dep config.status config.cache confdefs.h \
34 conftest
* built .census
install.
* install-dev.
* *.gz \
35 autom4te.cache
/* libtool
include/builddefs
include/platform_defs.h
37 ifeq ($(HAVE_BUILDDEFS
), yes
)
42 LIB_SUBDIRS
= libxfs libxlog libxcmd libhandle libdisk
43 TOOL_SUBDIRS
= copy db estimate fsck fsr growfs io logprint mkfs quota \
44 mdrestore repair rtcp m4 man doc po debian
46 SUBDIRS
= include $(LIB_SUBDIRS
) $(TOOL_SUBDIRS
)
48 default
: include/builddefs
include/platform_defs.h
49 ifeq ($(HAVE_BUILDDEFS
), no
)
50 $(Q
)$(MAKE
) $(MAKEOPTS
) -C .
$@
52 $(Q
)$(MAKE
) $(MAKEOPTS
) $(SUBDIRS
)
55 # tool/lib dependencies
56 $(LIB_SUBDIRS
) $(TOOL_SUBDIRS
): include
57 copy mdrestore
: libxfs
58 db logprint
: libxfs libxlog
60 growfs
: libxfs libxcmd
64 repair
: libxfs libxlog
66 ifneq ($(ENABLE_BLKID
), yes
)
70 ifeq ($(HAVE_BUILDDEFS
), yes
)
73 clean: # if configure hasn't run, nothing to clean
76 # Recent versions of libtool require the -i option for copying auxiliary
77 # files (config.sub, config.guess, install-sh, ltmain.sh), while older
78 # versions will copy those files anyway, and don't understand -i.
79 LIBTOOLIZE_INSTALL
= `libtoolize -n -i >/dev/null 2>/dev/null && echo -i`
82 libtoolize
-c
$(LIBTOOLIZE_INSTALL
) -f
83 cp
include/install-sh .
87 include/builddefs
: configure
88 .
/configure
$$LOCAL_CONFIGURE_OPTIONS
90 include/platform_defs.h
: include/builddefs
91 ## Recover from the removal of $@
92 @if
test -f
$@
; then
:; else \
93 rm -f
include/builddefs
; \
94 $(MAKE
) $(MAKEOPTS
) $(AM_MAKEFLAGS
) include/builddefs
; \
97 install: $(addsuffix -install,$(SUBDIRS
))
98 $(INSTALL
) -m
755 -d
$(PKG_DOC_DIR
)
99 $(INSTALL
) -m
644 README
$(PKG_DOC_DIR
)
101 install-dev
: $(addsuffix -install-dev
,$(SUBDIRS
))
103 install-qa
: install $(addsuffix -install-qa
,$(SUBDIRS
))
106 @echo
"Installing $@"
107 $(Q
)$(MAKE
) $(MAKEOPTS
) -C
$* install
110 @echo
"Installing $@"
111 $(Q
)$(MAKE
) $(MAKEOPTS
) -C
$* install-dev
114 @echo
"Installing $@"
115 $(Q
)$(MAKE
) $(MAKEOPTS
) -C
$* install-qa
121 $(Q
)rm -f
$(CONFIGURE
)
124 # All this gunk is to allow for a make dist on an unconfigured tree
126 dist: include/builddefs
include/platform_defs.h default
127 ifeq ($(HAVE_BUILDDEFS
), no
)
128 $(Q
)$(MAKE
) $(MAKEOPTS
) -C .
$@
130 $(Q
)$(MAKE
) $(MAKEOPTS
) $(SRCTAR
)
133 deb
: include/builddefs
include/platform_defs.h
134 ifeq ($(HAVE_BUILDDEFS
), no
)
135 $(Q
)$(MAKE
) $(MAKEOPTS
) -C .
$@
137 $(Q
)$(MAKE
) $(MAKEOPTS
) $(SRCDIR
)
138 $(Q
)$(MAKE
) $(MAKEOPTS
) -C po
139 $(Q
)$(MAKE
) $(MAKEOPTS
) source-link
140 $(Q
)cd
$(SRCDIR
) && dpkg-buildpackage
143 $(SRCDIR
) : $(_FORCE
)
147 $(SRCTAR
) : default
$(SRCDIR
)
148 $(Q
)$(MAKE
) $(MAKEOPTS
) source-link
149 unset TAPE
; $(TAR
) -cf
- $(SRCDIR
) |
$(ZIP
) --best
> $@
&& \