summaryrefslogtreecommitdiff
path: root/rt/m4/rt_layout.m4
diff options
context:
space:
mode:
Diffstat (limited to 'rt/m4/rt_layout.m4')
-rw-r--r--rt/m4/rt_layout.m49
1 files changed, 4 insertions, 5 deletions
diff --git a/rt/m4/rt_layout.m4 b/rt/m4/rt_layout.m4
index c92a108ca..393b32175 100644
--- a/rt/m4/rt_layout.m4
+++ b/rt/m4/rt_layout.m4
@@ -21,15 +21,14 @@ AC_DEFUN([RT_LAYOUT],[
pldconf=./config.pld
$PERL -0777 -p -e "\$layout = '$2';" -e '
s/.*<Layout\s+$layout>//gims;
- s/<\/Layout>.*//s;
- s/^#.*$//gm;
+ s/\<\/Layout\>.*//s;
+ s/^#.*$//m;
s/^\s+//gim;
s/\s+$/\n/gim;
s/\+$/\/rt3/gim;
# m4 will not let us just use $1, we need @S|@1
-# s/^((?:bin|sbin|libexec|data|sysconf|sharedstate|localstate|lib|include|oldinclude|info|man)dir)\s*:\s*(.*)$/@S|@1=@S|@2/gim;
- # uh, should be [:=], but m4 apparently substitutes something...
- s/^(.*?)\s*(?::|=)\s*(.*)$/\(test "x\@S|@@S|@1" = "xNONE" || test "x\@S|@@S|@1" = "x") && @S|@1=@S|@2/gim;
+ s/^\s*((?:bin|sbin|libexec|data|sysconf|sharedstate|localstate|lib|include|oldinclude|info|man)dir)\s*:\s*(.*)$/@S|@1=@S|@2/gim;
+ s/^\s*(.*?)\s*:\s*(.*)$/\(test "x\@S|@@S|@1" = "xNONE" || test "x\@S|@@S|@1" = "x") && @S|@1=@S|@2/gim;
' < $1 > $pldconf
if test -s $pldconf; then