diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-01-31 13:31:06 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-01-31 13:31:06 +0200 |
commit | 4900a5e7be9ad90fda7c4743fd31613ceb0eda05 (patch) | |
tree | f8e38484828638d0d028086c91e4678089b0ae1c | |
parent | d18e5794063e4ae4dcc5fac33293b63196af7e7b (diff) | |
download | cpio-4900a5e7be9ad90fda7c4743fd31613ceb0eda05.tar.gz cpio-4900a5e7be9ad90fda7c4743fd31613ceb0eda05.tar.bz2 |
Fix package name recognition in bootstrap.
The script logic failed if AC_INIT was split among two lines. Reported
by Pavel.
* bootstrap (extract_package_name): Rewrite as m4 script to allow
for multiline AC_INIT.
-rwxr-xr-x | bootstrap | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -82,20 +82,6 @@ po_download_command_format=\ -extract_package_name=' - /^AC_INIT(/{ - /.*,.*,.*, */{ - s/// - s/[][]//g - s/)$// - p - q - } - s/AC_INIT(\[*// - s/]*,.*// - s/^GNU // - y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - s/[^A-Za-z0-9_]/-/g - p - } -' -package=`sed -n "$extract_package_name" configure.ac` || exit +extract_package_name='divert(-1)[]changequote([,])[]define([AC_INIT],[divert(0)[]patsubst([$1],[GNU ],[])[]divert(-1)])' + +package=`echo $extract_package_name | m4 - configure.ac` || exit + gnulib_name=lib$package |