make_exports.awk revision 6ac28b74a504006c016d4df3fb84d2cd2e373942
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
BEGIN {
}
TYPE_NORMAL = 0
TYPE_HEADER = 1
stackptr = 0
}
stackptr++
}
}
stackptr = 0
}
scope++
scope_type[scope] = type
}
used = scope_used[scope]
if (!used)
scope--
scope_used[scope] = 1
if (!scope)
}
}
scope_used[scope] = 1
}
}
sub("[ \t]*(AP|APR|APU|APREQ)?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "")
sub("[(].*", "")
sub("([^ ]* (^([ \t]*[(])))+", "")
add_symbol($0)
next
}
next
}
sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
next
}
sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
next
}
sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
next
}
/^#[ \t]*if(ndef| !defined[(])([^_]*_)*H/ {
next
}
/^#[ \t]*if([n]?def)? / {
push($0)
next
}
/^#[ \t]*endif/ {
if (scope_type[scope] == TYPE_NORMAL)
push($0)
next
}
/^#[ \t]*else/ {
push($0)
next
}
/^#[ \t]*elif/ {
push($0)
next
}