xfstests 050: ignore duplicates reported by repquota
[xfstests-dev.git] / Makefile
1 #
2 # Copyright (c) 2000-2008 Silicon Graphics, Inc.  All Rights Reserved.
3 #
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
12 TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group)
13 CONFIGURE = configure include/builddefs include/config.h
14 DMAPI_MAKEFILE = dmapi/Makefile
15 LSRCFILES = configure configure.in aclocal.m4 README VERSION
16 LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
17         check.log check.time
18
19 LIB_SUBDIRS = include lib
20 TOOL_SUBDIRS = ltp src m4
21
22 SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
23
24 default: include/builddefs include/config.h $(DMAPI_MAKEFILE) new remake check $(TESTS)
25 ifeq ($(HAVE_BUILDDEFS), no)
26         $(MAKE) $@
27 else
28         $(MAKE) $(SUBDIRS)
29         # automake doesn't always support "default" target 
30         # so do dmapi make explicitly with "all"
31 ifeq ($(HAVE_DMAPI), true)
32         $(MAKE) -C $(TOPDIR)/dmapi all
33 endif
34 endif
35
36 # tool/lib dependencies
37 src ltp: lib
38
39 ifeq ($(HAVE_BUILDDEFS), yes)
40 include $(BUILDRULES)
41 else
42 clean:  # if configure hasn't run, nothing to clean
43 endif
44
45 configure include/builddefs:
46         autoheader
47         autoconf
48         ./configure \
49                 --libexecdir=/usr/lib \
50                 --enable-lib64=yes
51
52 include/config.h: include/builddefs
53 ## Recover from the removal of $@
54         @if test -f $@; then :; else \
55                 rm -f include/builddefs; \
56                 $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \
57         fi
58
59 $(DMAPI_MAKEFILE):
60         cd $(TOPDIR)/dmapi/ ; ./configure
61
62 aclocal.m4::
63         aclocal --acdir=`pwd`/m4 --output=$@
64
65 install: default $(addsuffix -install,$(SUBDIRS))
66         $(INSTALL) -m 755 -d $(PKG_LIB_DIR)
67         $(INSTALL) -m 755 check $(PKG_LIB_DIR)
68         $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)
69         $(INSTALL) -m 755 run.* $(PKG_LIB_DIR)
70         $(INSTALL) -m 644 group $(PKG_LIB_DIR)
71         $(INSTALL) -m 644 randomize.awk $(PKG_LIB_DIR)
72         $(INSTALL) -m 644 [0-9]??.* $(PKG_LIB_DIR)
73         $(INSTALL) -m 644 common* $(PKG_LIB_DIR)
74
75 # Nothing.
76 install-dev install-lib:
77
78 %-install:
79         $(MAKE) -C $* install
80
81 realclean distclean: clean
82         rm -f $(LDIRT) $(CONFIGURE)
83         rm -rf autom4te.cache Logs