From eb524b6f684a569e4b844a84ad041ad68bbf1e19 Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 21 Sep 2010 17:40:57 +0000 Subject: [PATCH] aautogen.sh, change a `sed' expression to be more defensive --- ChangeLog | 8 ++++++++ autogen.sh | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f06a9a9f2..bd22ac777 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-09-21 Robert Larice + * autogen.sh : + there are several implementations of `sed'. + Some can't swallow a '\n' escape sequence on the RHS. + And some want a plain newline in the RHS to be escaped. + see http://sed.sourceforge.net/sedfaq4.html#s4.1 + `4.1. How do I insert a newline into the RHS of a substitution?' + 2010-09-19 Dietmar Warning * adms/hicum2/admsva/hicum2.va: update to version 2.24 with small exceptions from the original source code, seems the last update because model provider diff --git a/autogen.sh b/autogen.sh index 65269a001..fd6855096 100755 --- a/autogen.sh +++ b/autogen.sh @@ -147,8 +147,12 @@ if [ "$ADMS" -eq 1 ]; then znew=`awk '$1 ~ /#VLAMKF/ { print " " $2 "\\\\" }' < configure.ac` # Find "tests/vbic/Makefile" and insert the list of Makefiles + # some sed's fail to process the '\n' escape on the RHS, + # thus use an escaped plain newline sed \ - -e "s,tests\\/vbic\\/Makefile,&\\n $znew ," \ + -e "s,tests\\/vbic\\/Makefile,&\\ +$znew + ," \ configure.ac > temp-adms.ac for adms_dir in `ls $ADMSDIR` ; do