libtool/tests/Makefile.am
Gary V. Vaughan e9b2b3f264 Since defs can change (path to grep for example) when it is made
for a different host, it can't be shipped.  That also means that
defs will always be generated in the build tree, so each test case
can have the srcdir discovery factored away into tests/defs.in:

* Makefile.am (EXTRA_DIST): s/defs/defs.in/g
* tests/Makefile.am (defs): New rule to remake defs from the
parent directory's Makefile.
* tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/demo-conf.test,
tests/demo-deplibs.test, tests/demo-exec.test,
tests/demo-hardcode.test, tests/demo-inst.test,
tests/demo-make.test, tests/demo-nofast.test,
tests/demo-noinst-link.test, tests/demo-nopic.test,
tests/demo-pic.test, tests/demo-relink.test,
tests/demo-shared.test, tests/demo-static.test,
tests/demo-unst.test, tests/depdemo-conf.test,
tests/depdemo-exec.test, tests/depdemo-inst.test,
tests/depdemo-make.test, tests/depdemo-nofast.test,
tests/depdemo-relink.test, tests/depdemo-shared.test,
tests/depdemo-static.test, tests/depdemo-unst.test,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/link-2.test, tests/link.test,
tests/mdemo-conf.test, tests/mdemo-dryrun.test,
tests/mdemo-exec.test, tests/mdemo-inst.test,
tests/mdemo-make.test, tests/mdemo-shared.test,
tests/mdemo-static.test, tests/mdemo-unst.test,
tests/mdemo2-conf.test, tests/mdemo2-exec.test,
tests/mdemo2-make.test, tests/nomode.test, tests/pdemo-conf.test,
tests/pdemo-exec.test, tests/pdemo-inst.test,
tests/pdemo-make.test, tests/quote.test, tests/sh.test,
tests/suffix.test, tests/tagdemo-conf.test,
tests/tagdemo-exec.test, tests/tagdemo-make.test,
tests/tagdemo-shared.test, tests/tagdemo-static.test,
tests/tagtrace.test: Removed srcdir discovery boilerplate...
* tests/defs.in: ...and put it here.
2004-09-23 13:07:15 +00:00

155 lines
5.3 KiB
Makefile

## Process this file with automake to produce Makefile.in
##
## Copyright (C) 2003, 2004 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; see the file COPYING. If not, write to
## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
## Boston, MA 02111-1307, USA.
DISTCLEANFILES =
CXX_TESTS = \
tagdemo-static.test tagdemo-make.test tagdemo-exec.test \
tagdemo-conf.test tagdemo-make.test tagdemo-exec.test \
tagdemo-shared.test tagdemo-make.test tagdemo-exec.test
F77_TESTS = \
f77demo-static.test f77demo-make.test f77demo-exec.test \
f77demo-conf.test f77demo-make.test f77demo-exec.test \
f77demo-shared.test f77demo-make.test f77demo-exec.test
COMMON_TESTS = \
link.test link-2.test nomode.test \
quote.test sh.test suffix.test tagtrace.test \
cdemo-static.test cdemo-make.test cdemo-exec.test \
demo-static.test demo-make.test demo-exec.test \
demo-inst.test demo-unst.test \
depdemo-static.test depdemo-make.test depdemo-exec.test \
depdemo-inst.test depdemo-unst.test \
mdemo-static.test mdemo-make.test mdemo-exec.test \
mdemo-inst.test mdemo-unst.test \
cdemo-conf.test cdemo-make.test cdemo-exec.test \
demo-conf.test demo-make.test demo-exec.test \
demo-inst.test demo-unst.test demo-deplibs.test \
depdemo-conf.test depdemo-make.test depdemo-exec.test \
depdemo-inst.test depdemo-unst.test \
mdemo-conf.test mdemo-make.test mdemo-exec.test \
mdemo-inst.test mdemo-unst.test mdemo-dryrun.test \
mdemo2-conf.test mdemo2-make.test mdemo2-exec.test \
pdemo-conf.test pdemo-make.test pdemo-exec.test \
pdemo-inst.test \
demo-nofast.test demo-make.test demo-exec.test \
demo-inst.test demo-unst.test \
depdemo-nofast.test depdemo-make.test depdemo-exec.test \
depdemo-inst.test depdemo-unst.test \
demo-pic.test demo-make.test demo-exec.test \
demo-nopic.test demo-make.test demo-exec.test \
cdemo-shared.test cdemo-make.test cdemo-exec.test \
demo-shared.test demo-make.test demo-exec.test demo-inst.test \
demo-hardcode.test demo-relink.test demo-noinst-link.test \
demo-unst.test \
depdemo-shared.test depdemo-make.test depdemo-exec.test \
depdemo-inst.test depdemo-relink.test depdemo-unst.test \
mdemo-shared.test mdemo-make.test mdemo-exec.test \
mdemo-inst.test mdemo-unst.test
if HAVE_CXX
if HAVE_F77
TESTS = $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS)
else
TESTS = $(COMMON_TESTS) $(CXX_TESTS)
endif
else
if HAVE_F77
TESTS = $(COMMON_TESTS) $(F77_TESTS)
else
TESTS = $(COMMON_TESTS)
endif
endif
demo-conf.test: $(top_builddir)/libtool
$(top_builddir)/libtool:
cd $(top_builddir) && $(MAKE) all
# Be sure to reexport important environment variables.
TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" F77="$(F77)" \
FFLAGS="$(FFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CPP="$(CPP)"
EXTRA_DIST = defs.in $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS)
DIST_SUBDIRS = $(CONF_SUBDIRS)
# FIXME: Automake-1.7b (at least) only honours DIST_SUBDIRS if SUBDIRS is
# also set. Remove this line when that bug is fixed.
SUBDIRS = .
# We need to remove any files that the above tests created.
clean-local:
-for dir in cdemo demo depdemo f77demo mdemo mdemo2 pdemo tagdemo; \
do \
test -f $$dir/Makefile && ( cd $$dir && $(MAKE) distclean; ); \
done
rm -rf _inst
## ------------ ##
## package.m4. ##
## ------------ ##
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
{ \
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
} >$(srcdir)/package.m4
## ------------ ##
## Test suite. ##
## ------------ ##
$(TESTS): defs
defs: defs.in ../Makefile.am
cd .. && $(MAKE) $(AM_MAKEFLAGS) tests/defs
DISTCLEANFILES += defs
TESTSUITE_AT = \
testsuite.at \
demo.at fortran.at tools.at
TESTSUITE = testsuite
#EXTRA_DIST = $(TESTSUITE_AT) local.at atlocal.in package.m4
#check-local: atconfig $(TESTSUITE)
# $(SHELL) $(srcdir)/$(TESTSUITE)
#clean-local:
# $(srcdir)/testsuite --clean
AUTOM4TE = autom4te
AUTOTEST = $(AUTOM4TE) --language=autotest
$(srcdir)/$(TESTSUITE): $(srcdir)/package.m4 local.at $(TESTSUITE_AT)
$(AUTOTEST) -I $(srcdir) testsuite.at -o $@
atconfig: $(top_builddir)/config.status
cd $(top_builddir) && ./config.status tests/$@
# Run the test suite on the *installed* tree.
#installcheck-local:
$(SHELL) $(srcdir)/$(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin