summaryrefslogtreecommitdiff
path: root/generateversionscript.awk
diff options
context:
space:
mode:
Diffstat (limited to 'generateversionscript.awk')
-rw-r--r--generateversionscript.awk29
1 files changed, 19 insertions, 10 deletions
diff --git a/generateversionscript.awk b/generateversionscript.awk
index 226c6a545f..7efc537325 100644
--- a/generateversionscript.awk
+++ b/generateversionscript.awk
@@ -1,19 +1,28 @@
BEGIN {
- print "V1.0 {";
- print " global:";
+ print "V1.0 {";
+ print " global:";
}
{
- # Remove the CR character in case the sources are mapped from
- # a Windows share and contain CRLF line endings
- gsub(/\r/,"", $0);
+ # Remove the CR character in case the sources are mapped from
+ # a Windows share and contain CRLF line endings
+ gsub(/\r/,"", $0);
- # Skip empty lines and comment lines starting with semicolon
- if (NF && !match($0, /^[ \t]*;/))
+ # Skip empty lines and comment lines starting with semicolon
+ if (NF && !match($0, /^[ \t]*;/))
+ {
+ # Only prefix the entries that start with "#"
+ if (match($0, /^#.*/))
{
- print " " $0 ";";
+ gsub(/^#/,"", $0);
+ print " "prefix $0 ";";
}
+ else
+ {
+ print " "$0 ";";
+ }
+ }
}
END {
- print " local: *;"
- print "};";
+ print " local: *;"
+ print "};";
}