1 ## Makefile.am -- Process this file with automake to produce Makefile.in
3 ## Copyright (C) 2003-2019, 2021-2024 Free Software Foundation, Inc.
4 ## Written by Gary V. Vaughan, 2003
6 ## This file is part of GNU Libtool.
8 ## GNU Libtool is free software; you can redistribute it and/or
9 ## modify it under the terms of the GNU General Public License as
10 ## published by the Free Software Foundation; either version 2 of
11 ## the License, or (at your option) any later version.
13 ## GNU Libtool is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU General Public License for more details.
18 ## You should have received a copy of the GNU General Public License
19 ## along with GNU Libtool; see the file COPYING. If not, a copy
20 ## can be downloaded from http://www.gnu.org/licenses/gpl.html,
21 ## or obtained by writing to the Free Software Foundation, Inc.,
22 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 ACLOCAL_AMFLAGS = -I m4
30 SUBDIRS = . gnulib-tests
31 DIST_SUBDIRS = $(SUBDIRS)
34 BUILT_SOURCES = libtool libtoolize
39 MAINTAINERCLEANFILES =
46 # Using 'cd' in backquotes may print the directory name, use this instead:
47 lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
49 git_version_gen = '$(SHELL)' '$(aux_dir)/git-version-gen' '--fallback' '$(VERSION)' '.tarball-version'
50 rebuild = rebuild=:; revision=`$(lt__cd) $(srcdir) && $(git_version_gen) | $(SED) 's|-.*$$||'`
57 SCRIPT_ENV = GREP='$(GREP)' SED='$(SED)'
59 build_scripts = $(srcdir)/$(aux_dir)/announce-gen \
60 $(srcdir)/$(aux_dir)/do-release-commit-and-tag \
61 $(srcdir)/$(aux_dir)/gendocs.sh \
62 $(srcdir)/$(aux_dir)/git-version-gen \
63 $(srcdir)/$(aux_dir)/gnu-web-doc-update \
64 $(srcdir)/$(aux_dir)/gnupload \
65 $(srcdir)/$(aux_dir)/useless-if-before-free \
66 $(srcdir)/$(aux_dir)/vc-list-files
68 EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
70 CLEANFILES += libtool libtoolize
72 ## If a file is named several times below, and especially if it
73 ## is a distributed file created during Libtool bootstrap, we
74 ## put it in a variable in accordance with the DRY principle.
75 ## Use '$(srcdir)' for the benefit of non-GNU makes: referring
76 ## to them by their variable makes sure they appear as targets
77 ## and dependencies with '$(srcdir)' consistently.
78 configure_ac = $(srcdir)/configure.ac
79 config_status = $(top_builddir)/config.status
80 extract_trace = $(srcdir)/$(aux_dir)/extract-trace
81 funclib_sh = $(srcdir)/$(aux_dir)/funclib.sh
82 inline_source = $(srcdir)/$(aux_dir)/inline-source
83 libtoolize_in = $(srcdir)/libtoolize.in
84 ltmain_sh = $(srcdir)/$(aux_dir)/ltmain.sh
85 ltmain_in = $(srcdir)/$(aux_dir)/ltmain.in
86 libtool_m4 = $(srcdir)/$(macro_dir)/libtool.m4
87 ltversion_in = $(srcdir)/$(macro_dir)/ltversion.in
88 ltversion_m4 = $(srcdir)/$(macro_dir)/ltversion.m4
89 no_bogus_macros = $(srcdir)/$(aux_dir)/no-bogus-m4-defines
90 options_parser = $(srcdir)/$(aux_dir)/options-parser
91 u2d_copyright = $(srcdir)/$(aux_dir)/update-copyright
93 EXTRA_DIST += $(extract_trace) $(funclib_sh) $(inline_source) \
94 $(libtoolize_in) $(ltmain_in) $(ltmain_sh) \
95 $(ltversion_in) $(ltversion_m4) $(no_bogus_macros) \
96 $(options_parser) $(u2d_copyright)
98 ## These are the replacements that need to be made at bootstrap time,
99 ## because they must be static in distributed files, and not accidentally
100 ## changed by configure running on the build machine.
101 bootstrap_edit = $(SED) \
102 -e 's|@MACRO_VERSION\@|$(VERSION)|g' \
103 -e "s|@MACRO_REVISION\@|$$revision|g" \
104 -e "s|@MACRO_SERIAL\@|$$serial|g" \
105 -e 's|@PACKAGE\@|$(PACKAGE)|g' \
106 -e 's|@PACKAGE_BUGREPORT\@|$(PACKAGE_BUGREPORT)|g' \
107 -e 's|@PACKAGE_URL\@|$(PACKAGE_URL)|g' \
108 -e 's|@PACKAGE_NAME\@|$(PACKAGE_NAME)|g' \
109 -e "s|@package_revision\@|$$revision|g" \
110 -e 's|@PACKAGE_STRING\@|$(PACKAGE_NAME) $(VERSION)|g' \
111 -e 's|@PACKAGE_TARNAME\@|$(PACKAGE)|g' \
112 -e 's|@PACKAGE_VERSION\@|$(VERSION)|g' \
113 -e 's|@VERSION\@|$(VERSION)|g'
115 ## We build ltversion.m4 here, instead of from config.status,
116 ## because config.status is rerun each time one of configure's
117 ## dependencies change and ltversion.m4 happens to be a configure
118 ## dependency. configure and ltversion.m4 would be rebuilt in
120 ## We used to do this with a 'stamp-vcl' file, but non-gmake builds
121 ## would rerun configure on every invocation, so now we manually
122 ## check the version numbers from the build rule when necessary.
123 $(ltversion_m4): $(ltversion_in) $(dotversion)
125 if test -f '$@'; then \
126 eval `'$(SED)' -n '/^macro_revision=/p' '$@'`; \
127 test "x$$macro_revision" = "x$$revision" && rebuild=false; \
129 for prereq in $?; do \
130 case $$prereq in *.version);; *) rebuild=:;; esac; \
134 if test -d '$(srcdir)/.git' && git --version >/dev/null 2>&1; then \
135 $(git_commit_count) > '$(srcdir)/.serial'; \
137 serial=`cat '$(srcdir)/.serial'`; \
138 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
139 then echo " GEN " $@; \
140 else echo $(bootstrap_edit) "'$(ltversion_in)' > '$@'"; fi; \
141 $(bootstrap_edit) '$(ltversion_in)' > '$@'; \
145 ## And for similar reasons, ltmain.sh can't be built from config.status.
146 ## We used to do this with a 'stamp-vcl' file, but non-gmake builds
147 ## would rerun configure on every invocation, so now we manually
148 ## check the version numbers from the build rule when necessary.
149 ## !WARNING! If you edit this rule to change the contents of ltmain.sh,
150 ## you must 'touch $(aux_dir)/ltmain.in' from the
151 ## shell if you need ltmain.sh to be regenerated. Ideally, we
152 ## should make this rule depend on Makefile but that will break
153 ## distcheck (at least) by rebuilding ltmain.sh in the source
154 ## tree whenever config.status regenerates the Makefile.
155 $(ltmain_sh): $(ltmain_in) $(dotversion)
157 if test -f '$@'; then \
158 eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
159 test "x$$package_revision" = "x$$revision" && rebuild=false; \
161 for prereq in $?; do \
162 case $$prereq in *.version);; *) rebuild=:;; esac; \
166 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
167 then echo " GEN " $@; \
168 else echo "$(inline_source) '$(ltmain_in)' |" $(bootstrap_edit) "> '$@'"; fi; \
169 $(SCRIPT_ENV) '$(inline_source)' '$(ltmain_in)' | $(bootstrap_edit) > '$@'; \
173 lt_Makefile_am = $(srcdir)/$(ltdl_dir)/Makefile.am
174 lt_Makefile_in = $(srcdir)/$(ltdl_dir)/Makefile.in
175 ltdl_mk = $(srcdir)/$(ltdl_dir)/ltdl.mk
177 $(lt_Makefile_am): $(ltdl_mk)
179 $(AM_V_GEN)( '$(SED)' -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' \
181 { echo 'ACLOCAL_AMFLAGS = -I ../m4'; \
182 echo 'AUTOMAKE_OPTIONS = foreign'; \
183 echo 'AM_CPPFLAGS ='; \
184 echo 'AM_LDFLAGS ='; \
185 echo 'BUILT_SOURCES ='; \
186 echo 'include_HEADERS ='; \
187 echo 'noinst_LTLIBRARIES ='; \
188 echo 'lib_LTLIBRARIES ='; \
189 echo 'EXTRA_LTLIBRARIES ='; \
190 echo 'EXTRA_DIST ='; \
191 echo 'CLEANFILES ='; \
192 echo 'MOSTLYCLEANFILES ='; \
194 '$(SED)' -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' \
196 |'$(SED)' -e 's|libltdl_||; s|libltdl/||; s|: libltdl/|: |' \
197 -e '/^[ ]*-I\$$(srcdir)\/libltdl -Ilibltdl \\/d' \
198 -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,' > '$@'
201 $(AM_V_at)chmod a-w '$@'
203 ## Document the make macros that are needed to build bootstrap-deps
204 ## dependencies when called from 'bootstrap' (developer's machine),
205 ## where the Makefile.am is fed to make in its raw format before
206 ## 'configure' has found the correct values (on the build machine).
212 .PHONY: bootstrap-deps bootstrap-deps-prep
213 bootstrap-deps: bootstrap-deps-prep
214 $(MAKE) $(bootstrap_files)
217 ## The following variables are substituted by 'bootstrap-dep-preps'
219 test -z '$(srcdir)' \
220 && echo "ERROR: don't call $(MAKE) with srcdir unset." \
222 test -z '$(PACKAGE)' \
223 && echo "ERROR: don't call $(MAKE) with PACKAGE unset." \
225 test -z '$(PACKAGE_BUGREPORT)' \
226 && echo "ERROR: don't call $(MAKE) with PACKAGE_BUGREPORT unset." \
228 test -z '$(PACKAGE_NAME)' \
229 && echo "ERROR: don't call $(MAKE) with PACKAGE_NAME unset." \
231 test -z '$(PACKAGE_URL)' \
232 && echo "ERROR: don't call $(MAKE) with PACKAGE_URL unset." \
235 && echo "ERROR: don't call $(MAKE) with SED unset." \
237 test -z '$(VERSION)' \
238 && echo "ERROR: don't call $(MAKE) with VERSION unset." \
241 $(AM_V_at)rm -f $(bootstrap_files)
243 ## Unfortunately, all this bogeyness means that we have to manually
244 ## keep the generated files in libltdl up to date.
245 LTDL_BOOTSTRAP_DEPS = \
251 all-local: $(LTDL_BOOTSTRAP_DEPS)
254 ## ---------------- ##
255 ## Libtool scripts. ##
256 ## ---------------- ##
258 abs_aux_dir = `$(lt__cd) '$(srcdir)/$(aux_dir)' && pwd`
259 ltdl_ac_aux_dir = `$(SCRIPT_ENV) $(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac`
261 configure_edit = $(bootstrap_edit) \
262 -e '/^\. /s|@auxscriptsdir\@|'$(abs_aux_dir)'|g' \
263 -e 's|@aclocaldir\@|$(aclocaldir)|g' \
264 -e 's|@aux_dir\@|$(aux_dir)|g' \
265 -e 's|@datadir\@|$(datadir)|g' \
266 -e 's|@EGREP\@|$(EGREP)|g' \
267 -e 's|@FGREP\@|$(FGREP)|g' \
268 -e 's|@GREP\@|$(GREP)|g' \
269 -e 's|@host_triplet\@|$(host_triplet)|g' \
270 -e 's|@LN_S\@|$(LN_S)|g' \
271 -e "s|@ltdl_ac_aux_dir\@|$(ltdl_ac_aux_dir)|g" \
272 -e 's|@macro_dir\@|$(macro_dir)|g' \
273 -e 's|@pkgauxdir\@|$(pkgauxdir)|g' \
274 -e 's|@pkgaux_files\@|$(pkgaux_scripts) $(pkgaux_data_files)|g' \
275 -e 's|@pkgaux_install_files\@|$(pkgaux_install_files)|g' \
276 -e 's|@pkgaux_parent_files\@|$(pkgaux_parent_files)|g' \
277 -e 's|@pkgdatadir\@|$(pkgdatadir)|g' \
278 -e 's|@pkgltdl_files\@|$(pkgltdl_files)|g' \
279 -e 's|@pkgmacro_files\@|$(pkgmacro_files)|g' \
280 -e 's|@prefix\@|$(prefix)|g' \
281 -e 's|@SED\@|$(SED)|g' \
282 -e 's|@srcdir\@|$(srcdir)|g'
284 # The libtool distributor and the standalone libtool script.
285 bin_SCRIPTS = libtool
287 libtoolize: $(libtoolize_in) $(config_status)
289 $(AM_V_GEN)$(configure_edit) '$(libtoolize_in)' > '$@'
290 $(AM_V_at)chmod a+x '$@'
291 $(AM_V_at)chmod a-w '$@'
293 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
294 # would rerun configure on every invocation, so now we manually
295 # check the version numbers from the build rule when necessary.
296 libtool: $(ltmain_sh) $(config_status) $(dotversion)
298 if test -f '$@'; then \
299 eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
300 test "$$package_revision" = "$$revision" && rebuild=false; \
302 for prereq in $?; do \
303 case $$prereq in *.version);; *) rebuild=:;; esac; \
306 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
307 then echo " GEN " $@; \
308 else echo '$(SHELL) $(top_builddir)/config.status "$@"'; fi; \
309 cd '$(top_builddir)' && '$(SHELL)' ./config.status '$@'; \
317 include libltdl/ltdl.mk
319 lt_aclocal_m4 = $(srcdir)/$(ltdl_dir)/aclocal.m4
320 lt_config_h_in = $(srcdir)/$(ltdl_dir)/config-h.in
321 lt_configure = $(srcdir)/$(ltdl_dir)/configure
322 lt_configure_ac = $(srcdir)/$(ltdl_dir)/configure.ac
323 stamp_mk = $(srcdir)/$(ltdl_dir)/stamp-mk
325 lt_obsolete_m4 = $(srcdir)/$(macro_dir)/lt~obsolete.m4
327 EXTRA_DIST += $(lt_aclocal_m4) \
336 $(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) $(lt_config_h_in)
337 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile
339 # Don't let unused scripts leak into the libltdl Makefile
340 $(stamp_mk): $(lt_Makefile_in)
341 $(AM_V_at)T='$(srcdir)/$(aux_dir)/Makefile.tmp'; \
342 for p in $(srcdir)/$(aux_dir)/*; do \
343 test -f "$$p" || continue; \
344 f=`echo "$$p" | $(SED) 's|^$(srcdir)/$(aux_dir)/||'`; \
345 case " $(pkgaux_scripts) ltmain.sh " in \
348 -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"'\$$||' \
349 -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"' ||' \
351 '$(lt_Makefile_in)' > "$$T" \
352 && mv -f "$$T" '$(lt_Makefile_in)';; \
355 $(AM_V_GEN)echo stamp > '$@'
357 lt_aclocal_m4_deps = \
361 $(srcdir)/$(macro_dir)/ltargz.m4 \
362 $(srcdir)/$(macro_dir)/ltdl.m4 \
363 $(srcdir)/$(macro_dir)/ltoptions.m4 \
364 $(srcdir)/$(macro_dir)/ltsugar.m4 \
365 $(srcdir)/$(macro_dir)/m4.m4 \
366 $(srcdir)/$(ltdl_dir)/configure.ac
368 lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps)
370 $(lt_aclocal_m4): $(lt_aclocal_m4_deps)
371 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I ../m4
373 $(lt_configure): $(lt_configure_deps) $(lt_config_h_in)
374 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOCONF)
376 $(lt_config_h_in): $(lt_configure_deps)
377 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOHEADER)
385 doc_dir = $(srcdir)/doc
387 libtool_1 = $(doc_dir)/libtool.1
388 libtoolize_1 = $(doc_dir)/libtoolize.1
389 notes_texi = $(doc_dir)/notes.texi
390 notes_txt = $(doc_dir)/notes.txt
392 EXTRA_DIST += $(doc_dir)/gendocs_template
394 # A bug in automake 1.11.1 (at least) prevents us from using:
396 # info_TEXINFOS = $(doc_dir)/libtool.texi
398 # Producing the following error, even though srcdir is implicitly set:
399 # "cannot open < ./$(srcdir)/doc/libtool.texi: No such file or directory"
400 info_TEXINFOS = doc/libtool.texi
401 doc_libtool_TEXINFOS = $(doc_dir)/PLATFORMS $(doc_dir)/fdl.texi \
403 EXTRA_DIST += $(notes_txt)
404 ## Workaround for a texinfo bug described here:
405 ## http://thread.gmane.org/gmane.comp.tex.texinfo.bugs/3930
406 DISTCLEANFILES += libtool.dvi
408 all-local: $(notes_txt)
410 $(notes_txt): $(notes_texi)
411 $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \
412 $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)'
414 dist_man1_MANS = $(libtool_1) $(libtoolize_1)
415 MAINTAINERCLEANFILES += $(dist_man1_MANS)
417 PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
418 $(HELP2MAN) --output='$@'
420 # It's wrong to make distributed files (e.g. $(libtool_1)) rely on
421 # files created in the build tree, so instead we regenerate the
422 # manual pages if the sources for the build-tree files we want to
424 $(libtool_1): $(ltmain_sh)
425 $(AM_V_GEN)$(update_mans) --help-option=--help-all libtool
426 $(libtoolize_1): $(libtoolize_in)
427 $(AM_V_GEN)$(update_mans) libtoolize
434 ltdldir = $(srcdir)/libltdl
435 pkgauxdir = $(pkgdatadir)/build-aux
437 # The timestamps on these files must be preserved carefully so we install,
438 # uninstall and set executable with custom rules here.
439 pkgaux_parent_files = ltmain.sh
440 pkgaux_install_files = config.guess config.sub install-sh
441 pkgaux_data_files = $(pkgaux_parent_files)
443 # Everything that gets picked up by aclocal is automatically distributed,
444 # this is the list of macro files we install on the user's system.
445 pkgmacro_files = libtool.m4 ltargz.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 \
446 ltversion.m4 lt~obsolete.m4
448 ## These are installed as a subdirectory of pkgdatadir so that
449 ## libtoolize --ltdl can find them later. Note that this list requires
450 ## specific order to avoid unnecessary re-autotooling after libtoolize run.
451 pkgltdl_files = COPYING.LIB \
459 libltdl/lt__alloc.h \
460 libltdl/lt__argz_.h \
461 libltdl/lt__dirent.h \
462 libltdl/lt__glibc.h \
463 libltdl/lt__private.h \
465 libltdl/lt_dlloader.h \
467 libltdl/lt_system.h \
472 loaders/load_add_on.c \
473 loaders/loadlibrary.c \
487 install-data-local: $(lt_Makefile_in) install-scripts-local
489 ## Don't install over the top of an old pkgdatadir
490 -rm -rf '$(DESTDIR)$(pkgdatadir)'/*
491 ## First, put a copy of the libtool m4 macros in the aclocal dir
492 @list='$(pkgmacro_files)'; for p in $$list; do \
493 d=`echo "$(DESTDIR)$(aclocaldir)/$$p" |$(SED) 's|[^/]*$$||'`; \
494 test -d "$$d" || $(mkinstalldirs) "$$d"; \
495 echo " $(INSTALL_DATA) '$(srcdir)/$(macro_dir)/$$p' '$(DESTDIR)$(aclocaldir)/$$p'"; \
496 $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$p" "$(DESTDIR)$(aclocaldir)/$$p"; \
498 ## install the helper scripts
499 @list='$(pkgaux_scripts)' && \
500 for p in $$list; do \
501 d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \
502 test -d "$$d" || $(mkinstalldirs) "$$d"; \
503 echo " $(INSTALL_SCRIPT) '$(srcdir)/$(aux_dir)/$$p' '$(DESTDIR)$(pkgauxdir)/$$p'"; \
504 $(INSTALL_SCRIPT) "$(srcdir)/$(aux_dir)/$$p" "$(DESTDIR)$(pkgauxdir)/$$p"; \
506 @list='$(pkgaux_data_files)' && for p in $$list; do \
507 d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \
508 test -d "$$d" || $(mkinstalldirs) "$$d"; \
509 echo " $(INSTALL_DATA) '$(srcdir)/$(aux_dir)/$$p' '$(DESTDIR)$(pkgauxdir)/$$p'"; \
510 $(INSTALL_DATA) "$(srcdir)/$(aux_dir)/$$p" "$(DESTDIR)$(pkgauxdir)/$$p"; \
512 ## install the libltdl files
513 @list='$(pkgltdl_files)' && for p in $$list; do \
514 d=`echo "$(DESTDIR)$(pkgdatadir)/$$p" |$(SED) 's|[^/]*$$||'`; \
515 test -d "$$d" || $(mkinstalldirs) "$$d"; \
516 echo " $(INSTALL_DATA) '$(ltdldir)/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \
517 $(INSTALL_DATA) "$(ltdldir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \
519 chmod a+x '$(DESTDIR)$(pkgdatadir)/configure'
521 .PHONY: install-scripts-local
522 install-scripts-local: $(lt_Makefile_in)
523 ## Inline helper-scripts for installed libtoolize script
524 @p=`echo libtoolize |sed -e '$(transform)'`; \
525 echo " $(SCRIPT_ENV) '$(inline_source)' libtoolize > '$(DESTDIR)$(bindir)/$$p'"; \
526 d=`echo "$(DESTDIR)$(bindir)/$$p" |$(SED) 's|[^/]*$$||'`; \
527 test -d "$$d" || $(mkinstalldirs) "$$d"; \
528 $(SCRIPT_ENV) '$(inline_source)' libtoolize > "$(DESTDIR)$(bindir)/$$p"; \
529 chmod a+x "$(DESTDIR)$(bindir)/$$p"
536 edit_readme_alpha = $(srcdir)/$(aux_dir)/edit-readme-alpha
537 gitlog_to_changelog = $(srcdir)/$(aux_dir)/gitlog-to-changelog
538 git_log_fix = $(srcdir)/$(aux_dir)/git-log-fix
539 thanks_gen = $(srcdir)/$(aux_dir)/thanks-gen
541 dotserial = $(distdir)/.serial
542 dotversion = $(top_srcdir)/.version
543 tarball_version = $(distdir)/.tarball-version
544 readme = $(distdir)/README
545 changelog = $(distdir)/ChangeLog
546 changelog_old = $(srcdir)/ChangeLog.old
547 thanks = $(distdir)/THANKS
548 no_thanks = $(srcdir)/NO-THANKS
550 # Generate ChangeLog using git log entries for as far back as
551 # they are in good shape, appending manual records from earlier.
552 changelog_start_date = 2011-01-01
554 $(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
555 TZ=UTC $(gitlog_to_changelog) --amend=$(git_log_fix) \
556 --ignore-matching=Omit-from-ChangeLog. \
557 --format='%s%n%n%b%n' \
558 --since=$(changelog_start_date) > '$@T'; \
559 rm -f '$@'; mv '$@T' '$@'; \
560 cat '$(changelog_old)' >> '$@'; \
563 # Sort in traditional ASCII order, regardless of the current locale;
564 # otherwise we may get into trouble with distinct strings that the
565 # current locale considers to be equal.
566 ASSORT = LC_ALL=C sort
568 # Extract all lines up to the first one starting with "##".
569 prologue = perl -ne '/^\#\#/ and exit; print' $(no_thanks)
571 # Generate THANKS using git log entries as far as possible, fixing
572 # up ommisions and errors from NO-THANKS configuration.
574 $(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
577 { perl -ne '/^$$/.../^$$/ and print' $(no_thanks) \
578 | grep -v '^$$' | perl -pe 's/ +/\0/'; \
579 { sed -e '1,/\#\# /d' -e '/^\#\# /d' \
580 -e 's|[ ][ ]*| |' < $(no_thanks) \
582 git log --pretty=format:'%aN%x00%aE'; \
585 | LC_ALL=en_US.UTF-8 sort -f; \
587 printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
591 ## Arrange so that .version appears only in the distribution
592 ## tarball, and never in a checked-out repository.
593 EXTRA_DIST += $(dotversion)
594 BUILT_SOURCES += $(dotversion)
596 $(AM_V_GEN)echo '$(VERSION)' > '$@T' && mv '$@T' '$@'
598 ## Edit the README file for alpha releases.
599 EXTRA_DIST += $(edit_readme_alpha)
600 re_alpha_version = '\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*[-\.][-\.0-9a-z]*\)'
602 @if test -n "`expr $(VERSION) : $(re_alpha_version)`"; then \
603 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
604 then echo " GEN " $@; \
605 else echo "$(SHELL) $(edit_readme_alpha) $@"; fi; \
606 $(SHELL) $(edit_readme_alpha) '$@'; \
609 git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's|[ ]||g'
611 dist-hook: $(changelog) $(thanks) $(dotversion) $(readme)
612 ## Arrange so that .tarball-version appears only in the distribution
613 ## tarball, and never in a checked-out repository.
614 echo '$(VERSION)' > $(tarball_version)
615 ## ...and similarly for .serial.
616 $(git_commit_count) > $(dotserial)
617 ## Ensure aclocal has not wrongly picked up old macro definitions.
620 distcheck-hook: syntax-check
624 @list='$(pkgltdl_files)'; \
625 for f in $$list; do \
626 echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
627 rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
629 @list='$(pkgaux_scripts) $(pkgaux_data_files)'; \
630 for f in $$list; do \
631 echo " rm -f '$(DESTDIR)$(pkgauxdir)/$$f'"; \
632 rm -f "$(DESTDIR)$(pkgauxdir)/$$f"; \
634 @for p in $(pkgmacro_files); do \
635 f=`echo "$$p" |$(SED) 's|^.*/||'`; \
636 echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
637 rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
639 @p=`echo libtoolize |sed -e '$(transform)'`; \
640 echo " rm -f '$(DESTDIR)$(bindir)/$$p'"; \
641 rm -f "$(DESTDIR)$(bindir)/$$p"
648 tests_dir = $(top_srcdir)/tests
649 package_m4 = $(tests_dir)/package.m4
650 testsuite = $(tests_dir)/testsuite
652 # The testsuite files are evaluated in the order given here. When
653 # adding new tests, make sure cmdline_wrap.at stays at the end so
654 # that it can check for previous failures and skip if necessary.
655 TESTSUITE = tests/testsuite
656 TESTSUITE_AT = tests/testsuite.at \
657 tests/configure-funcs.at \
658 tests/libtoolize.at \
664 tests/convenience.at \
667 tests/duplicate_members.at \
668 tests/duplicate_conv.at \
669 tests/duplicate_deps.at \
671 tests/inherited_flags.at \
672 tests/link-order.at \
673 tests/link-order2.at \
676 tests/runpath-in-lalib.at \
679 tests/export-def.at \
680 tests/search-path.at \
681 tests/indirect_deps.at \
682 tests/archive-in-archive.at \
684 tests/execute-mode.at \
687 tests/deplib-in-subdir.at \
689 tests/localization.at \
692 tests/versioning.at \
694 tests/old-m4-iface.at \
697 tests/lt_dladvise.at \
699 tests/lt_dlopen_a.at \
700 tests/lt_dlopenext.at \
701 tests/ltdl-libdir.at \
703 tests/dlloader-api.at \
704 tests/loadlibrary.at \
705 tests/lalib-syntax.at \
708 tests/need_lib_prefix.at \
710 tests/standalone.at \
711 tests/subproject.at \
712 tests/nonrecursive.at \
717 tests/exceptions.at \
718 tests/early-libtool.at \
719 tests/no-executables.at \
720 tests/deplibs-ident.at \
721 tests/configure-iface.at \
725 tests/dumpbin-symbols.at \
726 tests/deplibs-mingw.at \
728 tests/stresstest.at \
729 tests/cmdline_wrap.at \
732 EXTRA_DIST += $(testsuite) $(TESTSUITE_AT) $(package_m4)
734 # Be sure to reexport important environment variables:
735 TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
736 CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
737 LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
739 EGREP="$(EGREP)" FGREP="$(FGREP)" GREP="$(GREP)" SED="$(SED)" \
740 STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \
741 MANIFEST_TOOL="$(MANIFEST_TOOL)" \
742 OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
743 SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
744 CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \
745 F77="$(F77)" FFLAGS="$(FFLAGS)" \
746 FC="$(FC)" FCFLAGS="$(FCFLAGS)" \
747 GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \
748 lt_cv_with_aix_soname="$(with_aix_soname)" \
749 lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \
750 lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)"
752 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
753 LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
754 LIBTOOL="$(abs_top_builddir)/libtool" \
755 tst_aclocaldir="$(abs_top_srcdir)/m4"
757 INSTALLCHECK_ENVIRONMENT = \
758 LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
759 LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
760 LTDLINCL="-I$(includedir)" \
761 LIBLTDL="$(libdir)/libltdl.la" \
762 tst_aclocaldir="$(aclocaldir)"
764 $(testsuite): $(package_m4) $(TESTSUITE_AT) Makefile.am
765 $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -I '$(srcdir)/tests' $(TESTSUITE_AT) -o '$@'
767 $(package_m4): $(dotversion) Makefile.am
769 echo '# Signature of the current package.'; \
770 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \
771 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \
772 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \
773 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \
774 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
775 echo 'm4_define([AT_PACKAGE_URL], [$(PACKAGE_URL)])'; \
778 tests/atconfig: $(config_status)
779 $(AM_V_GEN)$(SHELL) '$(config_status)' '$@'
781 DISTCLEANFILES += tests/atconfig
783 CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
785 testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
786 testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \
787 $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS)
789 # Hook the test suite into the check rule
790 check-local: $(testsuite_deps_uninstalled)
791 $(AM_V_at)$(CD_TESTDIR); \
792 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
793 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
795 # Run the test suite on the *installed* tree.
796 installcheck-local: $(testsuite_deps)
797 $(AM_V_at)$(CD_TESTDIR); \
798 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
799 $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
800 AUTOTEST_PATH='$(exec_prefix)/bin'
802 .PHONY: check-noninteractive-old
803 check-noninteractive-old:
804 $(AM_V_at)'$(MAKE)' $(AM_MAKEFLAGS) check-TESTS TESTS='$(TESTS)'
806 # Run only noninteractive parts of the new testsuite.
807 .PHONY: check-noninteractive-new
808 check-noninteractive-new: $(testsuite_deps_uninstalled)
809 $(AM_V_at)$(CD_TESTDIR); \
810 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
811 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
812 -k '!interactive' INNER_TESTSUITEFLAGS=',!interactive' \
815 # Run only interactive parts of the new testsuite.
816 .PHONY: check-interactive
817 check-interactive: $(testsuite_deps_uninstalled)
818 $(AM_V_at)$(CD_TESTDIR); \
819 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
820 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
821 -k interactive -k recursive INNER_TESTSUITEFLAGS=',interactive' \
824 .PHONY: check-noninteractive
825 check-noninteractive: check-noninteractive-old check-noninteractive-new
827 # We need to remove any file droppings left behind by testsuite
830 test -f "$$abs_srcdir/$(TESTSUITE)" && \
831 '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" --clean
833 ## An empty target to depend on when a rule needs to always run
834 ## whenever it is visited.