Commit Graph

3911 Commits

Author SHA1 Message Date
Gary V. Vaughan
8a7e35d988 syntax-check: rationale for disabling sc_cast_of_x_alloc_return_value.
* cfg.mk: Note that we support C++ compilation of libltdl, which
in turn requires that *alloc return values be cast correctly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 19:19:51 +07:00
Gary V. Vaughan
f3e71d08e8 syntax-check: fix violations and re-enable sc_cast_of_argument_to_free.
* cfg.mk (local-checks-to-fix): Remove
sc_cast_of_argument_to_free from list of disabled checks.
* build-aux/ltmain.m4sh, libltdl/libltdl/lt__alloc.h,
libltdl/lt__dirent.c: Casting argument to free is never
necessary.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 19:11:12 +07:00
Gary V. Vaughan
abc2b152d3 syntax-check: fix violations and re-enable sc_avoid_if_before_free.
* cfg.mk (local-checks-to-fix): Remove sc_avoid_if_before_free
from list of disabled checks.
According to gnulib/doc/free.texi: "On old platforms such as
SunOS4, @code{free (NULL)} fails.  However, since all such
systems are so old as to no longer be considered ``reasonable
portability targets,'' this module is no longer useful."
* libltdl/libltdl/lt__alloc.h (FREE, MEMREASSIGN): Don't protect
against freeing NULL bug on SunOS4.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:57:05 +07:00
Gary V. Vaughan
dbc76d2f97 syntax-check: skip sc_unmarked_diagnostics.
* cfg.mk (local-checks-to-fix): Move sc_unmarked_diagnostics
from here...
(local-checks-to-skip): ...to here.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:57:04 +07:00
Gary V. Vaughan
aa2b2b71fa libtoolize: rename libltdl/config' directory to standard build-aux'.
In addition to moving the autoconf auxiliary script directory
into the place expected by GNU developers ($top_srcdir/build-aux)
we also simplify libtoolize somewhat by having libltdl use
whatever directory was specified by the parent project.  This is
much more flexible, allows libltdl client projects to also use a
single canonical `$top_srcdir/build-aux' auxiliary script
directory, and maintains backward compatibility with existing
projects that wish to continue using $ltdl_dir/config.
* libltdl/config: Moved whole directory from here...
* build-aux: ...to here.
* libtoolize.m4sh (func_install_pkgaux_subproject): Remove.
(func_install_pkgaux_parent): Remove.
(func_install_pkgaux_files): Considerably simplified now that we
have only a single auxiliary directory to worry about.
(subproject_aux_dir): Remove.
* bootstrap.conf (libtool_readme_release_package_substitutions):
No need to substitute our old unusual aux_dir location into
README-release any more.
* cfg.mk (_build-aux): Now that we use the standard location for
this directory, no need to set this variable either.
* configure.ac (AC_INIT): git-version-gen has moved.
(AC_CONFIG_AUX_DIR): Adjust.
* Makefile.am (stamp-mk, auxexefiles, auxfiles)
(install-data-local): Use build-aux instead of config.
(libltdl/stamp-mk): Ditto.
* libltdl/configure.ac, tests/cdemo/configure.ac,
tests/demo/configure.ac, tests/depdemo/configure.ac,
tests/f77demo/configure.ac, tests/fcdemo/configure.ac,
tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
tests/pdemo/configure.ac, tests/tagdemo/configure.ac
(AC_CONFIG_AUX_DIR): Ditto.
* tests/defs.m4sh (aux_dir): Ditto.
* tests/configure-iface.at, tests/getopt-m4sh.at,
tests/libtoolize.at, tests/subproject.at, tests/testsuite.at:
Ditto.
* Makefile.am (ltdl_ac_aux_dir): Extract at build-time...
* libtoolize.m4sh (require_ltdl_ac_aux_dir): ...so that
libtoolize can access it at runtime without requiring GNU M4 via
the extract-trace script.
(require_Makefile_am_filter): Use it to determine whether the
aux_dir declared in the current (parent) project configure is
compatible with the declarations in installed ltdl autotools
source files.
(require_configure_ac_filter): New function to perform similar
checks and rewrite configure.ac during installation if necessary.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:56:40 +07:00
Gary V. Vaughan
cd1292f5bc libtoolize: aux scripts go in ltdl dir when parent has no configure.
When using libtoolize to install subproject libltdl into a
parent project that does not use autotools, set the default
directory for auxiliary scripts inside libltdl rather than
littering the parent project with files it doesn't use.
* libtoolize.m4sh (func_require_ac_aux_dir): In verbose mode,
report results like other require_ funcs.
(func_require_aux_dir): Put subproject auxiliary files into ltdl
directory where libltdl/configure will be able to find
`install-sh' and others.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:15 +07:00
Gary V. Vaughan
435cb8d714 libtoolize: simplify runtime by substituting pkgauxdir.
* Makefile.am (configure_edit): Substitute pkgauxdir.
* libtoolize.m4sh (func_install_pkgaux_subproject)
(func_install_pkgaux_parent, extract_trace): Use it.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:15 +07:00
Gary V. Vaughan
e993037093 libtoolize: generate require_ltdl_relative_aux_dir definition.
* libtoolize.m4sh (require_ltdl_relative_macro_dir): Change to
be generated function...
(require_ltdl_relative_aux_dir): ...so that we can easily
generate this very similar function from the same code.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:15 +07:00
Gary V. Vaughan
bcdfe9f273 libtoolize: rename libltdl/m4' directory to standard m4'.
In addition to moving the autoconf macro directory into the
place expected by GNU developers ($top_srcdir/m4), we also
simplify libtoolize somewhat by having libltdl use whatever
directory was specified by the parent project.  This is much
more flexible, allows libltdl client projects to also use a
single canonical `$top_srcdir/m4' macro directory, and maintains
backward compatibility with existing projects that wish to
continue using $ltdl_dir/m4.
* libltdl/m4: Moved to it's parent directory.
* Makefile.am (ACLOCAL_AMFLAGS, BUILDCHECK_ENVIRONMENT)
(libltdl/Makefile.am, libltdl/aclocal.m4): Adjust.
* configure.ac (AC_CONFIG_MACRO_DIR): Adjust.
* libltdl/configure.ac (AC_CONFIG_MACRO_DIR): Remove. The
libtoolize script can pick up the project macro directory from
ACLOCAL_AMFLAGS in libltdl/Makefile.am, saving us from needing
to regenerate configure for the sake of a different macro
directory declared in the libltdl using client project.
* libtoolize.m4sh (func_install_pkgmacro_subproject): Remove.
(func_install_pkgmacro_parent): Remove.
(subproject_macro_dir): Remove.
(require_libltdl_Makefile_am, require_ltdl_aclocal_amflags)
(require_ltdl_am_macro_dir): New functions, generated at runtime
by adding libltdl/Makefile.am to the generation loop.
(func_install_pkgmacro_files): Considerably simplified now that
we have only a single macro directory to worry about.
(require_ltdl_relative_macro_dir): New function. Calculate the
relative path from $ltdl_dir to the parent project macro_dir.
(require_Makefile_am_filter): Depending on $ltdl_mode, edit
Makefile.am ACLOCAL_AMFLAGS to use the parent project macro
directory if necessary.
(require_aclocal_m4_filter): Make sure m4_includes point to the
correct macro directory by editing the file as it is copied
into the parent project.
(func_install_pkgltdl_files): Use the filters.
(func_check_macros): Remove various advice that no longer
applies with an always shared macro directory.
(func_require_ltdl_dir): Don't default ltdl_dir to subproject
when `--ltdl' was not given.
(func_require_ltdl_mode): Leave ltdl_mode empty when ltdl_dir is
not set.
(func_require_macro_dir): Default to $ltdl_dir/m4 in subproject
mode with no other directory implied by AC_CONFIG_MACRO_DIR or
ACLOCAL_AMFLAGS, otherwise m4 as before.
* tests/libtoolize.at: Match new "creating file `Makefile.am'"
messages correctly.
(subproject ltdl with non-shared directories): This test no
longer makes sense, so repurposed...
(subproject ltdl with non-canonical macro dir): ...this, to
ensure subproject ltdl continues to automatically share the
parent macro directory.
* tests/cdemo/Makefile.am, tests/demo/Makefile.am,
tests/depdemo/Makefile.am, tests/f77demo/Makefile.am,
tests/fcdemo/Makefile.am, tests/mdemo/Makefile.am,
tests/mdemo2/Makefile.am, tests/pdemo/Makefile.am,
tests/tagdemo/Makefile.am (ACLOCAL_AMFLAGS): Use new location
of macro_dir.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:14 +07:00
Gary V. Vaughan
76fff42c2a libtoolize: rename Makefile.inc' to standard ltdl.mk'.
* libltdl/Makefile.inc: Moved from here...
* libltdl/ltdl.mk: ...to here.
* Makefile.am, bootstrap.conf, tests/libtoolize.at,
tests/nonrecursive.at: Adjust.
* libtoolize.m4sh (func_install_pkgltdl_files): Set the
destination file to `Makefile.inc' if grep finds an include for
that name in a top-level Makefile.am.
(func_check_macros): Print a deprecation warning if use of the
old `Makefile.inc' convention is found.
* tests/old-ltdl-iface.at: New test for renaming and warning
correctly when `Makefile.inc' convention is still in use.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:14 +07:00
Gary V. Vaughan
0c19864f3d libtoolize: refactor ACLOCAL_AMFLAGS extraction.
Another simple refactor to simplify following changesets.
* libtoolize.m4sh (require_Makefile_am, require_aclocal_amflags)
(require_am_macro_dir): Generate these functions at runtime.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:14 +07:00
Gary V. Vaughan
5e07c2fc65 libtoolize: rename require_makefile_am to require_Makefile_am.
A simple refactoring to keep the next change self-contained.
* libtoolize.m4sh (require_makefile_am): Renamed from this...
(require_Makefile_am): ...to this.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:14 +07:00
Gary V. Vaughan
eb82543f61 libtoolize: simplify copying of files that are edited during install.
* libltdl/Makefile.inc (EXTRA_DIST): Don't list autotools files
that Automake automatically adds to a (subproject)
distribution...
* Makefile.am (EXTRA_DIST): ...although, our layout is a bit odd
because we reuse libltdl/Makefile.inc in non-recursive mode in
our own tree, so we do need to add those very same files here...
* libtoolize.m4sh (require_Makefile_am_filter)
(require_Makefile_inc_filter): ...all of which means we no
longer need to manually remove those files at libtoolize time.
These two new functions are factored out of...
(func_fixup_Makefile): ...this old function, now removed.
(func_copy): Add support for an optional sed script as the last
argument to filter the content of a file as it is copied.
(func_install_pkgltdl_files): Much simplified by $require_<foo>
the relevant filter scripts and passing them to func_copy.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:14 +07:00
Gary V. Vaughan
4e671d6ba6 libtoolize: simplify file-copying and -linking call-graph.
* libtoolize.m4sh (TAR): Remove.
(func_copy_some_files, func_copy_cb): Remove.
(func_copy): Refactor from all of the above, and simplify. No
need to use $TAR to preserve timestamps when copying, since
we've been running touch right afterwards anyway. Adjust all
callers to use the new argument footprint.
(func_serial_update, func_keyword_update): Delete any pre-
existing destination file when used with `--force' before
calling func_copy, now that the hardcoded special cases are not
in there any more.
(func_install_pkgmacro_subproject)
(func_install_pkgaux_subproject): Use our own file loop -
func_copy subsumes all the checks previously in
func_copy_some_files, but operates on only one file at a time.
(func_install_pkgltdl_files): Similarly, handle aclocal.m4 and
configure special cases here, before calling func_copy.
* tests/libtoolize.at: Make sure we match corrected "copying
`configure.ac'" output.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:51:14 +07:00
Gary V. Vaughan
3e7c10eb67 maint: generate full and correct ChangeLog.
* gnulib: Updated to pick up gitlog-to-changelog multi-author
support.
* gl/build-aux/gitlog-to-changelog.diff: Use gnulib-rejected
patch for '(tiny change)' support.
* Makefile.am (ChangeLog): Use gitlog-to-changelog --amend=F
option.
* libltdl/config/git-hooks/commit-msg: New commit message hook
for git.
* libltdl/config/git-log-fix: New file, with ChangeLog fixes.
* HACKING (Using git): Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-17 17:49:52 +07:00
Gary V. Vaughan
de4c35b810 options-parser: provide a saner pluggable API.
It's much too easy to forget that the functions you hook into
the option parser need to return unconsumed options in the
variable `func_run_hooks_result'; better to follow the
convention used in the rest of bootstrap and return results in a
variable named after the function with `_result' appended.
* libltdl/config/options-parser (func_run_hooks): implement this
new API.
(Option parsing): Update the example in the header comment for
this section to reflect the changes.
* bootstrap (bootstrap_options_prep, bootstrap_parse_options)
(bootstrap_validate_options): Adjust.
* bootstrap.conf (libtool_options_prep, libtool_parse_options)
(libtool_validate_options): Ditto.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-16 12:43:53 +07:00
Gary V. Vaughan
a5ef08182c bootstrap: display accurate usage message.
After splitting bootstrap up, we also lost bootstraps usage
message, and were incorrectly displaying a partial extract-trace
message.
* bootstrap (usage): Set appropriately.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-16 12:13:55 +07:00
Gary V. Vaughan
7285b13522 bootstrap: accept --gnulib-srcdir=/path/to/gnulib again.
During the split of bootstrap into options-parser and
extract-trace, the generic long-option splitting code got lost.
* libltdl/config/options-parser (func_parse_options): Add the
code to split any long option separated by an equals from its
optarg back in.
Reported by Roumen Petrov.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-16 12:08:13 +07:00
Gary V. Vaughan
88224124e4 gnulib: update gnulib submodule.
Among others, this fixes a bug in _build-aux expansion so that
`make syntax-check' works again.
* gnulib: Updated to todays master HEAD revision.
* gl/top/maint.mk.diff: Remove. This patch has been applied
upstream already.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-15 16:54:16 +07:00
Gary V. Vaughan
afe644207a libtoolize: remove NL2SP and initialisation.
There's only a single use of NL2SP, and that is redundant.
* libtoolize.m4sh (func_serial_update): Factor away use of
NL2SP.
(NL2SP, SP2NL): Remove initialisation.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-15 15:34:44 +07:00
Gary V. Vaughan
e8db92c345 bootstrap: remove consumed options from the list to be processed.
Fix a bug where processed bootstrap options were not removed
from the queue, and eventually flagged as unknown in the
pluggable option parser driver.
* bootstrap (bootstrap_parse_options)
(bootstrap_validate_options): Follow the pluggable option parser
API correctly, and set func_run_hooks_result to the list of
remaining unconsumed options.
Reported by Roumen Petrov <bugtrack@roumenpetrov.info>

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-15 13:26:53 +07:00
Gary V. Vaughan
6beb202613 libtoolize: refactor $opt_quiet, func_echo and func_echo_once.
Instead of long sequences checking for setting of $opt_quiet,
followed by one or more func_echo variations, add and use a new
function func_whisper - the complement of func_verbose.
* libtoolize.m4sh (func_whisper): New function. Adjust all
callers previously using `$opt_quiet || func_echo ...'.
(func_whisper_once): Ditto, for `$opt_quiet || func_echo_once
...'.
(func_whisper_hdr): New function, adjust all callers previously
using `func_whisper_once ...; func_whisper ...'.
(func_whisper_error_header): Ditto, but calling func_error.
(func_echo_once): Remove.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-14 17:17:54 +07:00
Gary V. Vaughan
d2be692233 libtoolize: update a bit-rotted comment.
* libtoolize (func_copy_cb): Since this comment was written, the
function has been changed to timestamp files as it copies.
Update the comment to reflect that.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-14 17:17:54 +07:00
Gary V. Vaughan
65f9e9a2e5 general.m4sh: relative path to the same directory is `.'.
* general.m4sh (func_relative_path): We sometimes want to use
the result of this function directly, rather than purely as a
prefix, so we need to return `.' when both directories end up at
the same location.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-14 17:15:39 +07:00
Gary V. Vaughan
0f5df1ceef ltmain.sh: append relative path trailing slashes explicitly.
In addition to being more idiomatic, and hence minimising
suprises, seeing the slash written explicity when appending to
the result of a relative path calculation is a lot more
readable.
* libltdl/config/general.m4sh (func_relative_path): Don't append
an implicit trailing slash...
* libltdl/config/ltmain.m4sh (func_mode_link): ...write it
explicitly at the time of use.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-14 17:11:19 +07:00
Gary V. Vaughan
e73a3b080b build: use pkgauxdir for local install and uninstall rules.
* Makefile.am (pkgauxdir): Set it correctly.
(uninstall-hook): Use it for pkgaux_scripts and
pkgaux_data_files.
(install-data-local): Ditto.
Remove `config/' prefix from extract-trace and option-parser
items.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-09 14:17:35 +07:00
Gary V. Vaughan
43abb0c70b install: correct a typo in pkgaux_files location.
* Makefile.am (install-data-local): Install pkgaux_files
directly from $(aux_dir) [./libltdl/config at the moment].

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-09 00:53:33 +07:00
Gary V. Vaughan
ffe1472772 libtoolize: order pkgltdl_files to avoid reconfiguration.
* Makefile.am (pkgltdl_files): aclocal.m4 depends on
configure.ac, and will cause spurious reconfiguration of freshly
`libtoolize --ltdl' tree if we don't ensure configure.ac is the
older of these two files.
* tests/libtoolize.at: Adjust expout order to match.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-09 00:21:45 +07:00
Gary V. Vaughan
7ce17c8d2e build: remove an over-exuberant $(srcdir) prefix.
* Makefile.am (git_version_gen): No need for an extra $(srcdir)
in the path when we always use after `cd $(srcdir).

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 22:05:45 +07:00
Gary V. Vaughan
b544ca3784 libtoolize: massage installed auxiliary script list at make time.
* Makefile.am (configure_edit): Rename pkgconfig_files
substitution to pkgaux_files, and add pkgaux_install_files and
pkgaux_parent_files substitutions for atlocal.
(pkgauxdir): Where to install pkgaux_files.
(auxfiles): Removed, and replaced by...
(pkgaux_parent_files, pkgaux_install_files, pkgaux_data_files):
...these, which separate the files lists more logically for
easier installation, and use by libtoolize.m4sh.
(uninstall-hook): Adjust.
(tests/atlocal): Adjust.
* bootstrap.conf (libtool_link_libltdl_subdirs): Adjust.
* libtoolize.m4sh (func_install_pkgconfig_files)
(func_install_pkgconfig_subproject)
(func_install_pkgconfig_parent, func_install_pkgconfig_files)
(all_pkgconfig_files): Renamed to...
(func_install_pkgaux_files, unc_install_pkgaux_subproject)
(func_install_pkgaux_parent, func_install_pkgaux_files)
(all_pkgaux_files): ...these, resp. Adjust all callers.
(func_massage_pkgconfig_files): Removed.
(pkgaux_files): List of all auxiliary scripts substituted from
Makefile.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 21:34:13 +07:00
Gary V. Vaughan
99a808be8c libtoolize: massage installed libltdl file list at make time.
* libtoolize.m4sh (pkgltdldir, pkgdatadir): Put installable
libltdl files in pkgdatadir. When testing, and _lt_pkgdatadir
is set, adjust to look in libltdl subdirectory.
(func_massage_pkgltdl_files): Removed function and only caller,
because...
(pkgltdl_files): ...we substitute the pre-massaged files
directly...
(func_install_pkgltdl_files): ...from here.
Adjust installation of specially handled additional files.
* Makefile.am (ltdldir): Location of libltdl files in source
tree.
(ltdldest, ltdldatafiles): Removed.
(pkgltdl_files): New pre-massaged list of libltdl sources.
(install-data-local, uninstall-hook): Use it.
* tests/libtoolize.at: Reorder expected output to match actual
libtoolize output.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 21:34:11 +07:00
Gary V. Vaughan
bcbf77525d libtoolize: massage installed macro list at make time.
* libtoolize.m4sh (func_massage_aclocal_DATA): Removed function
and only caller, because...
(pkgmacro_files): ...we substitute the pre-massaged files
directly...
(func_install_pkgmacro_files): ...from here.
* Makefile.am (pkgmacro_files): New pre-massaged list of aclocal
macros used by func_install_pkgmacro_files.
(configure_edit): Substitute pkgmacro_files instead of
aclocalfiles.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 21:34:06 +07:00
Gary V. Vaughan
09ae980187 libtoolize: use only space delimited file lists.
We don't install any files with whitespace in their file name,
so using colon delimited lists to make that possible was a
premature optimisation and an unneeded complication.
* libtoolize.m4sh (func_copy_some_files): Remove IFS twiddling,
and just pull space delimited files in a for loop idiomatically.
(func_massage_aclocal_DATA, func_install_pkgmacro_subproject)
(func_install_pkgmacro_parent, func_install_pkgmacro_files)
(func_massage_pkgltdl_files, func_massage_pkgconfig_files):
Append to file lists with space delimiter.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 21:33:54 +07:00
Gary V. Vaughan
c6bbcb35f5 libtoolize: remove sed based configure scanning.
* libtoolize (func_scan_files): Removed function and callers.
(require_seen_ltdl, require_seen_libtool): Factor out remaining
functionality of former sed based scanning.
(func_check_macros): Adjust.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:45:21 +07:00
Gary V. Vaughan
ae9967c797 libtoolize: refactor ltdl_mode discovery.
* libtoolize.m4sh (require_ac_ltdl_mode)
(require_ac_ltdl_options, require_ltdl_mode): New functions
factored out of func_scan_files for scanning and setting
ltdl_mode and friends.
(func_scan_files): Remove the factored out code.
(func_install_pkgmacro_files, func_install_pkgltdl_files)
(func_install_pkgconfig_files, func_check_macros): Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:45:13 +07:00
Gary V. Vaughan
55aad37973 libtoolize: refactor ltdl_dir discovery.
* libtoolize.m4sh (require_ac_ltdl_dir, require_ltdl_dir):
New functions factored out of func_scan_files for scanning and
setting ac_ltdl_dir and ltdl_dir resp.
(func_scan_files): Remove the factored out code.
(func_fixup_Makefile, func_serial_update_check)
(func_install_pkgltdl_files, func_install_pkgconfig_subproject)
(func_check_macros): Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:45:10 +07:00
Gary V. Vaughan
02d5c159f2 libtoolize: refactor aux_dir discovery.
* libtoolize.m4sh (require_ac_aux_dir, require_aux_dir): New
functions factored out of func_scan_files for scanning and
setting aux_dir and friends.
(func_scan_files): Remove the factored out code to scan
configure.ac with sed, and then set macro_dir appropriately.
(func_install_pkgconfig_subproject, func_install_pkgconfig_parent)
(func_install_pkgmacro_files, func_check_macros): Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:45:06 +07:00
Gary V. Vaughan
ab423416e9 libtoolize: install autoconf macros only if there is a $configure_ac.
* libtoolize.m4sh (func_install_pkgmacro_files): If there is no
$configure_ac in the parent project directory, and libtoolize is
in subproject mode, then the parent project has no use for
autoconf macros, so don't install them.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:38:46 +07:00
Gary V. Vaughan
827d796bea libtoolize: display aux files output header for non-autoconf parents.
* libtoolize.m4sh (func_install_pkgconfig_subproject): When the
parent project does not use Autoconf, be sure to display an
output header before copying auxiliary files despite not being
able to scan for AC_CONFIG_AUX_DIR arguments.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:38:37 +07:00
Gary V. Vaughan
2a71b02b17 libtoolize: refactor macro_dir discovery around extract-trace script.
* libtoolize.m4sh (func_extract_trace): Function to call
$aux_dir/extract-trace.  The name and footprint are the same as
the core function in the extract-trace script file so that we
can choose to source that file when the option processing
becomes compatible with ours.
(require_ac_macro_dir, require_aclocal_amflags)
(require_am_macro_dir, require_macro_dir, require_makefile_am):
New functions factored out of func_scan_files for scanning and
setting macro_dir and friends.
(func_scan_files): Remove the factored out code to scan
configure.ac with sed, and then set macro_dir appropriately.
(func_serial_update_check, func_install_pkgmacro_subproject)
(func_install_pkgmacro_parent, func_install_pkgmacro_files)
(func_check_macros): Adjust.
* tests/libtoolize.at (Subproject ltdl without GNU M4): New test
to ensure `libtoolize --subproject' continues to work without a
GNU M4 dependency.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:38:34 +07:00
Gary V. Vaughan
6df0b275b5 libtoolize: refactor configure_ac discovery.
Make a start on decomposing some of the giant functions at the
heart of libtoolize into the much more flexible and manageable
(albeit somewhat more verbose) model of self-organising
$require_<foo> function pointers.
* libtoolize.m4sh (require_configure_ac): New function factored
out of func_scan_files for setting $configure_ac appropriately,
implementation taken from extract-trace script.
(func_autoconf_configure): And similarly for ensuring that a
filename which matches something Autoconf would read also has
content that appears to be destined for Autoconf processing.
(func_scan_files): Simplified the factored out code to a single
require_configure_ac call.
(func_install_pkgconfig_files, func_check_macros): Ditto.
(seen_autoconf): Removed.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:38:31 +07:00
Gary V. Vaughan
d5393524f6 bootstrap: split into reusable parts.
* bootstrap: Bourne shell has no scoping, so be extremely
careful with namespaces, functions in `^func_' and `^require_';
private variables in `^_G_', and public variables all well
documented by comments.
* libltdl/config/extract-trace: New file, containing the minimum
of code previously in bootstrap plus a little glue to make the
GNU M4 based autotools tracing function (as opposed to the
kludgy sed extraction currently used everywhere else) a
standalone script that can be executed or sourced.
* libltdl/config/options-parser: New file, containing the
pluggable options parser code shared between the other two.
* bootstrap.conf: Adjust.
* Makefile.am (EXTRA_DIST): Be sure to distribute the new
extract-trace and options-parser scripts.
(install-data-local): And install them where libtoolize can find
them.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:38:27 +07:00
Gary V. Vaughan
0569ec6cd2 tests: prefix absolute directory variables with 'abs_'.
Avoid any possible confusion about the contests of thes
variables compared to $aux_dir, $macro_dir and $src_dir in
configure.ac, Makefile.am, libtoolize.m4sh and others.
* tests/defs.m4sh (aux_dir, macro_dir, srcdir): Rename these...
(abs_aux_dir, abs_macro_dir, abs_srcdir): ...to these resp.
* tests/cdemo-shared-exec.test, tests/cdemo-shared-make.test,
tests/cdemo-static-exec.test, tests/cdemo-static-make.test,
tests/cdemo-undef-exec.test, tests/cdemo-undef-make.test,
tests/demo-nofast-exec.test, tests/demo-nofast-inst.test,
tests/demo-nofast-make.test, tests/demo-nofast-unst.test,
tests/demo-nopic-exec.test, tests/demo-nopic-make.test,
tests/demo-pic-exec.test, tests/demo-pic-make.test,
tests/demo-shared-exec.test, tests/demo-shared-inst.test,
tests/demo-shared-make.test, tests/demo-shared-unst.test,
tests/demo-static-exec.test, tests/demo-static-inst.test,
tests/demo-static-make.test, tests/demo-static-unst.test,
tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test,
tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test,
tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test,
tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test,
tests/depdemo-static-exec.test, tests/depdemo-static-inst.test,
tests/depdemo-static-make.test, tests/depdemo-static-unst.test,
tests/f77demo-shared-exec.test, tests/f77demo-shared-make.test,
tests/f77demo-static-exec.test, tests/f77demo-static-make.test,
tests/fcdemo-shared-exec.test, tests/fcdemo-shared-make.test,
tests/fcdemo-static-exec.test, tests/fcdemo-static-make.test,
tests/mdemo-shared-exec.test, tests/mdemo-shared-inst.test,
tests/mdemo-shared-make.test, tests/mdemo-shared-unst.test,
tests/mdemo-static-exec.test, tests/mdemo-static-inst.test,
tests/mdemo-static-make.test, tests/mdemo-static-unst.test,
tests/sh.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-static-exec.test,
tests/tagdemo-static-make.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagtrace.test: Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:07:52 +07:00
Gary V. Vaughan
04fbe0e383 maint: calculate required mkinstalldirs calls during `make install'.
* Makefile.am (install-data-local): Make sure all destination
directories are in place before copying files there, without
hardcoding them.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:07:43 +07:00
Gary V. Vaughan
0ecdf9b9ed maint: substitute static directory names.
By substituting just the directory name as passed to the macro,
aux_dir can be used with or without $srcdir prefix, which is
more flexible, and always means the same thing in each file,
rather than sometimes being a directory name, sometimes relative
to $top_srcdir.
* configure.ac (AC_CONFIG_AUX_DIR, AC_CONFIG_MACRO_DIR)
(LT_CONFIG_LTDL_DIR): Don't force config.status substitutions
with unexpanded shell variables.
* Makefile.am, tests/defs.m4sh: Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-08 20:07:29 +07:00
Peter Rosin
b7b68a3ce0 libtoolize: fix spelling nit.
* libtoolize (M4SH_GETOPTS): Fix spelling nit.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2011-11-07 11:49:39 +01:00
Gary V. Vaughan
c188507816 tests: fix parsing of configure output by pic_flag.at.
Close http://debbugs.gnu.org/9962.
* tests/pic_flag.at (LT_AT_CONFIGURE): Make sure to configure
with --disable-silent-rules so that the full output parsed by
the rest of the test is available.
Reported by Roumen Petrov.

Signed-off-by: Gary V. Vaughan <gary@vaughan.pe>
2011-11-07 23:43:56 +07:00
Gary V. Vaughan
a0f2576e96 libtoolize: rename `--subproject' option, and make it work.
* libtoolize (M4SH_GETOPTS): Remove `--standalone', which never
worked, and add `--subproject' which sets ltdl_mode correctly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-07 11:37:57 +07:00
Gary V. Vaughan
1cc6d37975 libtoolize: fix a scoping bug in func_aclocal_update_check.
libtoolize.m4sh (func_aclocal_update_check): This body of this
function used a global variable set by the outer loop of the
caller. Fix to Use the function argument correctly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-05 19:45:22 +07:00
Gary V. Vaughan
db48cd3e2b maint: rename the debug shell command variable to `debug_cmd'.
Not only does it make more sense, it also matches bootstrap and
others.
* libtoolize.m4sh, libltdl/config/ltmain.m4sh,
libltdl/config/getopt.m4sh, tests/defs.m4sh (opt_debug): Rename
to debug_cmd.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-05 16:58:31 +07:00