www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <f...@demon.net>
Subject config/3649: [PATCH] concatenate Configuration lines ending in \
Date Tue, 12 Jan 1999 19:29:52 GMT

>Number:         3649
>Category:       config
>Synopsis:       [PATCH] concatenate Configuration lines ending in \
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          mistaken
>Submitter-Id:   apache
>Arrival-Date:   Tue Jan 12 11:30:01 PST 1999
>Last-Modified:
>Originator:     fanf@demon.net
>Organization:
apache
>Release:        1.3.*
>Environment:
all
>Description:
It would be useful to allow long CFLAGS definitions to be split over multiple
lines using the backslash convention.
>How-To-Repeat:

>Fix:
--- Configure	Tue Jan 12 16:03:05 1999
+++ Configure.new	Tue Jan 12 19:28:36 1999
@@ -125,19 +125,18 @@
 ## that's easy to scan
 ##
 
-# Strip comments and blank lines, remove whitespace around
-# "=" assignments, change Rules to comments and then remove whitespace
-# before Module declarations
-sed 's/#.*//' $file | \
- sed '/^[ 	]*$/d' | \
- sed 's/[ 	]*$//' | \
- sed 's/[ 	]*=[ 	]*/=/' | \
- sed '/^Rule[ 	]*/d' | \
- sed 's/^[ 	]*AddModule/AddModule/' | \
- sed 's/^[ 	]*%AddModule/%AddModule/' | \
- sed 's/^[ 	]*SharedModule/SharedModule/' | \
- sed 's/^[ 	]*Module/Module/' | \
- sed 's/^[ 	]*%Module/%Module/' > $tmpfile
+# Strip comments, join lines ending in \, remove spare whitespace at
+# start and end of lines and around "=", strip blank lines and Rules
+sed 's/#.*//
+    :join
+    /\\$/N
+    s/\\\n[ 	]*//
+    tjoin
+    s/[ 	]*$//
+    s/^[ 	]*//
+    s/[ 	]*=[ 	]*/=/
+    /^$/d
+    /^Rule[ 	]*/d' < $file > $tmpfile
 
 # Determine if shared objects are used
 using_shlib=`grep  '^SharedModule' $tmpfile >/dev/null && echo 1`
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]




Mime
View raw message