riscv64: update config.sub and config.guess
[platform/upstream/libtool.git] / Makefile.am
1 ## Makefile.am -- Process this file with automake to produce Makefile.in
2 ##
3 ##   Copyright (C) 2003-2015 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.
12 ##
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.
17 ##
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 #####
24
25 ACLOCAL_AMFLAGS         = -I m4
26
27 AM_CPPFLAGS             =
28 AM_LDFLAGS              =
29
30 SUBDIRS                 = .
31 DIST_SUBDIRS            = $(SUBDIRS)
32 EXTRA_DIST              =
33
34 BUILT_SOURCES           = libtool libtoolize
35
36 CLEANFILES              =
37 MOSTLYCLEANFILES        =
38 DISTCLEANFILES          =
39 MAINTAINERCLEANFILES    =
40
41 include_HEADERS         =
42 noinst_LTLIBRARIES      =
43 lib_LTLIBRARIES         =
44 EXTRA_LTLIBRARIES       =
45
46 # Using 'cd' in backquotes may print the directory name, use this instead:
47 lt__cd          = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
48
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|-.*$$||'`
51
52
53 # ---------- #
54 # Bootstrap. #
55 # ---------- #
56
57 SCRIPT_ENV      = GREP='$(GREP)' SED='$(SED)'
58
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
67
68 EXTRA_DIST     += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
69                   GNUmakefile
70 CLEANFILES     += libtool libtoolize
71
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
90
91 EXTRA_DIST     += $(extract_trace) $(funclib_sh) $(inline_source) \
92                   $(libtoolize_in) $(ltmain_in) $(ltmain_sh) \
93                   $(ltversion_in) $(ltversion_m4) $(options_parser)
94
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'
111
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
116 ## a loop otherwise.
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)
121         @$(rebuild); \
122         if test -f '$@'; then \
123           eval `'$(SED)' -n '/^macro_revision=/p' '$@'`; \
124           test "x$$macro_revision" = "x$$revision" && rebuild=false; \
125         fi; \
126         for prereq in $?; do \
127           case $$prereq in *.version);; *) rebuild=:;; esac; \
128         done; \
129         if $$rebuild; then \
130           rm -f '$@'; \
131           if test -d '$(srcdir)/.git' && git --version >/dev/null 2>&1; then \
132             $(git_commit_count) > '$(srcdir)/.serial'; \
133           fi; \
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)' > '$@'; \
139           chmod a-w '$@'; \
140         fi
141
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)
153         @$(rebuild); \
154         if test -f '$@'; then \
155           eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
156           test "x$$package_revision" = "x$$revision" && rebuild=false; \
157         fi; \
158         for prereq in $?; do \
159           case $$prereq in *.version);; *) rebuild=:;; esac; \
160         done; \
161         if $$rebuild; then \
162           rm -f '$@'; \
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) > '$@'; \
167           chmod a-w '$@'; \
168         fi
169
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
173
174 $(lt_Makefile_am): $(ltdl_mk)
175         $(AM_V_at)rm -f '$@'
176         $(AM_V_GEN)( '$(SED)' -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' \
177               '$(ltdl_mk)'; \
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 ='; \
190           }; \
191           '$(SED)' -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' \
192               '$(ltdl_mk)' \
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 '$@'
199
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).
204 bootstrap_files = \
205     $(lt_Makefile_am) \
206     $(ltmain_sh) \
207     $(ltversion_m4)
208
209 .PHONY: bootstrap-deps bootstrap-deps-prep
210 bootstrap-deps: bootstrap-deps-prep $(bootstrap_files)
211 bootstrap-deps-prep:
212 ## The following variables are substituted by 'bootstrap-dep-preps'
213         @exit_cmd=:; \
214         test -z '$(srcdir)' \
215             && echo "ERROR: don't call $(MAKE) with srcdir unset." \
216             && exit_cmd=exit; \
217         test -z '$(PACKAGE)' \
218             && echo "ERROR: don't call $(MAKE) with PACKAGE unset." \
219             && exit_cmd=exit; \
220         test -z '$(PACKAGE_BUGREPORT)' \
221             && echo "ERROR: don't call $(MAKE) with PACKAGE_BUGREPORT unset." \
222             && exit_cmd=exit; \
223         test -z '$(PACKAGE_NAME)' \
224             && echo "ERROR: don't call $(MAKE) with PACKAGE_NAME unset." \
225             && exit_cmd=exit; \
226         test -z '$(PACKAGE_URL)' \
227             && echo "ERROR: don't call $(MAKE) with PACKAGE_URL unset." \
228             && exit_cmd=exit; \
229         test -z '$(SED)' \
230             && echo "ERROR: don't call $(MAKE) with SED unset." \
231             && exit_cmd=exit; \
232         test -z '$(VERSION)' \
233             && echo "ERROR: don't call $(MAKE) with VERSION unset." \
234             && exit_cmd=exit; \
235         $$exit_cmd 1
236         $(AM_V_at)rm -f $(bootstrap_files)
237
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 = \
241         $(stamp_mk) \
242         $(lt_aclocal_m4) \
243         $(lt_config_h_in) \
244         $(lt_configure)
245
246 all-local: $(LTDL_BOOTSTRAP_DEPS)
247
248
249 ## ---------------- ##
250 ## Libtool scripts. ##
251 ## ---------------- ##
252
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`
255
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'
278
279 # The libtool distributor and the standalone libtool script.
280 bin_SCRIPTS = libtool
281
282 libtoolize: $(libtoolize_in) $(config_status)
283         $(AM_V_at)rm -f '$@'
284         $(AM_V_GEN)$(configure_edit) '$(libtoolize_in)' > '$@'
285         $(AM_V_at)chmod a+x '$@'
286         $(AM_V_at)chmod a-w '$@'
287
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)
292         @$(rebuild); \
293         if test -f '$@'; then \
294           eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
295           test "$$package_revision" = "$$revision" && rebuild=false; \
296         fi; \
297         for prereq in $?; do \
298           case $$prereq in *.version);; *) rebuild=:;; esac; \
299         done; \
300         if $$rebuild; then \
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 '$@'; \
305         fi
306
307
308 ## -------- ##
309 ## Libltdl. ##
310 ## -------- ##
311
312 include libltdl/ltdl.mk
313
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
319
320 lt_obsolete_m4  = $(srcdir)/$(macro_dir)/lt~obsolete.m4
321
322 EXTRA_DIST     += $(lt_aclocal_m4) \
323                   $(lt_configure) \
324                   $(lt_configure_ac) \
325                   $(lt_config_h_in) \
326                   $(lt_Makefile_am) \
327                   $(lt_Makefile_in) \
328                   $(lt_obsolete_m4) \
329                   $(stamp_mk)
330
331 $(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4)
332         $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile
333
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 \
341             *" $$f "*) ;; \
342             *) '$(SED)' \
343                   -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"'\$$||' \
344                   -e 's|\(\$$([^)]*)/\)*'"$(ltdl_ac_aux_dir)/$$f"' ||' \
345                   -e '/^[        ]*\\$$/d' \
346                 '$(lt_Makefile_in)' > "$$T" \
347                   && mv -f "$$T" '$(lt_Makefile_in)';; \
348           esac; \
349         done
350         $(AM_V_GEN)echo stamp > '$@'
351
352 lt_aclocal_m4_deps = \
353         $(lt_obsolete_m4) \
354         $(ltversion_m4) \
355         $(libtool_m4) \
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
362
363 lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps)
364
365 $(lt_aclocal_m4): $(lt_aclocal_m4_deps)
366         $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I ../m4
367
368 $(lt_configure): $(lt_configure_deps)
369         $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOCONF)
370
371 $(lt_config_h_in): $(lt_configure_deps)
372         $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOHEADER)
373         $(AM_V_at)touch '$@'
374
375
376 ## -------------- ##
377 ## Documentation. ##
378 ## -------------- ##
379
380 doc_dir         = $(srcdir)/doc
381
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
386
387 EXTRA_DIST      += $(doc_dir)/gendocs_template
388
389 # A bug in automake 1.11.1 (at least) prevents us from using:
390 #
391 #   info_TEXINFOS       = $(doc_dir)/libtool.texi
392 #
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 \
397                           $(notes_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
402
403 all-local: $(notes_txt)
404
405 $(notes_txt): $(notes_texi)
406         $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \
407             $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)'
408
409 dist_man1_MANS          = $(libtool_1) $(libtoolize_1)
410 MAINTAINERCLEANFILES    += $(dist_man1_MANS)
411 update_mans = \
412   PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
413   $(HELP2MAN) --output='$@'
414
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
418 # run have changed.
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
423
424
425 ## ------------- ##
426 ## Installation. ##
427 ## ------------- ##
428
429 ltdldir         = $(srcdir)/libltdl
430 pkgauxdir       = $(pkgdatadir)/build-aux
431
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)
437
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
442
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 \
447                   Makefile.am \
448                   README \
449                   configure.ac \
450                   aclocal.m4 \
451                   Makefile.in \
452                   config-h.in \
453                   configure \
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 \
459                   libltdl/lt__strl.h \
460                   libltdl/lt_dlloader.h \
461                   libltdl/lt_error.h \
462                   libltdl/lt_system.h \
463                   libltdl/slist.h \
464                   loaders/dld_link.c \
465                   loaders/dlopen.c \
466                   loaders/dyld.c \
467                   loaders/load_add_on.c \
468                   loaders/loadlibrary.c \
469                   loaders/preopen.c \
470                   loaders/shl_load.c \
471                   lt__alloc.c \
472                   lt__argz.c \
473                   lt__dirent.c \
474                   lt__strl.c \
475                   lt_dlloader.c \
476                   lt_error.c \
477                   ltdl.c \
478                   ltdl.h \
479                   ltdl.mk \
480                   slist.c
481
482 install-data-local: $(lt_Makefile_in) install-scripts-local
483         @$(NORMAL_INSTALL)
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"; \
492         done
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"; \
500         done
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"; \
506         done
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"; \
513         done
514         chmod a+x '$(DESTDIR)$(pkgdatadir)/configure'
515
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"
525
526
527 ## ------------- ##
528 ## Distribution. ##
529 ## ------------- ##
530
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
535
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
544
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
548 $(changelog): FORCE
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)' >> '$@'; \
554         fi
555
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
560
561 # Extract all lines up to the first one starting with "##".
562 prologue = perl -ne '/^\#\#/ and exit; print' $(no_thanks)
563
564 # Generate THANKS using git log entries as far as possible, fixing
565 # up ommisions and errors from NO-THANKS configuration.
566 $(thanks): FORCE
567         $(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
568           { \
569             $(prologue); echo; \
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) \
574                   | tr '\t' '\0'; \
575                 git log --pretty=format:'%aN%x00%aE'; \
576               } | $(ASSORT) -u; \
577             } | $(thanks_gen) \
578               | LC_ALL=en_US.UTF-8 sort -f; \
579             echo; \
580             printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
581           } > '$@'; \
582         fi
583
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)
588 $(dotversion):
589         $(AM_V_GEN)echo '$(VERSION)' > '$@T' && mv '$@T' '$@'
590
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]*\)'
594 $(readme): FORCE
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) '$@'; \
600         fi
601
602 git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's|[  ]||g'
603
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; \
614             exit 1; \
615           else :; fi; \
616         done
617
618 distcheck-hook: syntax-check
619
620 uninstall-hook:
621         @$(NORMAL_UNINSTALL)
622         @list='$(pkgltdl_files)'; \
623         for f in $$list; do \
624           echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
625           rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
626         done
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"; \
631         done
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"; \
636         done
637         @p=`echo libtoolize |sed -e '$(transform)'`; \
638         echo " rm -f '$(DESTDIR)$(bindir)/$$p'"; \
639         rm -f "$(DESTDIR)$(bindir)/$$p"
640
641
642 ## ----------- ##
643 ## Test suite. ##
644 ## ----------- ##
645
646 tests_dir       = $(top_srcdir)/tests
647 package_m4      = $(tests_dir)/package.m4
648 testsuite       = $(tests_dir)/testsuite
649
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 \
657                   tests/libtool.at \
658                   tests/demo.at \
659                   tests/pic_flag.at \
660                   tests/with-pic.at \
661                   tests/cdemo.at \
662                   tests/convenience.at \
663                   tests/depdemo.at \
664                   tests/help.at \
665                   tests/duplicate_members.at \
666                   tests/duplicate_conv.at \
667                   tests/duplicate_deps.at \
668                   tests/flags.at \
669                   tests/inherited_flags.at \
670                   tests/link-order.at \
671                   tests/link-order2.at \
672                   tests/fail.at \
673                   tests/shlibpath.at \
674                   tests/runpath-in-lalib.at \
675                   tests/static.at \
676                   tests/export.at \
677                   tests/export-def.at \
678                   tests/search-path.at \
679                   tests/indirect_deps.at \
680                   tests/archive-in-archive.at \
681                   tests/exeext.at \
682                   tests/execute-mode.at \
683                   tests/bindir.at \
684                   tests/cwrapper.at \
685                   tests/deplib-in-subdir.at \
686                   tests/infer-tag.at \
687                   tests/localization.at \
688                   tests/nocase.at \
689                   tests/install.at \
690                   tests/versioning.at \
691                   tests/destdir.at \
692                   tests/old-m4-iface.at \
693                   tests/old-ltdl-iface.at \
694                   tests/am-subdir.at \
695                   tests/lt_dlexit.at \
696                   tests/lt_dladvise.at \
697                   tests/lt_dlopen.at \
698                   tests/lt_dlopen_a.at \
699                   tests/lt_dlopenext.at \
700                   tests/ltdl-libdir.at \
701                   tests/ltdl-api.at \
702                   tests/dlloader-api.at \
703                   tests/loadlibrary.at \
704                   tests/lalib-syntax.at \
705                   tests/resident.at \
706                   tests/slist.at \
707                   tests/need_lib_prefix.at \
708                   tests/mdemo.at \
709                   tests/standalone.at \
710                   tests/subproject.at \
711                   tests/nonrecursive.at \
712                   tests/recursive.at \
713                   tests/tagdemo.at \
714                   tests/template.at \
715                   tests/ctor.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 \
721                   tests/f77demo.at \
722                   tests/fcdemo.at \
723                   tests/darwin.at \
724                   tests/dumpbin-symbols.at \
725                   tests/deplibs-mingw.at \
726                   tests/sysroot.at \
727                   tests/stresstest.at \
728                   tests/cmdline_wrap.at \
729                   $(NOTHING_ELSE)
730
731 EXTRA_DIST     += $(testsuite) $(TESTSUITE_AT) $(package_m4)
732
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)" \
737         AR="$(AR)" \
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)"
750
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"
755
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)"
762
763 $(testsuite): $(package_m4) $(TESTSUITE_AT) Makefile.am
764         $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -I '$(srcdir)/tests' $(TESTSUITE_AT) -o '$@'
765
766 $(package_m4): $(dotversion) Makefile.am
767         $(AM_V_GEN){ \
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)])'; \
775         } > '$@'
776
777 tests/atconfig: $(config_status)
778         $(AM_V_GEN)$(SHELL) '$(config_status)' '$@'
779
780 DISTCLEANFILES += tests/atconfig
781
782 CD_TESTDIR      = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
783
784 testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
785 testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \
786                              $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS)
787
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)
793
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'
800
801 .PHONY: check-noninteractive-old
802 check-noninteractive-old:
803         $(AM_V_at)'$(MAKE)' $(AM_MAKEFLAGS) check-TESTS TESTS='$(TESTS)'
804
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' \
812           $(TESTSUITEFLAGS)
813
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' \
821           $(TESTSUITEFLAGS)
822
823 .PHONY: check-noninteractive
824 check-noninteractive: check-noninteractive-old check-noninteractive-new
825
826 # We need to remove any file droppings left behind by testsuite
827 clean-local:
828         -$(CD_TESTDIR); \
829         test -f "$$abs_srcdir/$(TESTSUITE)" && \
830             '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" --clean
831
832 ## An empty target to depend on when a rule needs to always run
833 ## whenever it is visited.
834 FORCE: