summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-01-31 11:31:06 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-01-31 11:31:06 (GMT)
commit4900a5e7be9ad90fda7c4743fd31613ceb0eda05 (patch) (side-by-side diff)
treef8e38484828638d0d028086c91e4678089b0ae1c
parentd18e5794063e4ae4dcc5fac33293b63196af7e7b (diff)
downloadcpio-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.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xbootstrap22
1 files changed, 4 insertions, 18 deletions
diff --git a/bootstrap b/bootstrap
index f7f6c56..aeb46e0 100755
--- a/bootstrap
+++ b/bootstrap
@@ -80,24 +80,10 @@ gnulib_files=
po_download_command_format=\
"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'"
-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
build_aux=build-aux

Return to:

Send suggestions and report system problems to the System administrator.