1 ## Makefile.am -- Process this file with automake to produce Makefile.in
3 ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 ## Free Software Foundation, Inc.
5 ## Written by Gary V. Vaughan, 2003
7 ## This file is part of GNU Libtool.
9 ## GNU Libtool is free software; you can redistribute it and/or
10 ## modify it under the terms of the GNU General Public License as
11 ## published by the Free Software Foundation; either version 2 of
12 ## the License, or (at your option) any later version.
14 ## GNU Libtool is distributed in the hope that it will be useful,
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ## GNU General Public License for more details.
19 ## You should have received a copy of the GNU General Public License
20 ## along with GNU Libtool; see the file COPYING. If not, a copy
21 ## can be downloaded from http://www.gnu.org/licenses/gpl.html,
22 ## or obtained by writing to the Free Software Foundation, Inc.,
23 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 ACLOCAL_AMFLAGS = -I libltdl/m4
34 BUILT_SOURCES = libtool libtoolize
39 MAINTAINERCLEANFILES =
46 auxdir = libltdl/config
49 # Using `cd' in backquotes may print the directory name, use this instead:
50 lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
52 MKSTAMP = $(SHELL) $(srcdir)/$(auxdir)/mkstamp
54 timestamp = set dummy `$(MKSTAMP) $(srcdir)`; shift; \
56 *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2" ;; \
60 rebuild = rebuild=:; $(timestamp); correctver=$$1
67 sh_files = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh
68 EXTRA_DIST += bootstrap $(srcdir)/libtoolize.in $(auxdir)/ltmain.m4sh \
69 $(auxdir)/mkstamp $(sh_files) \
70 ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \
71 ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \
72 ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
73 ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
74 ChangeLog.2008 ChangeLog.2009 ChangeLog.2010
75 CLEANFILES += libtool libtoolize libtoolize.tmp \
76 $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
78 ## These are the replacements that need to be made at bootstrap time,
79 ## because they must be static in distributed files, and not accidentally
80 ## changed by configure running on the build machine.
81 bootstrap_edit = sed \
82 -e 's,@MACRO_VERSION\@,$(VERSION),g' \
83 -e "s,@MACRO_REVISION\@,$$correctver,g" \
84 -e "s,@MACRO_SERIAL\@,$$serial,g" \
85 -e 's,@PACKAGE\@,$(PACKAGE),g' \
86 -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
87 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
88 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
89 -e "s,@package_revision\@,$$correctver,g" \
90 -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \
91 -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \
92 -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \
93 -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
94 -e 's,@VERSION\@,$(VERSION),g'
96 ## We build ltversion.m4 here, instead of from config.status,
97 ## because config.status is rerun each time one of configure's
98 ## dependencies change and ltversion.m4 happens to be a configure
99 ## dependency. configure and ltversion.m4 would be rebuilt in
101 ## We used to do this with a 'stamp-vcl' file, but non-gmake builds
102 ## would rerun configure on every invocation, so now we manually
103 ## check the version numbers from the build rule when necessary.
104 ## Use `$(srcdir)/m4' for the benefit of non-GNU makes: this is
105 ## how ltversion.m4 appears in our dependencies.
106 EXTRA_DIST += $(m4dir)/ltversion.in $(srcdir)/$(m4dir)/ltversion.m4
107 $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in configure.ac ChangeLog
108 @target='$(srcdir)/$(m4dir)/ltversion.m4'; $(rebuild); \
109 if test -f "$$target"; then \
110 set dummy `sed -n '/^# serial /p' "$$target"`; shift; \
112 test "$$actualver" = "$$correctver" && rebuild=false; \
114 for prereq in $?; do \
115 case $$prereq in *ChangeLog | *configure.ac);; *) rebuild=:;; esac; \
119 rm -f $(m4dir)/ltversion.tmp; \
120 serial=`echo "$$correctver" | sed 's,^1[.],,g'`; \
121 echo $(bootstrap_edit) \
122 $(srcdir)/$(m4dir)/ltversion.in \> $(srcdir)/$(m4dir)/ltversion.m4; \
124 $(m4dir)/ltversion.in > $(m4dir)/ltversion.tmp; \
125 chmod a-w $(m4dir)/ltversion.tmp; \
126 mv -f $(m4dir)/ltversion.tmp $(m4dir)/ltversion.m4; \
129 ## And for similar reasons, ltmain.sh can't be built from config.status.
130 ## We used to do this with a 'stamp-vcl' file, but non-gmake builds
131 ## would rerun configure on every invocation, so now we manually
132 ## check the version numbers from the build rule when necessary.
133 ## !WARNING! If you edit this rule to change the contents of ltmain.sh,
134 ## you must `touch $(srcdir)/$(auxdir)/ltmain.in' from the
135 ## shell if you need ltmain.sh to be regenerated. Ideally, we
136 ## should make this rule depend on Makefile but that will break
137 ## distcheck (at least) by rebuilding ltmain.sh in the source
138 ## tree whenever config.status regenerates the Makefile.
139 EXTRA_DIST += $(srcdir)/$(auxdir)/ltmain.sh
140 $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac ChangeLog
141 @target='$(srcdir)/$(auxdir)/ltmain.sh'; $(rebuild); \
142 if test -f "$$target"; then \
143 eval `sed -n '/^package_revision=/p' "$$target"`; \
144 actualver=$$package_revision; \
145 test "$$actualver" = "$$correctver" && rebuild=false; \
147 for prereq in $?; do \
148 case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
152 rm -f $(auxdir)/ltmain.in $(auxdir)/ltmain.tmp \
153 $(auxdir)/ltmain.sh; \
154 echo $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \
155 \> $(auxdir)/ltmain.in; \
156 $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \
157 > $(auxdir)/ltmain.in; \
158 echo $(bootstrap_edit) \
159 $(srcdir)/$(auxdir)/ltmain.in "> $$target"; \
160 $(bootstrap_edit) -e '/^: \$${.*="@.*@"}$$/d' \
161 $(auxdir)/ltmain.in > $(auxdir)/ltmain.tmp; \
162 rm -f $(auxdir)/ltmain.in; \
163 chmod a-w $(auxdir)/ltmain.tmp; \
164 mv -f $(auxdir)/ltmain.tmp $(auxdir)/ltmain.sh; \
167 # Use `$(srcdir)' for the benefit of non-GNU makes: this is
168 # how libtoolize.in appears in our dependencies.
169 EXTRA_DIST += libtoolize.m4sh
170 $(srcdir)/libtoolize.in: $(sh_files) libtoolize.m4sh Makefile.am
172 rm -f libtoolize.in libtoolize.tmp; \
173 $(M4SH) -B $(auxdir) libtoolize.m4sh > libtoolize.tmp; \
174 $(bootstrap_edit) libtoolize.tmp > libtoolize.in; \
177 $(srcdir)/libltdl/Makefile.am: $(srcdir)/libltdl/Makefile.inc
179 in=libltdl/Makefile.inc; out=libltdl/Makefile.am; \
181 ( $(SED) -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' $$in; \
182 { echo 'ACLOCAL_AMFLAGS = -I m4'; \
183 echo 'AUTOMAKE_OPTIONS = foreign'; \
184 echo 'AM_CPPFLAGS ='; \
185 echo 'AM_LDFLAGS ='; \
186 echo 'BUILT_SOURCES ='; \
187 echo 'include_HEADERS ='; \
188 echo 'noinst_LTLIBRARIES ='; \
189 echo 'lib_LTLIBRARIES ='; \
190 echo 'EXTRA_LTLIBRARIES ='; \
191 echo 'EXTRA_DIST ='; \
192 echo 'CLEANFILES ='; \
193 echo 'MOSTLYCLEANFILES ='; \
195 $(SED) -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' $$in | \
196 $(SED) -e 's,libltdl_,,; s,libltdl/,,; s,: libltdl/,: ,' \
197 -e 's,\$$(libltdl_,$$(,' \
199 $(SED) -e '/^.. DO NOT REMOVE THIS LINE -- /d' \
200 -e '1s,^\(.. Makefile.\)inc.*,\1am -- Process this file with automake to produce Makefile.in,' > $$out;
201 chmod a-w $(srcdir)/libltdl/Makefile.am
204 ## Unfortunately, all this bogeyness means that we have to manually
205 ## keep the generated files in libltdl up to date.
206 LTDL_BOOTSTRAP_DEPS = $(srcdir)/libltdl/aclocal.m4 \
207 $(srcdir)/libltdl/stamp-mk \
208 $(srcdir)/libltdl/configure \
209 $(srcdir)/libltdl/config-h.in
211 all-local: $(LTDL_BOOTSTRAP_DEPS)
214 ## ---------------- ##
215 ## Libtool scripts. ##
216 ## ---------------- ##
218 configure_edit = sed \
219 -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \
220 -e 's,@aclocaldir\@,$(aclocaldir),g' \
221 -e 's,@datadir\@,$(datadir),g' \
222 -e 's,@EGREP\@,$(EGREP),g' \
223 -e 's,@FGREP\@,$(FGREP),g' \
224 -e 's,@GREP\@,$(GREP),g' \
225 -e 's,@host_triplet\@,$(host_triplet),g' \
226 -e 's,@LN_S\@,$(LN_S),g' \
227 -e "s,@pkgconfig_files\@,$(auxfiles),g" \
228 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
229 -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \
230 -e 's,@prefix\@,$(prefix),g' \
231 -e 's,@SED\@,$(SED),g'
233 # The libtool distributor and the standalone libtool script.
234 bin_SCRIPTS = libtoolize libtool
236 libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
237 rm -f libtoolize.tmp libtoolize
239 $(srcdir)/libtoolize.in > libtoolize.tmp
240 chmod a+x libtoolize.tmp
241 chmod a-w libtoolize.tmp
242 mv -f libtoolize.tmp libtoolize
244 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
245 # would rerun configure on every invocation, so now we manually
246 # check the version numbers from the build rule when necessary.
247 libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
248 @target=libtool; $(rebuild); \
249 if test -f "$$target"; then \
250 set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
251 test "$$actualver" = "$$correctver" && rebuild=false; \
253 for prereq in $?; do \
254 case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
257 echo $(SHELL) ./config.status $$target; \
258 cd $(top_builddir) && $(SHELL) ./config.status $$target; \
261 .PHONY: configure-subdirs
262 configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
263 @DIST_MAKEFILE_LIST@:
264 dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \
265 test -d $$dir || mkdir $$dir || exit 1; \
266 abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; \
267 (cd $$dir && $$abs_srcdir/$$dir/configure --with-dist) || exit 1
274 include libltdl/Makefile.inc
276 EXTRA_DIST += $(srcdir)/libltdl/stamp-mk $(m4dir)/lt~obsolete.m4
278 $(srcdir)/libltdl/Makefile.in: $(srcdir)/libltdl/Makefile.am \
279 $(srcdir)/libltdl/aclocal.m4
280 cd $(srcdir)/libltdl && $(AUTOMAKE) Makefile
282 $(srcdir)/libltdl/stamp-mk: $(srcdir)/libltdl/Makefile.in
283 cd $(srcdir)/libltdl && \
284 sed -e 's,config/mdate-sh,,' -e 's,config/texinfo.tex,,' \
285 -e 's,config/mkinstalldirs,,' \
286 < Makefile.in > Makefile.inT && \
287 mv -f Makefile.inT Makefile.in
290 sub_aclocal_m4_deps = \
291 $(srcdir)/libltdl/configure.ac \
292 $(m4dir)/libtool.m4 \
293 $(m4dir)/ltoptions.m4 \
295 $(srcdir)/$(m4dir)/ltversion.m4 \
296 $(m4dir)/ltsugar.m4 \
298 $(m4dir)/lt~obsolete.m4
300 sub_configure_deps = $(sub_aclocal_m4_deps) $(srcdir)/libltdl/aclocal.m4
302 $(srcdir)/libltdl/aclocal.m4: $(sub_aclocal_m4_deps)
303 cd $(srcdir)/libltdl && $(ACLOCAL) -I m4
305 $(srcdir)/libltdl/configure: $(sub_configure_deps)
306 cd $(srcdir)/libltdl && $(AUTOCONF)
308 $(srcdir)/libltdl/config-h.in: $(sub_configure_deps)
309 cd $(srcdir)/libltdl && $(AUTOHEADER)
317 info_TEXINFOS = doc/libtool.texi
318 doc_libtool_TEXINFOS = doc/PLATFORMS doc/fdl.texi doc/notes.texi
319 EXTRA_DIST += $(srcdir)/doc/notes.txt
320 ## Workaround for a texinfo bug described here:
321 ## http://thread.gmane.org/gmane.comp.tex.texinfo.bugs/3930
322 DISTCLEANFILES += libtool.dvi
324 all-local: $(srcdir)/doc/notes.txt
326 $(srcdir)/doc/notes.txt: $(srcdir)/doc/notes.texi
327 cd $(srcdir)/doc && \
328 $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi
330 dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1
331 MAINTAINERCLEANFILES += $(dist_man1_MANS)
333 PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
334 $(HELP2MAN) --output=$@
335 $(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
336 $(update_mans) --help-option=--help-all libtool
337 $(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
338 $(update_mans) libtoolize
345 # These are required by libtoolize and must be executable when installed.
346 # The timestamps on these files must be preserved carefully so we install,
347 # uninstall and set executable with custom rules here.
348 auxexefiles = config/compile config/config.guess config/config.sub \
349 config/depcomp config/install-sh config/missing
350 auxfiles = $(auxexefiles) config/ltmain.sh
352 # Everything that gets picked up by aclocal is automatically distributed,
353 # this is the list of macro files we install on the user's system.
354 aclocalfiles = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 m4/ltoptions.m4 \
355 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4
357 ## These are installed as a subdirectory of pkgdatadir so that
358 ## libtoolize --ltdl can find them later:
359 ltdldatafiles = libltdl/COPYING.LIB \
361 libltdl/Makefile.inc \
362 libltdl/Makefile.am \
363 libltdl/configure.ac \
365 libltdl/Makefile.in \
366 libltdl/config-h.in \
370 libltdl/loaders/dld_link.c \
371 libltdl/loaders/dlopen.c \
372 libltdl/loaders/dyld.c \
373 libltdl/loaders/load_add_on.c \
374 libltdl/loaders/loadlibrary.c \
375 libltdl/loaders/shl_load.c \
376 libltdl/lt__dirent.c \
378 $(libltdl_libltdl_la_SOURCES)
380 install-data-local: libltdl/Makefile.in
382 ## Don't install over the top of an old pkgdatadir
383 -rm -rf $(DESTDIR)$(pkgdatadir)/*
384 ## To avoid spurious reconfiguration when the user installs these files
385 ## with libtoolize, we have to install them in the correct order:
386 ## First, put a copy of the libtool m4 macros in the aclocal dir
387 $(mkinstalldirs) $(DESTDIR)$(aclocaldir)
388 @list='$(aclocalfiles)'; for p in $$list; do \
389 f=`echo "$$p" | sed 's|^.*/||'`; \
390 echo " $(INSTALL_DATA) '$(srcdir)/$(m4dir)/$$f' '$(DESTDIR)$(aclocaldir)/$$f'"; \
391 $(INSTALL_DATA) "$(srcdir)/$(m4dir)/$$f" "$(DESTDIR)$(aclocaldir)/$$f"; \
393 ## install the helper scripts
394 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
395 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/config
396 @list='$(auxexefiles)' && for p in $$list; do \
397 echo " $(INSTALL_SCRIPT) '$(srcdir)/libltdl/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \
398 $(INSTALL_SCRIPT) "$(srcdir)/libltdl/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \
400 $(INSTALL_DATA) "$(srcdir)/libltdl/config/ltmain.sh" "$(DESTDIR)$(pkgdatadir)/config/ltmain.sh"
401 ## install the libltdl files
402 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/libltdl
403 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/libltdl/libltdl
404 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/libltdl/loaders
405 @list='$(ltdldatafiles)' && for p in $$list; do \
406 echo " $(INSTALL_DATA) '$(srcdir)/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \
407 $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \
409 -chmod a+x $(DESTDIR)$(pkgdatadir)/libltdl/configure
416 edit_readme_alpha = $(auxdir)/edit-readme-alpha
418 EXTRA_DIST += $(edit_readme_alpha)
422 @list='$(ltdldatafiles) $(auxfiles)'; for f in $$list; do \
423 echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
424 rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
426 @for p in $(aclocalfiles); do \
427 f=`echo "$$p" | sed 's|^.*/||'`; \
428 echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
429 rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
433 ## Edit the README file for alpha releases.
435 *[a-z]) $(SHELL) $(srcdir)/$(edit_readme_alpha) $(distdir)/README ;; \
437 ## Ensure aclocal has not wrongly picked up old macro definitions.
438 for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do \
439 if grep $$macro $(srcdir)/aclocal.m4 $(srcdir)/libltdl/aclocal.m4; then \
440 echo "Bogus $$macro macro contents in an aclocal.m4 file." >&2; \
450 # The testsuite files are evaluated in the order given here.
451 TESTSUITE = tests/testsuite
452 TESTSUITE_AT = tests/testsuite.at \
453 tests/getopt-m4sh.at \
454 tests/libtoolize.at \
456 tests/duplicate_members.at \
457 tests/duplicate_conv.at \
458 tests/duplicate_deps.at \
460 tests/inherited_flags.at \
461 tests/convenience.at \
462 tests/link-order.at \
463 tests/link-order2.at \
466 tests/runpath-in-lalib.at \
469 tests/search-path.at \
470 tests/indirect_deps.at \
471 tests/archive-in-archive.at \
473 tests/execute-mode.at \
476 tests/deplib-in-subdir.at \
478 tests/localization.at \
481 tests/versioning.at \
483 tests/old-m4-iface.at \
486 tests/lt_dladvise.at \
488 tests/lt_dlopen_a.at \
489 tests/lt_dlopenext.at \
490 tests/ltdl-libdir.at \
492 tests/dlloader-api.at \
493 tests/loadlibrary.at \
494 tests/lalib-syntax.at \
497 tests/need_lib_prefix.at \
498 tests/standalone.at \
499 tests/subproject.at \
500 tests/nonrecursive.at \
504 tests/exceptions.at \
505 tests/early-libtool.at \
507 tests/no-executables.at \
508 tests/deplibs-ident.at \
509 tests/configure-iface.at \
510 tests/stresstest.at \
511 tests/cmdline_wrap.at \
514 tests/dumpbin-symbols.at \
515 tests/deplibs-mingw.at \
518 EXTRA_DIST += $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) $(srcdir)/tests/package.m4
520 # Be sure to reexport important environment variables:
521 TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
522 CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
523 LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
525 M4SH="$(M4SH)" SED="$(SED)" STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \
526 MANIFEST_TOOL="$(MANIFEST_TOOL)" \
527 OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
528 SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
529 CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \
530 F77="$(F77)" FFLAGS="$(FFLAGS)" \
531 FC="$(FC)" FCFLAGS="$(FCFLAGS)" \
532 GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \
533 lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \
534 lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)"
536 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
537 LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
538 LIBTOOL="$(abs_top_builddir)/libtool" \
539 tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
541 INSTALLCHECK_ENVIRONMENT = \
542 LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
543 LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
544 LTDLINCL="-I$(includedir)" \
545 LIBLTDL="$(libdir)/libltdl.la" \
546 tst_aclocaldir="$(aclocaldir)"
548 # Use `$(srcdir)' for the benefit of non-GNU makes: this is
549 # how `testsuite' appears in our dependencies.
550 $(srcdir)/$(TESTSUITE): $(srcdir)/tests/package.m4 $(TESTSUITE_AT) Makefile.am
551 cd $(srcdir)/tests && \
552 $(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite.tmp && \
553 mv -f testsuite.tmp testsuite
555 $(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am
557 echo '# Signature of the current package.'; \
558 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
559 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
560 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
561 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
562 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
563 echo 'm4_define([AT_PACKAGE_URL], [@PACKAGE_URL@])'; \
564 } | $(bootstrap_edit) > $(srcdir)/tests/package.m4
566 tests/atconfig: $(top_builddir)/config.status
567 $(SHELL) ./config.status tests/atconfig
569 DISTCLEANFILES += tests/atconfig
571 CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
573 testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
574 testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \
575 $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS)
577 # Hook the test suite into the check rule
578 check-local: $(testsuite_deps_uninstalled)
580 CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
581 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
583 # Run the test suite on the *installed* tree.
584 installcheck-local: $(testsuite_deps)
586 CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
587 $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
588 AUTOTEST_PATH="$(exec_prefix)/bin"
590 check-noninteractive-old:
591 $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(NONINTERACTIVE_TESTS)'
592 check-interactive-old:
593 $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(INTERACTIVE_TESTS)'
595 # Run only noninteractive parts of the new testsuite.
596 check-noninteractive-new: $(testsuite_deps_uninstalled)
598 CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
599 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
600 -k !interactive INNER_TESTSUITEFLAGS=",!interactive" \
603 # Run only interactive parts of the new testsuite.
604 check-interactive-new: $(testsuite_deps_uninstalled)
606 CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \
607 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
608 -k interactive -k recursive INNER_TESTSUITEFLAGS=",interactive" \
611 check-interactive: check-interactive-old check-interactive-new
612 check-noninteractive: check-noninteractive-old check-noninteractive-new
614 # We need to remove any file droppings left behind by testsuite
615 clean-local: clean-local-legacy
617 test -f $$abs_srcdir/$(TESTSUITE) && \
618 $(SHELL) $$abs_srcdir/$(TESTSUITE) --clean
625 # !WARNING! Don't add any new tests here, we are migrating to an
626 # Autotest driven framework, please add new test cases
627 # using the new framework above. When the migration is
628 # complete this section should be removed.
631 tests/tagdemo-static.test \
632 tests/tagdemo-static-make.test \
633 tests/tagdemo-static-exec.test \
634 tests/tagdemo-conf.test \
635 tests/tagdemo-make.test \
636 tests/tagdemo-exec.test \
637 tests/tagdemo-shared.test \
638 tests/tagdemo-shared-make.test \
639 tests/tagdemo-shared-exec.test \
640 tests/tagdemo-undef.test \
641 tests/tagdemo-undef-make.test \
642 tests/tagdemo-undef-exec.test
644 tests/tagdemo-undef-exec.log: tests/tagdemo-undef-make.log
645 tests/tagdemo-undef-make.log: tests/tagdemo-undef.log
646 tests/tagdemo-undef.log: tests/tagdemo-shared-exec.log
647 tests/tagdemo-shared-exec.log: tests/tagdemo-shared-make.log
648 tests/tagdemo-shared-make.log: tests/tagdemo-shared.log
649 tests/tagdemo-shared.log: tests/tagdemo-exec.log
650 tests/tagdemo-exec.log: tests/tagdemo-make.log
651 tests/tagdemo-make.log: tests/tagdemo-conf.log
652 tests/tagdemo-conf.log: tests/tagdemo-static-exec.log
653 tests/tagdemo-static-exec.log: tests/tagdemo-static-make.log
654 tests/tagdemo-static-make.log: tests/tagdemo-static.log
657 tests/f77demo-static.test \
658 tests/f77demo-static-make.test \
659 tests/f77demo-static-exec.test \
660 tests/f77demo-conf.test \
661 tests/f77demo-make.test \
662 tests/f77demo-exec.test \
663 tests/f77demo-shared.test \
664 tests/f77demo-shared-make.test \
665 tests/f77demo-shared-exec.test
667 tests/f77demo-shared-exec.log: tests/f77demo-shared-make.log
668 tests/f77demo-shared-make.log: tests/f77demo-shared.log
669 tests/f77demo-shared.log: tests/f77demo-exec.log
670 tests/f77demo-exec.log: tests/f77demo-make.log
671 tests/f77demo-make.log: tests/f77demo-conf.log
672 tests/f77demo-conf.log: tests/f77demo-static-exec.log
673 tests/f77demo-static-exec.log: tests/f77demo-static-make.log
674 tests/f77demo-static-make.log: tests/f77demo-static.log
677 tests/fcdemo-static.test \
678 tests/fcdemo-static-make.test \
679 tests/fcdemo-static-exec.test \
680 tests/fcdemo-conf.test \
681 tests/fcdemo-make.test \
682 tests/fcdemo-exec.test \
683 tests/fcdemo-shared.test \
684 tests/fcdemo-shared-make.test \
685 tests/fcdemo-shared-exec.test
687 tests/fcdemo-shared-exec.log: tests/fcdemo-shared-make.log
688 tests/fcdemo-shared-make.log: tests/fcdemo-shared.log
689 tests/fcdemo-shared.log: tests/fcdemo-exec.log
690 tests/fcdemo-exec.log: tests/fcdemo-make.log
691 tests/fcdemo-make.log: tests/fcdemo-conf.log
692 tests/fcdemo-conf.log: tests/fcdemo-static-exec.log
693 tests/fcdemo-static-exec.log: tests/fcdemo-static-make.log
694 tests/fcdemo-static-make.log: tests/fcdemo-static.log
700 tests/objectlist.test \
704 tests/tagtrace.test \
705 tests/cdemo-static.test \
706 tests/cdemo-static-make.test \
707 tests/cdemo-static-exec.test \
708 tests/demo-static.test \
709 tests/demo-static-make.test \
710 tests/demo-static-exec.test \
711 tests/demo-static-inst.test \
712 tests/demo-static-unst.test \
713 tests/depdemo-static.test \
714 tests/depdemo-static-make.test \
715 tests/depdemo-static-exec.test \
716 tests/depdemo-static-inst.test \
717 tests/depdemo-static-unst.test \
718 tests/mdemo-static.test \
719 tests/mdemo-static-make.test \
720 tests/mdemo-static-exec.test \
721 tests/mdemo-static-inst.test \
722 tests/mdemo-static-unst.test \
723 tests/cdemo-conf.test \
724 tests/cdemo-make.test \
725 tests/cdemo-exec.test \
726 tests/demo-conf.test \
727 tests/demo-make.test \
728 tests/demo-exec.test \
729 tests/demo-inst.test \
730 tests/demo-unst.test \
731 tests/demo-deplibs.test \
732 tests/depdemo-conf.test \
733 tests/depdemo-make.test \
734 tests/depdemo-exec.test \
735 tests/depdemo-inst.test \
736 tests/depdemo-unst.test \
737 tests/mdemo-conf.test \
738 tests/mdemo-make.test \
739 tests/mdemo-exec.test \
740 tests/mdemo-inst.test \
741 tests/mdemo-unst.test \
742 tests/mdemo-dryrun.test \
743 tests/mdemo2-conf.test \
744 tests/mdemo2-make.test \
745 tests/mdemo2-exec.test \
746 tests/pdemo-conf.test \
747 tests/pdemo-make.test \
748 tests/pdemo-exec.test \
749 tests/pdemo-inst.test \
750 tests/demo-nofast.test \
751 tests/demo-nofast-make.test \
752 tests/demo-nofast-exec.test \
753 tests/demo-nofast-inst.test \
754 tests/demo-nofast-unst.test \
755 tests/depdemo-nofast.test \
756 tests/depdemo-nofast-make.test \
757 tests/depdemo-nofast-exec.test \
758 tests/depdemo-nofast-inst.test \
759 tests/depdemo-nofast-unst.test \
760 tests/demo-pic.test \
761 tests/demo-pic-make.test \
762 tests/demo-pic-exec.test \
763 tests/demo-nopic.test \
764 tests/demo-nopic-make.test \
765 tests/demo-nopic-exec.test \
766 tests/cdemo-shared.test \
767 tests/cdemo-shared-make.test \
768 tests/cdemo-shared-exec.test \
769 tests/mdemo-shared.test \
770 tests/mdemo-shared-make.test \
771 tests/mdemo-shared-exec.test \
772 tests/mdemo-shared-inst.test \
773 tests/mdemo-shared-unst.test \
774 tests/cdemo-undef.test \
775 tests/cdemo-undef-make.test \
776 tests/cdemo-undef-exec.test
778 # Actually, only demo-relink and depdemo-relink require interaction,
779 # but they depend on the other tests being run beforehand.
780 INTERACTIVE_TESTS = \
781 tests/demo-shared.test \
782 tests/demo-shared-make.test \
783 tests/demo-shared-exec.test \
784 tests/demo-shared-inst.test \
785 tests/demo-hardcode.test \
786 tests/demo-relink.test \
787 tests/demo-noinst-link.test \
788 tests/demo-shared-unst.test \
789 tests/depdemo-shared.test \
790 tests/depdemo-shared-make.test \
791 tests/depdemo-shared-exec.test \
792 tests/depdemo-shared-inst.test \
793 tests/depdemo-relink.test \
794 tests/depdemo-shared-unst.test
796 tests/cdemo-undef-exec.log: tests/cdemo-undef-make.log
797 tests/cdemo-undef-make.log: tests/cdemo-undef.log
798 tests/cdemo-undef.log: @ORDER@ tests/cdemo-shared-exec.log
799 tests/cdemo-shared-exec.log: tests/cdemo-shared-make.log
800 tests/cdemo-shared-make.log: tests/cdemo-shared.log
801 tests/cdemo-shared.log: @ORDER@ tests/cdemo-exec.log
802 tests/cdemo-exec.log: tests/cdemo-make.log
803 tests/cdemo-make.log: tests/cdemo-conf.log
804 tests/cdemo-conf.log: @ORDER@ tests/cdemo-static-exec.log
805 tests/cdemo-static-exec.log: tests/cdemo-static-make.log
806 tests/cdemo-static-make.log: tests/cdemo-static.log
808 tests/demo-shared-unst.log: tests/demo-noinst-link.log
809 tests/demo-noinst-link.log: tests/demo-relink.log
810 tests/demo-relink.log: tests/demo-hardcode.log
811 tests/demo-hardcode.log: tests/demo-shared-inst.log
812 tests/demo-shared-inst.log: tests/demo-shared-exec.log
813 tests/demo-shared-exec.log: tests/demo-shared-make.log
814 tests/demo-shared-make.log: tests/demo-shared.log
815 tests/demo-shared.log: @ORDER@ tests/demo-nopic-exec.log
816 tests/demo-nopic-exec.log: tests/demo-nopic-make.log
817 tests/demo-nopic-make.log: tests/demo-nopic.log
818 tests/demo-nopic.log: @ORDER@ tests/demo-pic-exec.log
819 tests/demo-pic-exec.log: tests/demo-pic-make.log
820 tests/demo-pic-make.log: tests/demo-pic.log
821 tests/demo-pic.log: @ORDER@ tests/demo-nofast-unst.log
822 tests/demo-nofast-unst.log: tests/demo-nofast-inst.log
823 tests/demo-nofast-inst.log: tests/demo-nofast-exec.log
824 tests/demo-nofast-exec.log: tests/demo-nofast-make.log
825 tests/demo-nofast-make.log: tests/demo-nofast.log
826 tests/demo-nofast.log: @ORDER@ tests/demo-deplibs.log
827 tests/demo-deplibs.log: tests/demo-unst.log
828 tests/demo-unst.log: tests/demo-inst.log
829 tests/demo-inst.log: tests/demo-exec.log
830 tests/demo-exec.log: tests/demo-make.log
831 tests/demo-make.log: tests/demo-conf.log
832 tests/demo-conf.log: @ORDER@ tests/demo-static-unst.log
833 tests/demo-static-unst.log: tests/demo-static-inst.log
834 tests/demo-static-inst.log: tests/demo-static-exec.log
835 tests/demo-static-exec.log: tests/demo-static-make.log
836 tests/demo-static-make.log: tests/demo-static.log
838 tests/depdemo-shared-unst.log: tests/depdemo-relink.log
839 tests/depdemo-relink.log: tests/depdemo-shared-inst.log
840 tests/depdemo-shared-inst.log: tests/depdemo-shared-exec.log
841 tests/depdemo-shared-exec.log: tests/depdemo-shared-make.log
842 tests/depdemo-shared-make.log: tests/depdemo-shared.log
843 tests/depdemo-shared.log: @ORDER@ tests/depdemo-nofast-unst.log
844 tests/depdemo-nofast-unst.log: tests/depdemo-nofast-inst.log
845 tests/depdemo-nofast-inst.log: tests/depdemo-nofast-exec.log
846 tests/depdemo-nofast-exec.log: tests/depdemo-nofast-make.log
847 tests/depdemo-nofast-make.log: tests/depdemo-nofast.log
848 tests/depdemo-nofast.log: @ORDER@ tests/depdemo-unst.log
849 tests/depdemo-unst.log: tests/depdemo-inst.log
850 tests/depdemo-inst.log: tests/depdemo-exec.log
851 tests/depdemo-exec.log: tests/depdemo-make.log
852 tests/depdemo-make.log: tests/depdemo-conf.log
853 tests/depdemo-conf.log: @ORDER@ tests/depdemo-static-unst.log
854 tests/depdemo-static-unst.log: tests/depdemo-static-inst.log
855 tests/depdemo-static-inst.log: tests/depdemo-static-exec.log
856 tests/depdemo-static-exec.log: tests/depdemo-static-make.log
857 tests/depdemo-static-make.log: tests/depdemo-static.log
859 tests/mdemo-shared-unst.log: tests/mdemo-shared-inst.log
860 tests/mdemo-shared-inst.log: tests/mdemo-shared-exec.log
861 tests/mdemo-shared-exec.log: tests/mdemo-shared-make.log
862 tests/mdemo-shared-make.log: tests/mdemo-shared.log
863 tests/mdemo-shared.log: @ORDER@ tests/mdemo-dryrun.log \
864 tests/mdemo2-exec.log
866 tests/mdemo-dryrun.log: tests/mdemo-unst.log
867 tests/mdemo-unst.log: tests/mdemo-inst.log
868 tests/mdemo-inst.log: tests/mdemo-exec.log
869 tests/mdemo-exec.log: tests/mdemo-make.log
870 tests/mdemo-make.log: tests/mdemo-conf.log
871 tests/mdemo-conf.log: @ORDER@ tests/mdemo-static-unst.log
872 tests/mdemo-static-unst.log: tests/mdemo-static-inst.log
873 tests/mdemo-static-inst.log: tests/mdemo-static-exec.log
874 tests/mdemo-static-exec.log: tests/mdemo-static-make.log
875 tests/mdemo-static-make.log: tests/mdemo-static.log
877 tests/mdemo2-exec.log: tests/mdemo2-make.log
878 tests/mdemo2-make.log: tests/mdemo2-conf.log \
879 tests/mdemo-dryrun.log
881 tests/pdemo-inst.log: tests/pdemo-exec.log
882 tests/pdemo-exec.log: tests/pdemo-make.log
883 tests/pdemo-make.log: tests/pdemo-conf.log
886 NONINTERACTIVE_TESTS = $(COMMON_TESTS)
888 NONINTERACTIVE_TESTS += $(CXX_TESTS)
891 # f77demo-static-exec.test might be interactive on MSYS.
892 INTERACTIVE_TESTS += $(F77_TESTS)
895 NONINTERACTIVE_TESTS += $(FC_TESTS)
897 TESTS = $(NONINTERACTIVE_TESTS) $(INTERACTIVE_TESTS)
899 EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \
900 $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS) \
902 DIST_SUBDIRS += $(CONF_SUBDIRS)
904 # The defs script shouldn't be recreated whenever the Makefile is
905 # regenerated since the source tree can be read-only.
906 check-recursive: tests/defs
907 tests/defs: $(srcdir)/tests/defs.in
908 rm -f tests/defs.tmp tests/defs; \
909 $(configure_edit) $(srcdir)/tests/defs.in > tests/defs.tmp; \
910 mv -f tests/defs.tmp tests/defs
912 # Use `$(srcdir)/tests' for the benefit of non-GNU makes: this is
913 # how defs.in appears in our dependencies.
914 $(srcdir)/tests/defs.in: $(auxdir)/general.m4sh tests/defs.m4sh Makefile.am
916 rm -f tests/defs.in; \
917 $(M4SH) -B $(auxdir) tests/defs.m4sh > tests/defs.in
919 # We need to remove any files that the above tests created.
921 -for dir in $(CONF_SUBDIRS); do \
922 if test -f $$dir/Makefile; then \
923 (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) distclean); \
928 # For distclean, we may have to fake Makefiles in the test directories
929 # so that descending in DIST_SUBDIRS works.
930 # Hide the additional dependency from automake so it still outputs the rule.
931 distclean_recursive = distclean-recursive
932 $(distclean_recursive): fake-distclean-legacy
933 .PHONY: fake-distclean-legacy
934 fake-distclean-legacy:
935 -for dir in $(CONF_SUBDIRS); do \
936 if test ! -f $$dir/Makefile; then \
937 $(mkinstalldirs) $$dir; \
938 echo 'distclean: ; rm -f Makefile' > $$dir/Makefile; \
943 DISTCLEANFILES += tests/defs