libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] maint: rename `libltdl/config' directory to standard `build-


From: Gary V. Vaughan
Subject: [PATCH 1/3] maint: rename `libltdl/config' directory to standard `build-aux'.
Date: Tue, 1 Nov 2011 21:19:34 +0700

This next series of changesets is the beginning of modelling the directory
and filenaming conventions of Libtool to match what is done by other
prominent GNU projects... this means that gnulib scripts will require less
tweaking and configuration, so we can use them in the configuration in which
they have been most widely tested and debugged.  Also, it makes everything
look more familiar to anyone coming from another GNU project who is hoping
to generate some patches for us... and every little thing we can do to reduce
friction in that process is a net win as far as I am concerned.

I've attached the full patch which is ridiculously large for a simple
directory move and fixing the fallout in the files that care.  The first part
is reproduced below.

I'll push in 72 hours or so, pending feedback as usual.

* bootstrap.conf (libtool_readme_release_package_substitutions):
No need to substitute our unusual aux-dir location into
README-release any more.
(libtool_link_libltdl_subdirs): Create symlinks to build-aux
files needed by libltdl.
* cfg.mk (_build-aux): Now that we use the standard location for
this directory, no need to set this variable.
* 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.
* libtoolize.m4sh (func_install_pkgconfig_parent)
(subproject_aux_dir): 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.

Signed-off-by: Gary V. Vaughan <address@hidden>
---
 Makefile.am                      |   68 +-
 bootstrap.conf                   |   60 +-
 build-aux/.gitignore             |   18 +
 build-aux/cvsu                   |  512 +++
 build-aux/edit-readme-alpha      |   94 +
 build-aux/general.m4sh           |  623 +++
 build-aux/getopt.m4sh            |  648 +++
 build-aux/ltmain.m4sh            | 8867 ++++++++++++++++++++++++++++++++++++++
 cfg.mk                           |    1 -
 configure.ac                     |    8 +-
 libltdl/.gitignore               |    2 +-
 libltdl/config/.gitignore        |   18 -
 libltdl/config/cvsu              |  512 ---
 libltdl/config/edit-readme-alpha |   94 -
 libltdl/config/general.m4sh      |  623 ---
 libltdl/config/getopt.m4sh       |  648 ---
 libltdl/config/ltmain.m4sh       | 8867 --------------------------------------
 libltdl/configure.ac             |    2 +-
 libtoolize.m4sh                  |   10 +-
 tests/cdemo/configure.ac         |    2 +-
 tests/configure-iface.at         |    6 +-
 tests/demo/configure.ac          |    2 +-
 tests/depdemo/configure.ac       |    2 +-
 tests/f77demo/configure.ac       |    2 +-
 tests/fcdemo/configure.ac        |    2 +-
 tests/getopt-m4sh.at             |    4 +-
 tests/libtoolize.at              |   52 +-
 tests/mdemo/configure.ac         |    2 +-
 tests/mdemo2/configure.ac        |    2 +-
 tests/pdemo/configure.ac         |    2 +-
 tests/subproject.at              |    2 +-
 tests/tagdemo/configure.ac       |    2 +-
 tests/testsuite.at               |    6 +-
 33 files changed, 10914 insertions(+), 10849 deletions(-)
 create mode 100644 build-aux/.gitignore
 create mode 100755 build-aux/cvsu
 create mode 100755 build-aux/edit-readme-alpha
 create mode 100644 build-aux/general.m4sh
 create mode 100644 build-aux/getopt.m4sh
 create mode 100644 build-aux/ltmain.m4sh
 delete mode 100644 libltdl/config/.gitignore
 delete mode 100755 libltdl/config/cvsu
 delete mode 100755 libltdl/config/edit-readme-alpha
 delete mode 100644 libltdl/config/general.m4sh
 delete mode 100644 libltdl/config/getopt.m4sh
 delete mode 100644 libltdl/config/ltmain.m4sh

diff --git a/Makefile.am b/Makefile.am
index d4e25cc..db98870 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -343,9 +343,9 @@ $(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4)
 # Don't let unused scripts leak into the libltdl Makefile
 $(stamp_mk): $(lt_Makefile_in)
        $(AM_V_at)T='$(ltdl_dir)/Makefile.tmp'; \
-       for p in $(ltdl_dir)/config/*; do \
+       for p in $(srcdir)/build-aux/*; do \
          test -f "$$p" || continue; \
-         f=`echo "$$p" | $(SED) 's,^$(ltdl_dir)/,,'`; \
+         f=`echo "$$p" | $(SED) 's,^$(srcdir)/,,'`; \
          case " $(pkgaux_scripts) " in \
            *" $$f "*) ;; \
            *) '$(SED)' \
@@ -435,34 +435,42 @@ $(libtoolize_1): $(libtoolize_in)
 
 # The timestamps on these files must be preserved carefully so we install,
 # uninstall and set executable with custom rules here.
-auxfiles       = $(pkgaux_scripts) config/ltmain.sh
+auxdest                = build-aux
+auxfiles       = $(pkgaux_scripts) $(auxdest)/ltmain.sh
 
 # Everything that gets picked up by aclocal is automatically distributed,
 # this is the list of macro files we install on the user's system.
-aclocalfiles   = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 m4/ltoptions.m4 \
-                 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4
+macrodest      = m4
+aclocalfiles   = $(macrodest)/argz.m4 \
+                 $(macrodest)/libtool.m4 \
+                 $(macrodest)/ltdl.m4 \
+                 $(macrodest)/ltoptions.m4 \
+                 $(macrodest)/ltsugar.m4 \
+                 $(macrodest)/ltversion.m4 \
+                 $(macrodest)/lt~obsolete.m4
 
 ## These are installed as a subdirectory of pkgdatadir so that
 ## libtoolize --ltdl can find them later:
-ltdldatafiles  = libltdl/COPYING.LIB \
-                 libltdl/README \
-                 libltdl/Makefile.inc \
-                 libltdl/Makefile.am \
-                 libltdl/configure.ac \
-                 libltdl/aclocal.m4 \
-                 libltdl/Makefile.in \
-                 libltdl/config-h.in \
-                 libltdl/configure \
-                 libltdl/argz_.h \
-                 libltdl/argz.c \
-                 libltdl/loaders/dld_link.c \
-                 libltdl/loaders/dlopen.c \
-                 libltdl/loaders/dyld.c \
-                 libltdl/loaders/load_add_on.c \
-                 libltdl/loaders/loadlibrary.c \
-                 libltdl/loaders/shl_load.c \
-                 libltdl/lt__dirent.c \
-                 libltdl/lt__strl.c \
+ltdldest       = libltdl
+ltdldatafiles  = $(ltdldest)/COPYING.LIB \
+                 $(ltdldest)/README \
+                 $(ltdldest)/Makefile.inc \
+                 $(ltdldest)/Makefile.am \
+                 $(ltdldest)/configure.ac \
+                 $(ltdldest)/aclocal.m4 \
+                 $(ltdldest)/Makefile.in \
+                 $(ltdldest)/config-h.in \
+                 $(ltdldest)/configure \
+                 $(ltdldest)/argz_.h \
+                 $(ltdldest)/argz.c \
+                 $(ltdldest)/loaders/dld_link.c \
+                 $(ltdldest)/loaders/dlopen.c \
+                 $(ltdldest)/loaders/dyld.c \
+                 $(ltdldest)/loaders/load_add_on.c \
+                 $(ltdldest)/loaders/loadlibrary.c \
+                 $(ltdldest)/loaders/shl_load.c \
+                 $(ltdldest)/lt__dirent.c \
+                 $(ltdldest)/lt__strl.c \
                  $(libltdl_libltdl_la_SOURCES)
 
 install-data-local: $(lt_Makefile_in)
@@ -480,21 +488,21 @@ install-data-local: $(lt_Makefile_in)
        done
 ## install the helper scripts
        $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)'
-       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/config'
+       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/$(auxdest)'
        @list='$(pkgaux_scripts)' && for p in $$list; do \
          echo " $(INSTALL_SCRIPT) '$(ltdl_dir)/$$p' 
'$(DESTDIR)$(pkgdatadir)/$$p'"; \
          $(INSTALL_SCRIPT) "$(ltdl_dir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \
        done
-       $(INSTALL_DATA) "$(srcdir)/libltdl/config/ltmain.sh" 
"$(DESTDIR)$(pkgdatadir)/config/ltmain.sh" 
+       $(INSTALL_DATA) "$(aux_dir)/ltmain.sh" 
"$(DESTDIR)$(pkgdatadir)/$(auxdest)/ltmain.sh"
 ## install the libltdl files
-       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/libltdl'
-       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/libltdl/libltdl'
-       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/libltdl/loaders'
+       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/$(ltdldest)'
+       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/$(ltdldest)/libltdl'
+       $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)/$(ltdldest)/loaders'
        @list='$(ltdldatafiles)' && for p in $$list; do \
          echo " $(INSTALL_DATA) '$(srcdir)/$$p' 
'$(DESTDIR)$(pkgdatadir)/$$p'"; \
          $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \
        done
-       -chmod a+x '$(DESTDIR)$(pkgdatadir)/libltdl/configure'
+       -chmod a+x '$(DESTDIR)$(pkgdatadir)/$(ltdldest)/configure'
 
 
 ## ------------- ##
diff --git a/bootstrap.conf b/bootstrap.conf
index 116023c..2909d30 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -344,6 +344,38 @@ libtool_build_prerequisites ()
 func_add_hook func_gnulib_tool libtool_build_prerequisites
 
 
+# libtool_link_libltdl_subdirs
+# ----------------------------
+# In order to autoreconf libltdl, we need some additional directories
+# from the top level directory.
+libtool_link_libltdl_subdirs ()
+{
+    $debug_cmd
+
+    $require_build_aux
+    $require_pkgaux_scripts
+
+    my_pkgaux_files="$pkgaux_scripts $build_aux/ltmain.sh"
+
+    # Clean-up the old libltdl/build-aux tree, making sure to error
+    # out if it contains anything we didn't put there.
+    func_verbose "creating libltdl/$build_aux"
+    for my_file in $my_pkgaux_files; do
+      rm -f "libltdl/$my_file" || exit 1
+    done
+    if test -d "libltdl/$build_aux"; then
+      rmdir "libltdl/$build_aux" || exit 1
+    fi
+
+    # Link only the scripts required by libltdl.
+    mkdir "libltdl/$build_aux"
+    for my_file in $my_pkgaux_files; do
+      ln -s "../../$my_file" "libltdl/$my_file"
+    done
+}
+func_add_hook func_gnulib_tool libtool_link_libltdl_subdirs
+
+
 # libtool_readme_release_package_substitutions
 # --------------------------------------------
 # Show our own package details instead of generic strings.
@@ -362,7 +394,6 @@ libtool_readme_release_package_substitutions ()
     # Perform substitutions to a temporary file
     $SED -e "\
         s,address@hidden@,$package,g
-        s,build-aux/,$build_aux/,
     " "$my_readme" > "${my_readme}T" \
         && mv "${my_readme}T" "$my_readme"
 }
@@ -479,6 +510,33 @@ libtool_require_package_url ()
 }
 
 
+# require_pkgaux_scripts
+# ----------------------
+# Ensure that we have access to the list of scripts for $pkgdatadir.
+require_pkgaux_scripts=libtool_require_pkgaux_scripts
+libtool_require_pkgaux_scripts ()
+{
+    $debug_cmd
+
+    $require_configure_ac
+
+    # Only works if the whole list is on one line.
+    my_result=`$EGREP '^pkgaux_scripts=.*["'\'']$' $configure_ac`
+
+    # If it failed, extract a multi-line setting.
+    test -n "$my_result" \
+      || my_result=`$SED -n '/^pkgaux_scripts=/,/"$/p' $configure_ac`
+
+    # Set it in this shell's global variable set.
+    eval `echo $my_result | $SED 's,\\\\,,g'`
+
+    test -n "$pkgaux_scripts" \
+      || func_fatal_error "unable to determine \`pkgaux_scripts' from 
\`$configure_ac'."
+
+    require_pkgaux_scripts=:
+}
+
+
 # Local variables:
 # mode: shell-script
 # sh-indentation: 2
diff --git a/build-aux/.gitignore b/build-aux/.gitignore
new file mode 100644
index 0000000..e2c12dd
--- /dev/null
+++ b/build-aux/.gitignore
@@ -0,0 +1,18 @@
+/announce-gen
+/compile
+/depcomp
+/do-release-commit-and-tag
+/gendocs.sh
+/git-version-gen
+/gnu-web-doc-update
+/gnupload
+/install-sh
+/ltmain.in
+/ltmain.sh
+/mdate-sh
+/missing
+/mkinstalldirs
+/texinfo.tex
+/useless-if-before-free
+/vc-list-files
+/gitlog-to-changelog

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)

Attachment: 0001-maint-rename-libltdl-config-directory-to-standard-bu.patch.xz
Description: application/xz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]