2 # Copyright (c) 2000-2008 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 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* \
19 LIB_SUBDIRS = include lib
20 TOOL_SUBDIRS = ltp src m4
22 SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
24 default: include/builddefs include/config.h $(DMAPI_MAKEFILE) new remake check $(TESTS)
25 ifeq ($(HAVE_BUILDDEFS), no)
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
36 # tool/lib dependencies
39 ifeq ($(HAVE_BUILDDEFS), yes)
42 clean: # if configure hasn't run, nothing to clean
49 --libexecdir=/usr/lib \
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; \
60 cd $(TOPDIR)/dmapi/ ; ./configure
63 aclocal --acdir=`pwd`/m4 --output=$@
65 install install-dev install-lib:
67 realclean distclean: clean
68 rm -f $(LDIRT) $(CONFIGURE)
69 rm -rf autom4te.cache Logs