[packages/adapter: 272/631] - split configure line to multiple lines
glen
glen at pld-linux.org
Mon Sep 12 19:57:15 CEST 2016
commit 740e3cd85d3eb96469d22ce2e5491d3ef466b971
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Sat Dec 31 12:22:18 2005 +0000
- split configure line to multiple lines
Changed files:
adapter.awk -> 1.262
adapter.awk | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index 876adc3..96c0e2e 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -1050,6 +1050,11 @@ function use_macros()
$0 = fixedsub("%{buildroot}", "$RPM_BUILD_ROOT", $0)
$0 = fixedsub("CXXFLAGS=%{rpmcflags} %configure", "CXXFLAGS=%{rpmcflags}\n%configure", $0);
+ # split configure line to multiple lines
+ if (/%configure / && !/\\$/) {
+ $0 = format_configure($0);
+ }
+
gsub("%_bindir", "%{_bindir}")
gsub("%_datadir", "%{_datadir}")
gsub("%_iconsdir", "%{_iconsdir}")
@@ -1061,6 +1066,15 @@ function use_macros()
gsub("%{_prefix}/src/linux", "%{_kernelsrcdir}")
}
+function format_configure(line, n, a, s) {
+ n = split(line, a, / /);
+ s = a[1] " \\\n";
+ for (i = 2; i <= n; i++) {
+ s = s "\t" a[i] " \\\n"
+ }
+ return s
+}
+
# insertion sort of A[1..n]
# copied from mawk manual
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list