finish off the tests restructuring.
authorNathan Scott <nathans@sgi.com>
Tue, 16 Jan 2001 04:12:07 +0000 (04:12 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 16 Jan 2001 04:12:07 +0000 (04:12 +0000)
Makefile
src/Makefile

index ef6e32398e559397176191e955e8dca6f4cec6bf..f6eb2bb75310e6daec75fc8e9f0f0b9b1cdd4068 100644 (file)
--- a/Makefile
+++ b/Makefile
 # 
 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 #
-#
-# $Id: Makefile,v 2.195 1999/10/19 02:07:28 kenmcd Exp $
-#
 
-TOPDIR = ..
+TOPDIR = .
+HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes || echo no)
+
+ifeq ($(HAVE_BUILDDEFS), yes)
 include $(TOPDIR)/include/builddefs
+endif
 
 TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group)
-LDIRT = *.bad *.new *.core *.full *.raw core a.out *.bak check.log check.time
-SUBDIRS = src
+CONFIGURE = configure include/builddefs
+LSRCFILES = configure configure.in
+LDIRT = *.bad *.new *.core *.full *.raw core a.out *.bak \
+       check.log check.time config.* conftest*
 
-default: new remake check $(TESTS) $(SUBDIRS)
-       $(SUBDIRS_MAKERULE)
+SUBDIRS = include src misc man
 
-install:
+default: $(CONFIGURE) new remake check $(TESTS)
+ifeq ($(HAVE_BUILDDEFS), no)
+       $(MAKE) -C . $@
+else
+       $(SUBDIRS_MAKERULE)
+endif
 
+ifeq ($(HAVE_BUILDDEFS), yes)
 include $(BUILDRULES)
+else
+clean:  # if configure hasn't run, nothing to clean
+endif
+
+$(CONFIGURE): configure.in include/builddefs.in
+       rm -f config.cache
+       autoconf
+       ./configure
+
+install install-dev: default
+       $(SUBDIRS_MAKERULE)
+
+realclean distclean: clean
+       rm -f $(LDIRT) $(CONFIGURE)
index 3cdf0ad253e4dc8a812aa914fa2067b329180bc6..e3b79a38b743058a35906ddbcbd5d3aed5a98793 100644 (file)
 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 #
 
-TOPDIR = ../..
+TOPDIR = ..
 include $(TOPDIR)/include/builddefs
 
 TARGETS = alloc bstat dbtest devzero dirstress fault feature fsstress \
          fill fill2 holes ioctl loggen lstat64 nametest permname \
-         randholes testrmt truncfile usemem runas
+         randholes truncfile usemem runas
 CFILES = $(TARGETS:=.c) random.c
 HFILES = global.h
 LDIRT = $(TARGETS)
 
-DBMLIB = -lgdbm
-RMTLIB = $(TOPDIR)/dump/librmt/librmt.a
-
 default: $(TARGETS)
 
 include $(BUILDRULES)
@@ -63,21 +60,17 @@ FSSTRESS_OBJECTS = fsstress.o random.o $(LIBATTR)
 fsstress:      $(HFILES) $(FSSTRESS_OBJECTS)
                $(CCF) -o $@ $(LDFLAGS) $(FSSTRESS_OBJECTS) $(LDLIBS)
 
-DBTEST_OBJECTS = dbtest.o random.o $(DBMLIB)
+DBTEST_OBJECTS = dbtest.o random.o
 dbtest:                $(HFILES) $(DBTEST_OBJECTS)
-               $(CCF) -o $@ $(LDFLAGS) $(DBTEST_OBJECTS) $(LDLIBS)
+               $(CCF) -o $@ $(LDFLAGS) $(DBTEST_OBJECTS) $(LIBGDBM) $(LDLIBS)
 
 NAMETEST_OBJECTS = nametest.o random.o
 nametest:      $(HFILES) $(NAMETEST_OBJECTS)
                $(CCF) -o $@ $(LDFLAGS) $(NAMETEST_OBJECTS) $(LDLIBS)
 
-BSTAT_OBJECTS = bstat.o $(LIBHANDLE)
+BSTAT_OBJECTS = bstat.o
 bstat:         $(HFILES) $(BSTAT_OBJECTS)
-               $(CCF) -o $@ $(LDFLAGS) $(BSTAT_OBJECTS) $(LDLIBS)
-
-TESTRMT_OBJECTS = testrmt.o $(RMTLIB)
-testrmt:       $(TESTRMT_OBJECTS)
-               $(CCF) -o $@ $(LDFLAGS) $(TESTRMT_OBJECTS) $(LDLIBS)
+               $(CCF) -o $@ $(LDFLAGS) $(BSTAT_OBJECTS) $(LIBHANDLE) $(LDLIBS)
 
 LOGGEN_OBJECTS = loggen.o $(LIBXFS)
 loggen:                $(HFILES) $(LOGGEN_OBJECTS)