1 ## Makefile.am -- Process this file with automake to produce Makefile.in
3 ## Copyright (C) 2003-2015 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
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 options_parser = $(srcdir)/$(aux_dir)/options-parser
91 EXTRA_DIST += $(extract_trace) $(funclib_sh) $(inline_source) \
92 $(libtoolize_in) $(ltmain_in) $(ltmain_sh) \
93 $(ltversion_in) $(ltversion_m4) $(options_parser)
95 ## These are the replacements that need to be made at bootstrap time,
96 ## because they must be static in distributed files, and not accidentally
97 ## changed by configure running on the build machine.
98 bootstrap_edit = $(SED) \
99 -e 's|@MACRO_VERSION\@|$(VERSION)|g' \
100 -e "s|@MACRO_REVISION\@|$$revision|g" \
101 -e "s|@MACRO_SERIAL\@|$$serial|g" \
102 -e 's|@PACKAGE\@|$(PACKAGE)|g' \
103 -e 's|@PACKAGE_BUGREPORT\@|$(PACKAGE_BUGREPORT)|g' \
104 -e 's|@PACKAGE_URL\@|$(PACKAGE_URL)|g' \
105 -e 's|@PACKAGE_NAME\@|$(PACKAGE_NAME)|g' \
106 -e "s|@package_revision\@|$$revision|g" \
107 -e 's|@PACKAGE_STRING\@|$(PACKAGE_NAME) $(VERSION)|g' \
108 -e 's|@PACKAGE_TARNAME\@|$(PACKAGE)|g' \
109 -e 's|@PACKAGE_VERSION\@|$(VERSION)|g' \
110 -e 's|@VERSION\@|$(VERSION)|g'
112 ## We build ltversion.m4 here, instead of from config.status,
113 ## because config.status is rerun each time one of configure's
114 ## dependencies change and ltversion.m4 happens to be a configure
115 ## dependency. configure and ltversion.m4 would be rebuilt in
117 ## We used to do this with a 'stamp-vcl' file, but non-gmake builds
118 ## would rerun configure on every invocation, so now we manually
119 ## check the version numbers from the build rule when necessary.
120 $(ltversion_m4): $(ltversion_in) $(dotversion)
122 if test -f '$@'; then \
123 eval `'$(SED)' -n '/^macro_revision=/p' '$@'`; \
124 test "x$$macro_revision" = "x$$revision" && rebuild=false; \
126 for prereq in $?; do \
127 case $$prereq in *.version);; *) rebuild=:;; esac; \
131 if test -d '$(srcdir)/.git' && git --version >/dev/null 2>&1; then \
132 $(git_commit_count) > '$(srcdir)/.serial'; \
134 serial=`cat '$(srcdir)/.serial'`; \
135 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
136 then echo " GEN " $@; \
137 else echo $(bootstrap_edit) "'$(ltversion_in)' > '$@'"; fi; \
138 $(bootstrap_edit) '$(ltversion_in)' > '$@'; \
142 ## And for similar reasons, ltmain.sh can't be built from config.status.
143 ## We used to do this with a 'stamp-vcl' file, but non-gmake builds
144 ## would rerun configure on every invocation, so now we manually
145 ## check the version numbers from the build rule when necessary.
146 ## !WARNING! If you edit this rule to change the contents of ltmain.sh,
147 ## you must 'touch $(aux_dir)/ltmain.in' from the
148 ## shell if you need ltmain.sh to be regenerated. Ideally, we
149 ## should make this rule depend on Makefile but that will break
150 ## distcheck (at least) by rebuilding ltmain.sh in the source
151 ## tree whenever config.status regenerates the Makefile.
152 $(ltmain_sh): $(ltmain_in) $(dotversion)
154 if test -f '$@'; then \
155 eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
156 test "x$$package_revision" = "x$$revision" && rebuild=false; \
158 for prereq in $?; do \
159 case $$prereq in *.version);; *) rebuild=:;; esac; \
163 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
164 then echo " GEN " $@; \
165 else echo "$(inline_source) '$(ltmain_in)' |" $(bootstrap_edit) "> '$@'"; fi; \
166 $(SCRIPT_ENV) '$(inline_source)' '$(ltmain_in)' | $(bootstrap_edit) > '$@'; \
170 lt_Makefile_am = $(srcdir)/$(ltdl_dir)/Makefile.am
171 lt_Makefile_in = $(srcdir)/$(ltdl_dir)/Makefile.in
172 ltdl_mk = $(srcdir)/$(ltdl_dir)/ltdl.mk
174 $(lt_Makefile_am): $(ltdl_mk)
176 $(AM_V_GEN)( '$(SED)' -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' \
178 { echo 'ACLOCAL_AMFLAGS = -I ../m4'; \
179 echo 'AUTOMAKE_OPTIONS = foreign'; \
180 echo 'AM_CPPFLAGS ='; \
181 echo 'AM_LDFLAGS ='; \
182 echo 'BUILT_SOURCES ='; \
183 echo 'include_HEADERS ='; \
184 echo 'noinst_LTLIBRARIES ='; \
185 echo 'lib_LTLIBRARIES ='; \
186 echo 'EXTRA_LTLIBRARIES ='; \
187 echo 'EXTRA_DIST ='; \
188 echo 'CLEANFILES ='; \
189 echo 'MOSTLYCLEANFILES ='; \
191 '$(SED)' -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' \
193 |'$(SED)' -e 's|libltdl_||; s|libltdl/||; s|: libltdl/|: |' \
194 -e '/^[ ]*-I\$$(srcdir)\/libltdl -Ilibltdl \\/d' \
195 -e 's|\$$(libltdl_|$$(|' \
196 ) |'$(SED)' -e '/^.. DO NOT REMOVE THIS LINE -- /d' \
197 -e '1s,^\(.. Makefile.\)inc.*,\1am -- Process this file with automake to produce Makefile.in,' > '$@'
198 $(AM_V_at)chmod a-w '$@'
200 ## Document the make macros that are needed to build bootstrap-deps
201 ## dependencies when called from 'bootstrap' (developer's machine),
202 ## where the Makefile.am is fed to make in its raw format before
203 ## 'configure' has found the correct values (on the build machine).
209 .PHONY: bootstrap-deps bootstrap-deps-prep
210 bootstrap-deps: bootstrap-deps-prep $(bootstrap_files)
212 ## The following variables are substituted by 'bootstrap-dep-preps'
214 test -z '$(srcdir)' \
215 && echo "ERROR: don't call $(MAKE) with srcdir unset." \
217 test -z '$(PACKAGE)' \
218 && echo "ERROR: don't call $(MAKE) with PACKAGE unset." \
220 test -z '$(PACKAGE_BUGREPORT)' \
221 && echo "ERROR: don't call $(MAKE) with PACKAGE_BUGREPORT unset." \
223 test -z '$(PACKAGE_NAME)' \
224 && echo "ERROR: don't call $(MAKE) with PACKAGE_NAME unset." \
226 test -z '$(PACKAGE_URL)' \
227 && echo "ERROR: don't call $(MAKE) with PACKAGE_URL unset." \
230 && echo "ERROR: don't call $(MAKE) with SED unset." \
232 test -z '$(VERSION)' \
233 && echo "ERROR: don't call $(MAKE) with VERSION unset." \
236 $(AM_V_at)rm -f $(bootstrap_files)
238 ## Unfortunately, all this bogeyness means that we have to manually
239 ## keep the generated files in libltdl up to date.
240 LTDL_BOOTSTRAP_DEPS = \
246 all-local: $(LTDL_BOOTSTRAP_DEPS)
249 ## ---------------- ##
250 ## Libtool scripts. ##
251 ## ---------------- ##
253 abs_aux_dir = `$(lt__cd) '$(srcdir)/$(aux_dir)' && pwd`
254 ltdl_ac_aux_dir = `$(SCRIPT_ENV) $(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac`
256 configure_edit = $(bootstrap_edit) \
257 -e '/^\. /s|@auxscriptsdir\@|'$(abs_aux_dir)'|g' \
258 -e 's|@aclocaldir\@|$(aclocaldir)|g' \
259 -e 's|@aux_dir\@|$(aux_dir)|g' \
260 -e 's|@datadir\@|$(datadir)|g' \
261 -e 's|@EGREP\@|$(EGREP)|g' \
262 -e 's|@FGREP\@|$(FGREP)|g' \
263 -e 's|@GREP\@|$(GREP)|g' \
264 -e 's|@host_triplet\@|$(host_triplet)|g' \
265 -e 's|@LN_S\@|$(LN_S)|g' \
266 -e "s|@ltdl_ac_aux_dir\@|$(ltdl_ac_aux_dir)|g" \
267 -e 's|@macro_dir\@|$(macro_dir)|g' \
268 -e 's|@pkgauxdir\@|$(pkgauxdir)|g' \
269 -e 's|@pkgaux_files\@|$(pkgaux_scripts) $(pkgaux_data_files)|g' \
270 -e 's|@pkgaux_install_files\@|$(pkgaux_install_files)|g' \
271 -e 's|@pkgaux_parent_files\@|$(pkgaux_parent_files)|g' \
272 -e 's|@pkgdatadir\@|$(pkgdatadir)|g' \
273 -e 's|@pkgltdl_files\@|$(pkgltdl_files)|g' \
274 -e 's|@pkgmacro_files\@|$(pkgmacro_files)|g' \
275 -e 's|@prefix\@|$(prefix)|g' \
276 -e 's|@SED\@|$(SED)|g' \
277 -e 's|@srcdir\@|$(srcdir)|g'
279 # The libtool distributor and the standalone libtool script.
280 bin_SCRIPTS = libtool
282 libtoolize: $(libtoolize_in) $(config_status)
284 $(AM_V_GEN)$(configure_edit) '$(libtoolize_in)' > '$@'
285 $(AM_V_at)chmod a+x '$@'
286 $(AM_V_at)chmod a-w '$@'
288 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
289 # would rerun configure on every invocation, so now we manually
290 # check the version numbers from the build rule when necessary.
291 libtool: $(ltmain_sh) $(config_status) $(dotversion)
293 if test -f '$@'; then \
294 eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
295 test "$$package_revision" = "$$revision" && rebuild=false; \
297 for prereq in $?; do \
298 case $$prereq in *.version);; *) rebuild=:;; esac; \
301 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
302 then echo " GEN " $@; \
303 else echo '$(SHELL) $(top_builddir)/config.status "$@"'; fi; \
304 cd '$(top_builddir)' && '$(SHELL)' ./config.status '$@'; \
312 include libltdl/ltdl.mk
314 lt_aclocal_m4 = $(srcdir)/$(ltdl_dir)/aclocal.m4
315 lt_config_h_in = $(srcdir)/$(ltdl_dir)/config-h.in
316 lt_configure = $(srcdir)/$(ltdl_dir)/configure
317 lt_configure_ac = $(srcdir)/$(ltdl_dir)/configure.ac
318 stamp_mk = $(srcdir)/$(ltdl_dir)/stamp-mk
320 lt_obsolete_m4 = $(srcdir)/$(macro_dir)/lt~obsolete.m4
322 EXTRA_DIST += $(lt_aclocal_m4) \
331 $(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4)
332 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile
334 # Don't let unused scripts leak into the libltdl Makefile
335 $(stamp_mk): $(lt_Makefile_in)
336 $(AM_V_at)T='$(srcdir)/$(aux_dir)/Makefile.tmp'; \
337 for p in $(srcdir)/$(aux_dir)/*; do \
338 test -f "$$p" || continue; \
339 f=`echo "$$p" | $(SED) 's|^$(srcdir)/$(aux_dir)/||'`; \
340 case " $(pkgaux_scripts) ltmain.sh " in \
343 -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"'\$$||' \
344 -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"' ||' \
346 '$(lt_Makefile_in)' > "$$T" \
347 && mv -f "$$T" '$(lt_Makefile_in)';; \
350 $(AM_V_GEN)echo stamp > '$@'
352 lt_aclocal_m4_deps = \
356 $(srcdir)/$(macro_dir)/ltargz.m4 \
357 $(srcdir)/$(macro_dir)/ltdl.m4 \
358 $(srcdir)/$(macro_dir)/ltoptions.m4 \
359 $(srcdir)/$(macro_dir)/ltsugar.m4 \
360 $(srcdir)/$(macro_dir)/m4.m4 \
361 $(srcdir)/$(ltdl_dir)/configure.ac
363 lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps)
365 $(lt_aclocal_m4): $(lt_aclocal_m4_deps)
366 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I ../m4
368 $(lt_configure): $(lt_configure_deps)
369 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOCONF)
371 $(lt_config_h_in): $(lt_configure_deps)
372 $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOHEADER)
380 doc_dir = $(srcdir)/doc
382 libtool_1 = $(doc_dir)/libtool.1
383 libtoolize_1 = $(doc_dir)/libtoolize.1
384 notes_texi = $(doc_dir)/notes.texi
385 notes_txt = $(doc_dir)/notes.txt
387 EXTRA_DIST += $(doc_dir)/gendocs_template
389 # A bug in automake 1.11.1 (at least) prevents us from using:
391 # info_TEXINFOS = $(doc_dir)/libtool.texi
393 # Producing the following error, even though srcdir is implicitly set:
394 # "cannot open < ./$(srcdir)/doc/libtool.texi: No such file or directory"
395 info_TEXINFOS = doc/libtool.texi
396 doc_libtool_TEXINFOS = $(doc_dir)/PLATFORMS $(doc_dir)/fdl.texi \
398 EXTRA_DIST += $(notes_txt)
399 ## Workaround for a texinfo bug described here:
400 ## http://thread.gmane.org/gmane.comp.tex.texinfo.bugs/3930
401 DISTCLEANFILES += libtool.dvi
403 all-local: $(notes_txt)
405 $(notes_txt): $(notes_texi)
406 $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \
407 $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)'
409 dist_man1_MANS = $(libtool_1) $(libtoolize_1)
410 MAINTAINERCLEANFILES += $(dist_man1_MANS)
412 PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
413 $(HELP2MAN) --output='$@'
415 # It's wrong to make distributed files (e.g. $(libtool_1)) rely on
416 # files created in the build tree, so instead we regenerate the
417 # manual pages if the sources for the build-tree files we want to
419 $(libtool_1): $(ltmain_sh)
420 $(AM_V_GEN)$(update_mans) --help-option=--help-all libtool
421 $(libtoolize_1): $(libtoolize_in)
422 $(AM_V_GEN)$(update_mans) libtoolize
429 ltdldir = $(srcdir)/libltdl
430 pkgauxdir = $(pkgdatadir)/build-aux
432 # The timestamps on these files must be preserved carefully so we install,
433 # uninstall and set executable with custom rules here.
434 pkgaux_parent_files = ltmain.sh
435 pkgaux_install_files = config.guess config.sub install-sh
436 pkgaux_data_files = $(pkgaux_parent_files)
438 # Everything that gets picked up by aclocal is automatically distributed,
439 # this is the list of macro files we install on the user's system.
440 pkgmacro_files = libtool.m4 ltargz.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 \
441 ltversion.m4 lt~obsolete.m4
443 ## These are installed as a subdirectory of pkgdatadir so that
444 ## libtoolize --ltdl can find them later. Note that this list requires
445 ## specific order to avoid unnecessary re-autotooling after libtoolize run.
446 pkgltdl_files = COPYING.LIB \
454 libltdl/lt__alloc.h \
455 libltdl/lt__argz_.h \
456 libltdl/lt__dirent.h \
457 libltdl/lt__glibc.h \
458 libltdl/lt__private.h \
460 libltdl/lt_dlloader.h \
462 libltdl/lt_system.h \
467 loaders/load_add_on.c \
468 loaders/loadlibrary.c \
482 install-data-local: $(lt_Makefile_in) install-scripts-local
484 ## Don't install over the top of an old pkgdatadir
485 -rm -rf '$(DESTDIR)$(pkgdatadir)'/*
486 ## First, put a copy of the libtool m4 macros in the aclocal dir
487 @list='$(pkgmacro_files)'; for p in $$list; do \
488 d=`echo "$(DESTDIR)$(aclocaldir)/$$p" |$(SED) 's|[^/]*$$||'`; \
489 test -d "$$d" || $(mkinstalldirs) "$$d"; \
490 echo " $(INSTALL_DATA) '$(srcdir)/$(macro_dir)/$$p' '$(DESTDIR)$(aclocaldir)/$$p'"; \
491 $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$p" "$(DESTDIR)$(aclocaldir)/$$p"; \
493 ## install the helper scripts
494 @list='$(pkgaux_scripts)' && \
495 for p in $$list; do \
496 d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \
497 test -d "$$d" || $(mkinstalldirs) "$$d"; \
498 echo " $(INSTALL_SCRIPT) '$(srcdir)/$(aux_dir)/$$p' '$(DESTDIR)$(pkgauxdir)/$$p'"; \
499 $(INSTALL_SCRIPT) "$(srcdir)/$(aux_dir)/$$p" "$(DESTDIR)$(pkgauxdir)/$$p"; \
501 @list='$(pkgaux_data_files)' && for p in $$list; do \
502 d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \
503 test -d "$$d" || $(mkinstalldirs) "$$d"; \
504 echo " $(INSTALL_DATA) '$(srcdir)/$(aux_dir)/$$p' '$(DESTDIR)$(pkgauxdir)/$$p'"; \
505 $(INSTALL_DATA) "$(srcdir)/$(aux_dir)/$$p" "$(DESTDIR)$(pkgauxdir)/$$p"; \
507 ## install the libltdl files
508 @list='$(pkgltdl_files)' && for p in $$list; do \
509 d=`echo "$(DESTDIR)$(pkgdatadir)/$$p" |$(SED) 's|[^/]*$$||'`; \
510 test -d "$$d" || $(mkinstalldirs) "$$d"; \
511 echo " $(INSTALL_DATA) '$(ltdldir)/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \
512 $(INSTALL_DATA) "$(ltdldir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \
514 chmod a+x '$(DESTDIR)$(pkgdatadir)/configure'
516 .PHONY: install-scripts-local
517 install-scripts-local: $(lt_Makefile_in)
518 ## Inline helper-scripts for installed libtoolize script
519 @p=`echo libtoolize |sed -e '$(transform)'`; \
520 echo " $(SCRIPT_ENV) '$(inline_source)' libtoolize > '$(DESTDIR)$(bindir)/$$p'"; \
521 d=`echo "$(DESTDIR)$(bindir)/$$p" |$(SED) 's|[^/]*$$||'`; \
522 test -d "$$d" || $(mkinstalldirs) "$$d"; \
523 $(SCRIPT_ENV) '$(inline_source)' libtoolize > "$(DESTDIR)$(bindir)/$$p"; \
524 chmod a+x "$(DESTDIR)$(bindir)/$$p"
531 edit_readme_alpha = $(srcdir)/$(aux_dir)/edit-readme-alpha
532 gitlog_to_changelog = $(srcdir)/$(aux_dir)/gitlog-to-changelog
533 git_log_fix = $(srcdir)/$(aux_dir)/git-log-fix
534 thanks_gen = $(srcdir)/$(aux_dir)/thanks-gen
536 dotserial = $(distdir)/.serial
537 dotversion = $(srcdir)/.version
538 tarball_version = $(distdir)/.tarball-version
539 readme = $(distdir)/README
540 changelog = $(distdir)/ChangeLog
541 changelog_old = $(srcdir)/ChangeLog.old
542 thanks = $(distdir)/THANKS
543 no_thanks = $(srcdir)/NO-THANKS
545 # Generate ChangeLog using git log entries for as far back as
546 # they are in good shape, appending manual records from earlier.
547 changelog_start_date = 2011-01-01
549 $(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
550 $(gitlog_to_changelog) --amend=$(git_log_fix) \
551 --since=$(changelog_start_date) > '$@T'; \
552 rm -f '$@'; mv '$@T' '$@'; \
553 cat '$(changelog_old)' >> '$@'; \
556 # Sort in traditional ASCII order, regardless of the current locale;
557 # otherwise we may get into trouble with distinct strings that the
558 # current locale considers to be equal.
559 ASSORT = LC_ALL=C sort
561 # Extract all lines up to the first one starting with "##".
562 prologue = perl -ne '/^\#\#/ and exit; print' $(no_thanks)
564 # Generate THANKS using git log entries as far as possible, fixing
565 # up ommisions and errors from NO-THANKS configuration.
567 $(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
570 { perl -ne '/^$$/.../^$$/ and print' $(no_thanks) \
571 | grep -v '^$$' | perl -pe 's/ +/\0/'; \
572 { sed -e '1,/\#\# /d' -e '/^\#\# /d' \
573 -e 's|[ ][ ]*| |' < $(no_thanks) \
575 git log --pretty=format:'%aN%x00%aE'; \
578 | LC_ALL=en_US.UTF-8 sort -f; \
580 printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
584 ## Arrange so that .version appears only in the distribution
585 ## tarball, and never in a checked-out repository.
586 EXTRA_DIST += $(dotversion)
587 BUILT_SOURCES += $(dotversion)
589 $(AM_V_GEN)echo '$(VERSION)' > '$@T' && mv '$@T' '$@'
591 ## Edit the README file for alpha releases.
592 EXTRA_DIST += $(edit_readme_alpha)
593 re_alpha_version = '\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*[-\.][-\.0-9a-z]*\)'
595 @if test -n `expr $(VERSION) : $(re_alpha_version)`; then \
596 if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \
597 then echo " GEN " $@; \
598 else echo "$(SHELL) $(edit_readme_alpha) $@"; fi; \
599 $(SHELL) $(edit_readme_alpha) '$@'; \
602 git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's|[ ]||g'
604 dist-hook: $(changelog) $(thanks) $(dotversion) $(readme)
605 ## Arrange so that .tarball-version appears only in the distribution
606 ## tarball, and never in a checked-out repository.
607 echo '$(VERSION)' > $(tarball_version)
608 ## ...and similarly for .serial.
609 $(git_commit_count) > $(dotserial)
610 ## Ensure aclocal has not wrongly picked up old macro definitions.
611 @for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do \
612 if grep "$$macro" '$(srcdir)/aclocal.m4' '$(lt_aclocal_m4)'; then \
613 echo "Bogus $$macro macro contents in an aclocal.m4 file." >&2; \
618 distcheck-hook: syntax-check
622 @list='$(pkgltdl_files)'; \
623 for f in $$list; do \
624 echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
625 rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
627 @list='$(pkgaux_scripts) $(pkgaux_data_files)'; \
628 for f in $$list; do \
629 echo " rm -f '$(DESTDIR)$(pkgauxdir)/$$f'"; \
630 rm -f "$(DESTDIR)$(pkgauxdir)/$$f"; \
632 @for p in $(pkgmacro_files); do \
633 f=`echo "$$p" |$(SED) 's|^.*/||'`; \
634 echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
635 rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
637 @p=`echo libtoolize |sed -e '$(transform)'`; \
638 echo " rm -f '$(DESTDIR)$(bindir)/$$p'"; \
639 rm -f "$(DESTDIR)$(bindir)/$$p"
646 tests_dir = $(top_srcdir)/tests
647 package_m4 = $(tests_dir)/package.m4
648 testsuite = $(tests_dir)/testsuite
650 # The testsuite files are evaluated in the order given here. When
651 # adding new tests, make sure cmdline_wrap.at stays at the end so
652 # that it can check for previous failures and skip if necessary.
653 TESTSUITE = tests/testsuite
654 TESTSUITE_AT = tests/testsuite.at \
655 tests/configure-funcs.at \
656 tests/libtoolize.at \
662 tests/convenience.at \
665 tests/duplicate_members.at \
666 tests/duplicate_conv.at \
667 tests/duplicate_deps.at \
669 tests/inherited_flags.at \
670 tests/link-order.at \
671 tests/link-order2.at \
674 tests/runpath-in-lalib.at \
677 tests/export-def.at \
678 tests/search-path.at \
679 tests/indirect_deps.at \
680 tests/archive-in-archive.at \
682 tests/execute-mode.at \
685 tests/deplib-in-subdir.at \
687 tests/localization.at \
690 tests/versioning.at \
692 tests/old-m4-iface.at \
693 tests/old-ltdl-iface.at \
696 tests/lt_dladvise.at \
698 tests/lt_dlopen_a.at \
699 tests/lt_dlopenext.at \
700 tests/ltdl-libdir.at \
702 tests/dlloader-api.at \
703 tests/loadlibrary.at \
704 tests/lalib-syntax.at \
707 tests/need_lib_prefix.at \
709 tests/standalone.at \
710 tests/subproject.at \
711 tests/nonrecursive.at \
716 tests/exceptions.at \
717 tests/early-libtool.at \
718 tests/no-executables.at \
719 tests/deplibs-ident.at \
720 tests/configure-iface.at \
724 tests/dumpbin-symbols.at \
725 tests/deplibs-mingw.at \
727 tests/stresstest.at \
728 tests/cmdline_wrap.at \
731 EXTRA_DIST += $(testsuite) $(TESTSUITE_AT) $(package_m4)
733 # Be sure to reexport important environment variables:
734 TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
735 CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
736 LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
738 EGREP="$(EGREP)" FGREP="$(FGREP)" GREP="$(GREP)" SED="$(SED)" \
739 STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \
740 MANIFEST_TOOL="$(MANIFEST_TOOL)" \
741 OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
742 SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
743 CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \
744 F77="$(F77)" FFLAGS="$(FFLAGS)" \
745 FC="$(FC)" FCFLAGS="$(FCFLAGS)" \
746 GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \
747 lt_cv_with_aix_soname="$(with_aix_soname)" \
748 lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \
749 lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)"
751 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
752 LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
753 LIBTOOL="$(abs_top_builddir)/libtool" \
754 tst_aclocaldir="$(abs_top_srcdir)/m4"
756 INSTALLCHECK_ENVIRONMENT = \
757 LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
758 LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
759 LTDLINCL="-I$(includedir)" \
760 LIBLTDL="$(libdir)/libltdl.la" \
761 tst_aclocaldir="$(aclocaldir)"
763 $(testsuite): $(package_m4) $(TESTSUITE_AT) Makefile.am
764 $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -I '$(srcdir)/tests' $(TESTSUITE_AT) -o '$@'
766 $(package_m4): $(dotversion) Makefile.am
768 echo '# Signature of the current package.'; \
769 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \
770 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \
771 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \
772 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \
773 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
774 echo 'm4_define([AT_PACKAGE_URL], [$(PACKAGE_URL)])'; \
777 tests/atconfig: $(config_status)
778 $(AM_V_GEN)$(SHELL) '$(config_status)' '$@'
780 DISTCLEANFILES += tests/atconfig
782 CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
784 testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
785 testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \
786 $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS)
788 # Hook the test suite into the check rule
789 check-local: $(testsuite_deps_uninstalled)
790 $(AM_V_at)$(CD_TESTDIR); \
791 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
792 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
794 # Run the test suite on the *installed* tree.
795 installcheck-local: $(testsuite_deps)
796 $(AM_V_at)$(CD_TESTDIR); \
797 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
798 $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
799 AUTOTEST_PATH='$(exec_prefix)/bin'
801 .PHONY: check-noninteractive-old
802 check-noninteractive-old:
803 $(AM_V_at)'$(MAKE)' $(AM_MAKEFLAGS) check-TESTS TESTS='$(TESTS)'
805 # Run only noninteractive parts of the new testsuite.
806 .PHONY: check-noninteractive-new
807 check-noninteractive-new: $(testsuite_deps_uninstalled)
808 $(AM_V_at)$(CD_TESTDIR); \
809 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
810 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
811 -k '!interactive' INNER_TESTSUITEFLAGS=',!interactive' \
814 # Run only interactive parts of the new testsuite.
815 .PHONY: check-interactive
816 check-interactive: $(testsuite_deps_uninstalled)
817 $(AM_V_at)$(CD_TESTDIR); \
818 CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
819 $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
820 -k interactive -k recursive INNER_TESTSUITEFLAGS=',interactive' \
823 .PHONY: check-noninteractive
824 check-noninteractive: check-noninteractive-old check-noninteractive-new
826 # We need to remove any file droppings left behind by testsuite
829 test -f "$$abs_srcdir/$(TESTSUITE)" && \
830 '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" --clean
832 ## An empty target to depend on when a rule needs to always run
833 ## whenever it is visited.