]>
Commit | Line | Data |
---|---|---|
fc49813f | 1 | # |
82805b60 | 2 | # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
dfc130f3 | 3 | # |
fc49813f NS |
4 | |
5 | TOPDIR = . | |
6 | HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes || echo no) | |
7 | ||
8 | ifeq ($(HAVE_BUILDDEFS), yes) | |
9 | include $(TOPDIR)/include/builddefs | |
10 | endif | |
11 | ||
07c561fe AG |
12 | CONFIGURE = aclocal.m4 configure config.guess config.sub \ |
13 | ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \ | |
14 | m4/ltversion.m4 m4/lt~obsolete.m4 \ | |
15 | include/builddefs include/platform_defs.h | |
16 | LSRCFILES = configure.in Makepkgs install-sh README VERSION $(CONFIGURE) | |
f937adac | 17 | |
6c6508ec | 18 | LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ |
99ec8857 | 19 | Logs/* built .census install.* install-dev.* *.gz |
f937adac | 20 | |
bf3256b2 | 21 | LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk |
c988ea91 | 22 | TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \ |
2a519b73 | 23 | mdrestore repair rtcp m4 man doc po debian build |
fc49813f | 24 | |
bf3256b2 | 25 | SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS) |
2a519b73 | 26 | |
07c561fe | 27 | default: configure include/builddefs include/platform_defs.h |
fc49813f NS |
28 | ifeq ($(HAVE_BUILDDEFS), no) |
29 | $(MAKE) -C . $@ | |
30 | else | |
2a519b73 | 31 | $(MAKE) $(SUBDIRS) |
fc49813f NS |
32 | endif |
33 | ||
2a519b73 | 34 | # tool/lib dependencies |
bf3256b2 | 35 | $(LIB_SUBDIRS) $(TOOL_SUBDIRS): include |
2a519b73 BN |
36 | copy mdrestore: libxfs |
37 | db logprint: libxfs libxlog | |
bf3256b2 | 38 | fsr: libhandle |
2a519b73 BN |
39 | growfs: libxfs libxcmd |
40 | io: libxcmd libhandle | |
41 | mkfs: libxfs libdisk | |
42 | quota: libxcmd | |
43 | repair: libxfs libxlog | |
44 | ||
fc49813f NS |
45 | ifeq ($(HAVE_BUILDDEFS), yes) |
46 | include $(BUILDRULES) | |
47 | else | |
48 | clean: # if configure hasn't run, nothing to clean | |
49 | endif | |
50 | ||
07c561fe AG |
51 | # Recent versions of libtool require the -i option for copying auxiliary |
52 | # files (config.sub, config.guess, install-sh, ltmain.sh), while older | |
53 | # versions will copy those files anyway, and don't understand -i. | |
54 | LIBTOOLIZE_INSTALL = `libtoolize -n -i >/dev/null 2>/dev/null && echo -i` | |
55 | ||
fd81c504 | 56 | configure include/builddefs: |
07c561fe AG |
57 | libtoolize -c $(LIBTOOLIZE_INSTALL) -f |
58 | cp include/install-sh . | |
59 | aclocal -I m4 | |
fc49813f | 60 | autoconf |
6c6508ec NS |
61 | ./configure \ |
62 | --prefix=/ \ | |
63 | --exec-prefix=/ \ | |
64 | --sbindir=/sbin \ | |
65 | --bindir=/usr/sbin \ | |
66 | --libdir=/lib \ | |
67 | --libexecdir=/usr/lib \ | |
82805b60 | 68 | --enable-lib64=yes \ |
6c6508ec NS |
69 | --includedir=/usr/include \ |
70 | --mandir=/usr/share/man \ | |
71 | --datadir=/usr/share \ | |
72 | $$LOCAL_CONFIGURE_OPTIONS | |
f937adac | 73 | touch .census |
fc49813f | 74 | |
2a519b73 BN |
75 | include/platform_defs.h: include/builddefs |
76 | ## Recover from the removal of $@ | |
77 | @if test -f $@; then :; else \ | |
78 | rm -f include/builddefs; \ | |
79 | $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ | |
80 | fi | |
81 | ||
2a519b73 | 82 | install: default $(addsuffix -install,$(SUBDIRS)) |
fc49813f NS |
83 | $(INSTALL) -m 755 -d $(PKG_DOC_DIR) |
84 | $(INSTALL) -m 644 README $(PKG_DOC_DIR) | |
85 | ||
2a519b73 BN |
86 | install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) |
87 | ||
88 | install-qa: install $(addsuffix -install-qa,$(SUBDIRS)) | |
89 | ||
90 | %-install: | |
91 | $(MAKE) -C $* install | |
92 | ||
93 | %-install-dev: | |
94 | $(MAKE) -C $* install-dev | |
fc49813f | 95 | |
2a519b73 BN |
96 | %-install-qa: |
97 | $(MAKE) -C $* install-qa | |
5e656dbb | 98 | |
fc49813f NS |
99 | realclean distclean: clean |
100 | rm -f $(LDIRT) $(CONFIGURE) | |
07c561fe | 101 | rm -f include/builddefs include/config.h install-sh libtool |
16c44ed2 | 102 | rm -rf autom4te.cache Logs |