2 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
6 HAVE_BUILDDEFS
= $(shell test -f
$(TOPDIR
)/include/builddefs
&& echo yes || echo no
)
8 ifeq ($(HAVE_BUILDDEFS
), yes
)
9 include $(TOPDIR
)/include/builddefs
12 SRCDIR
= $(PKG_NAME
)-$(PKG_VERSION
)
13 SRCTAR
= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 CONFIGURE
= aclocal.m4 configure config.guess config.sub install-sh ltmain.sh
16 LSRCFILES
= configure.in release.sh README VERSION
$(CONFIGURE
)
18 LDIRT
= config.log .dep config.status config.cache confdefs.h conftest
* \
19 built .census
install.
* install-dev.
* *.gz autom4te.cache
/* libtool \
20 include/builddefs
include/platform_defs.h
22 ifeq ($(HAVE_BUILDDEFS
), yes
)
27 LIB_SUBDIRS
= libxfs libxlog libxcmd libhandle
$(LDISK
)
28 TOOL_SUBDIRS
= copy db estimate fsck fsr growfs io logprint mkfs quota \
29 mdrestore repair rtcp m4 man doc po debian
31 ifneq ($(ENABLE_BLKID
), yes
)
32 LIB_SUBDIRS
+= libdisk
35 SUBDIRS
= include $(LIB_SUBDIRS
) $(TOOL_SUBDIRS
)
37 default
: include/builddefs
include/platform_defs.h
38 ifeq ($(HAVE_BUILDDEFS
), no
)
44 # tool/lib dependencies
45 $(LIB_SUBDIRS
) $(TOOL_SUBDIRS
): include
46 copy mdrestore
: libxfs
47 db logprint
: libxfs libxlog
49 growfs
: libxfs libxcmd
53 repair
: libxfs libxlog
55 ifneq ($(ENABLE_BLKID
), yes
)
59 ifeq ($(HAVE_BUILDDEFS
), yes
)
62 clean: # if configure hasn't run, nothing to clean
65 # Recent versions of libtool require the -i option for copying auxiliary
66 # files (config.sub, config.guess, install-sh, ltmain.sh), while older
67 # versions will copy those files anyway, and don't understand -i.
68 LIBTOOLIZE_INSTALL
= `libtoolize -n -i >/dev/null 2>/dev/null && echo -i`
71 libtoolize
-c
$(LIBTOOLIZE_INSTALL
) -f
72 cp
include/install-sh .
76 include/builddefs
: configure
77 .
/configure
$$LOCAL_CONFIGURE_OPTIONS
79 include/platform_defs.h
: include/builddefs
80 ## Recover from the removal of $@
81 @if
test -f
$@
; then
:; else \
82 rm -f
include/builddefs
; \
83 $(MAKE
) $(AM_MAKEFLAGS
) include/builddefs
; \
86 install: default
$(addsuffix -install,$(SUBDIRS
))
87 $(INSTALL
) -m
755 -d
$(PKG_DOC_DIR
)
88 $(INSTALL
) -m
644 README
$(PKG_DOC_DIR
)
90 install-dev
: default
$(addsuffix -install-dev
,$(SUBDIRS
))
92 install-qa
: install $(addsuffix -install-qa
,$(SUBDIRS
))
98 $(MAKE
) -C
$* install-dev
101 $(MAKE
) -C
$* install-qa
110 # All this gunk is to allow for a make dist on an unconfigured tree
112 dist: include/builddefs
include/platform_defs.h default
113 ifeq ($(HAVE_BUILDDEFS
), no
)
119 deb
: include/builddefs
include/platform_defs.h
120 ifeq ($(HAVE_BUILDDEFS
), no
)
126 cd
$(SRCDIR
) && dpkg-buildpackage
129 $(SRCDIR
) : $(_FORCE
)
133 $(SRCTAR
) : default
$(SRCDIR
)
135 unset TAPE
; $(TAR
) -cf
- $(SRCDIR
) |
$(ZIP
) --best
> $@
&& \