ltmain.in: Use func_warning for all warnings
[libtool.git] / Makefile.am
blob8cc621ea41a6a63e4dbe6bbb2847853b1cf58054
1 ## Makefile.am -- Process this file with automake to produce Makefile.in
2 ##
3 ##   Copyright (C) 2003-2019, 2021-2024 Free Software Foundation, Inc.
4 ##   Written by Gary V. Vaughan, 2003
5 ##
6 ##   This file is part of GNU Libtool.
7 ##
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.
23 #####
25 ACLOCAL_AMFLAGS         = -I m4
27 AM_CPPFLAGS             =
28 AM_LDFLAGS              =
30 SUBDIRS                 = . gnulib-tests
31 DIST_SUBDIRS            = $(SUBDIRS)
32 EXTRA_DIST              =
34 BUILT_SOURCES           = libtool libtoolize
36 CLEANFILES              =
37 MOSTLYCLEANFILES        =
38 DISTCLEANFILES          =
39 MAINTAINERCLEANFILES    =
41 include_HEADERS         =
42 noinst_LTLIBRARIES      =
43 lib_LTLIBRARIES         =
44 EXTRA_LTLIBRARIES       =
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|-.*$$||'`
53 # ---------- #
54 # Bootstrap. #
55 # ---------- #
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 \
69                   GNUmakefile
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
119 ## a loop otherwise.
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)
124         @$(rebuild); \
125         if test -f '$@'; then \
126           eval `'$(SED)' -n '/^macro_revision=/p' '$@'`; \
127           test "x$$macro_revision" = "x$$revision" && rebuild=false; \
128         fi; \
129         for prereq in $?; do \
130           case $$prereq in *.version);; *) rebuild=:;; esac; \
131         done; \
132         if $$rebuild; then \
133           rm -f '$@'; \
134           if test -d '$(srcdir)/.git' && git --version >/dev/null 2>&1; then \
135             $(git_commit_count) > '$(srcdir)/.serial'; \
136           fi; \
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)' > '$@'; \
142           chmod a-w '$@'; \
143         fi
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)
156         @$(rebuild); \
157         if test -f '$@'; then \
158           eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
159           test "x$$package_revision" = "x$$revision" && rebuild=false; \
160         fi; \
161         for prereq in $?; do \
162           case $$prereq in *.version);; *) rebuild=:;; esac; \
163         done; \
164         if $$rebuild; then \
165           rm -f '$@'; \
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) > '$@'; \
170           chmod a-w '$@'; \
171         fi
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)
178         $(AM_V_at)rm -f '$@'
179         $(AM_V_GEN)( '$(SED)' -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' \
180               '$(ltdl_mk)'; \
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 ='; \
193           }; \
194           '$(SED)' -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' \
195               '$(ltdl_mk)' \
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).
207 bootstrap_files = \
208     $(lt_Makefile_am) \
209     $(ltmain_sh) \
210     $(ltversion_m4)
212 .PHONY: bootstrap-deps bootstrap-deps-prep
213 bootstrap-deps: bootstrap-deps-prep
214         $(MAKE) $(bootstrap_files)
216 bootstrap-deps-prep:
217 ## The following variables are substituted by 'bootstrap-dep-preps'
218         @exit_cmd=:; \
219         test -z '$(srcdir)' \
220             && echo "ERROR: don't call $(MAKE) with srcdir unset." \
221             && exit_cmd=exit; \
222         test -z '$(PACKAGE)' \
223             && echo "ERROR: don't call $(MAKE) with PACKAGE unset." \
224             && exit_cmd=exit; \
225         test -z '$(PACKAGE_BUGREPORT)' \
226             && echo "ERROR: don't call $(MAKE) with PACKAGE_BUGREPORT unset." \
227             && exit_cmd=exit; \
228         test -z '$(PACKAGE_NAME)' \
229             && echo "ERROR: don't call $(MAKE) with PACKAGE_NAME unset." \
230             && exit_cmd=exit; \
231         test -z '$(PACKAGE_URL)' \
232             && echo "ERROR: don't call $(MAKE) with PACKAGE_URL unset." \
233             && exit_cmd=exit; \
234         test -z '$(SED)' \
235             && echo "ERROR: don't call $(MAKE) with SED unset." \
236             && exit_cmd=exit; \
237         test -z '$(VERSION)' \
238             && echo "ERROR: don't call $(MAKE) with VERSION unset." \
239             && exit_cmd=exit; \
240         $$exit_cmd 1
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 = \
246         $(stamp_mk) \
247         $(lt_aclocal_m4) \
248         $(lt_config_h_in) \
249         $(lt_configure)
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)
288         $(AM_V_at)rm -f '$@'
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)
297         @$(rebuild); \
298         if test -f '$@'; then \
299           eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
300           test "$$package_revision" = "$$revision" && rebuild=false; \
301         fi; \
302         for prereq in $?; do \
303           case $$prereq in *.version);; *) rebuild=:;; esac; \
304         done; \
305         if $$rebuild; then \
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 '$@'; \
310         fi
313 ## -------- ##
314 ## Libltdl. ##
315 ## -------- ##
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) \
328                   $(lt_configure) \
329                   $(lt_configure_ac) \
330                   $(lt_config_h_in) \
331                   $(lt_Makefile_am) \
332                   $(lt_Makefile_in) \
333                   $(lt_obsolete_m4) \
334                   $(stamp_mk)
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 \
346             *" $$f "*) ;; \
347             *) '$(SED)' \
348                   -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"'\$$||' \
349                   -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"' ||' \
350                   -e '/^[        ]*\\$$/d' \
351                 '$(lt_Makefile_in)' > "$$T" \
352                   && mv -f "$$T" '$(lt_Makefile_in)';; \
353           esac; \
354         done
355         $(AM_V_GEN)echo stamp > '$@'
357 lt_aclocal_m4_deps = \
358         $(lt_obsolete_m4) \
359         $(ltversion_m4) \
360         $(libtool_m4) \
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)
378         $(AM_V_at)touch '$@'
381 ## -------------- ##
382 ## Documentation. ##
383 ## -------------- ##
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 \
402                           $(notes_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)
416 update_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
423 # run have changed.
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
430 ## ------------- ##
431 ## Installation. ##
432 ## ------------- ##
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 \
452                   Makefile.am \
453                   README \
454                   configure.ac \
455                   aclocal.m4 \
456                   Makefile.in \
457                   config-h.in \
458                   configure \
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 \
464                   libltdl/lt__strl.h \
465                   libltdl/lt_dlloader.h \
466                   libltdl/lt_error.h \
467                   libltdl/lt_system.h \
468                   libltdl/slist.h \
469                   loaders/dld_link.c \
470                   loaders/dlopen.c \
471                   loaders/dyld.c \
472                   loaders/load_add_on.c \
473                   loaders/loadlibrary.c \
474                   loaders/preopen.c \
475                   loaders/shl_load.c \
476                   lt__alloc.c \
477                   lt__argz.c \
478                   lt__dirent.c \
479                   lt__strl.c \
480                   lt_dlloader.c \
481                   lt_error.c \
482                   ltdl.c \
483                   ltdl.h \
484                   ltdl.mk \
485                   slist.c
487 install-data-local: $(lt_Makefile_in) install-scripts-local
488         @$(NORMAL_INSTALL)
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"; \
497         done
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"; \
505         done
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"; \
511         done
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"; \
518         done
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"
532 ## ------------- ##
533 ## Distribution. ##
534 ## ------------- ##
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
553 $(changelog): FORCE
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)' >> '$@'; \
561         fi
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.
573 $(thanks): FORCE
574         $(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
575           { \
576             $(prologue); echo; \
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) \
581                   | tr '\t' '\0'; \
582                 git log --pretty=format:'%aN%x00%aE'; \
583               } | $(ASSORT) -u; \
584             } | $(thanks_gen) \
585               | LC_ALL=en_US.UTF-8 sort -f; \
586             echo; \
587             printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
588           } > '$@'; \
589         fi
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)
595 $(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]*\)'
601 $(readme): FORCE
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) '$@'; \
607         fi
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.
618         $(no_bogus_macros)
620 distcheck-hook: syntax-check
622 uninstall-hook:
623         @$(NORMAL_UNINSTALL)
624         @list='$(pkgltdl_files)'; \
625         for f in $$list; do \
626           echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
627           rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
628         done
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"; \
633         done
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"; \
638         done
639         @p=`echo libtoolize |sed -e '$(transform)'`; \
640         echo " rm -f '$(DESTDIR)$(bindir)/$$p'"; \
641         rm -f "$(DESTDIR)$(bindir)/$$p"
644 ## ----------- ##
645 ## Test suite. ##
646 ## ----------- ##
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 \
659                   tests/libtool.at \
660                   tests/demo.at \
661                   tests/pic_flag.at \
662                   tests/with-pic.at \
663                   tests/cdemo.at \
664                   tests/convenience.at \
665                   tests/depdemo.at \
666                   tests/help.at \
667                   tests/duplicate_members.at \
668                   tests/duplicate_conv.at \
669                   tests/duplicate_deps.at \
670                   tests/flags.at \
671                   tests/inherited_flags.at \
672                   tests/link-order.at \
673                   tests/link-order2.at \
674                   tests/fail.at \
675                   tests/shlibpath.at \
676                   tests/runpath-in-lalib.at \
677                   tests/static.at \
678                   tests/export.at \
679                   tests/export-def.at \
680                   tests/search-path.at \
681                   tests/indirect_deps.at \
682                   tests/archive-in-archive.at \
683                   tests/exeext.at \
684                   tests/execute-mode.at \
685                   tests/bindir.at \
686                   tests/cwrapper.at \
687                   tests/deplib-in-subdir.at \
688                   tests/infer-tag.at \
689                   tests/localization.at \
690                   tests/nocase.at \
691                   tests/install.at \
692                   tests/versioning.at \
693                   tests/destdir.at \
694                   tests/old-m4-iface.at \
695                   tests/am-subdir.at \
696                   tests/lt_dlexit.at \
697                   tests/lt_dladvise.at \
698                   tests/lt_dlopen.at \
699                   tests/lt_dlopen_a.at \
700                   tests/lt_dlopenext.at \
701                   tests/ltdl-libdir.at \
702                   tests/ltdl-api.at \
703                   tests/dlloader-api.at \
704                   tests/loadlibrary.at \
705                   tests/lalib-syntax.at \
706                   tests/resident.at \
707                   tests/slist.at \
708                   tests/need_lib_prefix.at \
709                   tests/mdemo.at \
710                   tests/standalone.at \
711                   tests/subproject.at \
712                   tests/nonrecursive.at \
713                   tests/recursive.at \
714                   tests/tagdemo.at \
715                   tests/template.at \
716                   tests/ctor.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 \
722                   tests/f77demo.at \
723                   tests/fcdemo.at \
724                   tests/darwin.at \
725                   tests/dumpbin-symbols.at \
726                   tests/deplibs-mingw.at \
727                   tests/sysroot.at \
728                   tests/stresstest.at \
729                   tests/cmdline_wrap.at \
730                   tests/bug_62343.at    \
731                   $(NOTHING_ELSE)
733 EXTRA_DIST     += $(testsuite) $(TESTSUITE_AT) $(package_m4)
735 # Be sure to reexport important environment variables:
736 TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
737         CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
738         LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
739         AR="$(AR)" \
740         EGREP="$(EGREP)" FGREP="$(FGREP)" GREP="$(GREP)" SED="$(SED)" \
741         STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \
742         MANIFEST_TOOL="$(MANIFEST_TOOL)" \
743         OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
744         SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
745         CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \
746         F77="$(F77)" FFLAGS="$(FFLAGS)" \
747         FC="$(FC)" FCFLAGS="$(FCFLAGS)" \
748         GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \
749         lt_cv_with_aix_soname="$(with_aix_soname)" \
750         lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \
751         lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)"
753 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
754         LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
755         LIBTOOL="$(abs_top_builddir)/libtool" \
756         tst_aclocaldir="$(abs_top_srcdir)/m4"
758 INSTALLCHECK_ENVIRONMENT = \
759         LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
760         LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
761         LTDLINCL="-I$(includedir)" \
762         LIBLTDL="$(libdir)/libltdl.la" \
763         tst_aclocaldir="$(aclocaldir)"
765 $(testsuite): $(package_m4) $(TESTSUITE_AT) Makefile.am
766         $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -I '$(srcdir)/tests' $(TESTSUITE_AT) -o '$@'
768 $(package_m4): $(dotversion) Makefile.am
769         $(AM_V_GEN){ \
770           echo '# Signature of the current package.'; \
771           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])'; \
772           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])'; \
773           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])'; \
774           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])'; \
775           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
776           echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
777         } > '$@'
779 tests/atconfig: $(config_status)
780         $(AM_V_GEN)$(SHELL) '$(config_status)' '$@'
782 DISTCLEANFILES += tests/atconfig
784 CD_TESTDIR      = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
786 testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
787 testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \
788                              $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS)
790 # Hook the test suite into the check rule
791 check-local: $(testsuite_deps_uninstalled)
792         $(AM_V_at)$(CD_TESTDIR); \
793         CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
794           $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
796 # Run the test suite on the *installed* tree.
797 installcheck-local: $(testsuite_deps)
798         $(AM_V_at)$(CD_TESTDIR); \
799         CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
800           $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
801           AUTOTEST_PATH='$(exec_prefix)/bin'
803 .PHONY: check-noninteractive-old
804 check-noninteractive-old:
805         $(AM_V_at)'$(MAKE)' $(AM_MAKEFLAGS) check-TESTS TESTS='$(TESTS)'
807 # Run only noninteractive parts of the new testsuite.
808 .PHONY: check-noninteractive-new
809 check-noninteractive-new: $(testsuite_deps_uninstalled)
810         $(AM_V_at)$(CD_TESTDIR); \
811         CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
812           $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
813           -k '!interactive' INNER_TESTSUITEFLAGS=',!interactive' \
814           $(TESTSUITEFLAGS)
816 # Run only interactive parts of the new testsuite.
817 .PHONY: check-interactive
818 check-interactive: $(testsuite_deps_uninstalled)
819         $(AM_V_at)$(CD_TESTDIR); \
820         CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \
821           $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
822           -k interactive -k recursive INNER_TESTSUITEFLAGS=',interactive' \
823           $(TESTSUITEFLAGS)
825 .PHONY: check-noninteractive
826 check-noninteractive: check-noninteractive-old check-noninteractive-new
828 # We need to remove any file droppings left behind by testsuite
829 clean-local:
830         -$(CD_TESTDIR); \
831         test -f "$$abs_srcdir/$(TESTSUITE)" && \
832             '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" --clean
834 ## An empty target to depend on when a rule needs to always run
835 ## whenever it is visited.
836 FORCE: