Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 47271 invoked by uid 500); 18 Jul 2001 10:11:23 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 47256 invoked from network); 18 Jul 2001 10:11:22 -0000 From: "Sander Striker" To: Cc: Subject: [PATCH] exports.c creation Date: Wed, 18 Jul 2001 12:20:53 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0057_01C10F84.16892170" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0057_01C10F84.16892170 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, I've written a new make_exports.awk script which I posted to the list earlier. Attached is a newer version which seems to handle everything ok now. To move to the new make_exports the following steps are required: - copy make_exports.awk to httpd-2.0/build - delete httpd-2.0/build/buildexports.sh and httpd-2.0/build/buildexports.awk - patch up httpd-2.0/server/Makefile.in (patch is at the bottom of this mail) Now we can remove the make_exports stuff from apr aswell, since it is not needed there. I think this could be even faster than the make_exports steps that were in place, so that shouldn't be the issue. Oh, I just noticed that in apr/network_io/unix/sendrecv.c there is a kludge to allow exports.c to compile/link. Kludges like these can now be happily removed. Sander --- server/Makefile.in Wed Jul 18 11:45:23 2001 +++ server/Makefile.in.new Wed Jul 18 11:07:25 2001 @@ -17,8 +17,7 @@ util_filter.c exports.c buildmark.c scoreboard.c \ error_bucket.c protocol.c core.c request.c -TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h \ - httpd.exp +TARGETS = $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp include $(top_srcdir)/build/rules.mk include $(top_srcdir)/build/library.mk @@ -32,28 +31,12 @@ util.lo: test_char.h -EXPORT_FILES = $(top_builddir)/srclib/apr/apr.exports \ - $(top_builddir)/srclib/apr-util/aprutil.exports \ - $(TARGET_EXPORTS) - -delete-exports: - @if test -f $(TARGET_EXPORTS); then \ - headers="`find $(top_srcdir)/include/*.h -newer $(TARGET_EXPORTS)`" ; \ - if test -n "$$headers"; then \ - echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \ - echo rm -f $(TARGET_EXPORTS) ; \ - rm -f $(TARGET_EXPORTS) ; \ - fi \ - fi - - -$(TARGET_EXPORTS): - $(AWK) -f $(top_srcdir)/srclib/apr/build/make_export.awk \ - $(top_srcdir)/include/*.h \ - $(top_srcdir)/os/$(OS_DIR)/*.h > $@ - +EXPORT_FILES = $(top_srcdir)/include/*.h \ + $(top_srcdir)/srclib/apr/include/*.h \ + $(top_srcdir)/srclib/apr-util/include/*.h + exports.c: $(EXPORT_FILES) - (cat $(EXPORT_FILES) | $(top_srcdir)/build/buildexports.sh $(top_srcdir)) > $@ + $(AWK) -f $(top_srcdir)/build/make_exports.awk $(EXPORT_FILES) > $@ export_vars.h: $(AWK) -f $(top_srcdir)/build/make_var_export.awk \ ------=_NextPart_000_0057_01C10F84.16892170 Content-Type: application/octet-stream; name="make_exports.awk" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="make_exports.awk" =0A= BEGIN {=0A= printf("/*\n")=0A= printf(" * THIS FILE WAS AUTOGENERATED BY make_exports.awk\n")=0A= printf(" *\n")=0A= printf(" * This is an ugly hack that needs to be here, so\n")=0A= printf(" * that libtool will link all of the APR functions\n")=0A= printf(" * into server regardless of whether the base server\n")=0A= printf(" * uses them.\n")=0A= printf(" */\n")=0A= printf("\n")=0A= printf("#define CORE_PRIVATE\n")=0A= printf("\n")=0A= =0A= for (i =3D 1; i < ARGC; i++) {=0A= file =3D ARGV[i]=0A= sub("([^/]*[/])*", "", file)=0A= printf("#include \"%s\"\n", file)=0A= }=0A= =0A= printf("\n")=0A= printf("const void *ap_ugly_hack =3D NULL;\n")=0A= printf("\n")=0A= =0A= TYPE_NORMAL =3D 0=0A= TYPE_HEADER =3D 1=0A= =0A= stackptr =3D 0=0A= }=0A= =0A= function push(line) {=0A= stack[stackptr] =3D line=0A= stackptr++=0A= }=0A= =0A= function do_output() {=0A= printf("/*\n")=0A= printf(" * %s\n", FILENAME)=0A= printf(" */\n")=0A= =0A= for (i =3D 0; i < stackptr; i++) {=0A= printf("%s\n", stack[i])=0A= }=0A= =0A= stackptr =3D 0=0A= =0A= printf("\n");=0A= }=0A= =0A= function enter_scope(type) {=0A= scope++=0A= scope_type[scope] =3D type=0A= scope_stack[scope] =3D stackptr=0A= delete scope_used[scope]=0A= }=0A= =0A= function leave_scope() {=0A= used =3D scope_used[scope]=0A= =0A= if (!used)=0A= stackptr =3D scope_stack[scope]=0A= =0A= scope--=0A= if (used) {=0A= scope_used[scope] =3D 1=0A= =0A= if (!scope)=0A= do_output()=0A= }=0A= }=0A= =0A= function add_symbol(symbol) {=0A= push("const void *ap_hack_" symbol " =3D (const void *)" symbol ";")=0A= scope_used[scope] =3D 1=0A= }=0A= =0A= /^[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { =0A= sub("[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]", "");=0A= sub("[(].*", "");=0A= sub("^[ \t]+", "");=0A= sub("([^ ]* ^([ \t]*[(]))*", "");=0A= =0A= add_symbol($0)=0A= next=0A= }=0A= =0A= /^#[ \t]*if(ndef| !defined[(])([^_]*_)*H/ {=0A= enter_scope(TYPE_HEADER)=0A= next=0A= }=0A= =0A= /^#[ \t]*if([n]?def)? / {=0A= enter_scope(TYPE_NORMAL)=0A= push($0)=0A= next=0A= }=0A= =0A= /^#[ \t]*endif/ {=0A= if (scope_type[scope] =3D=3D TYPE_NORMAL)=0A= push($0)=0A= =0A= leave_scope()=0A= next=0A= }=0A= =0A= /^#[ \t]*else/ {=0A= push($0)=0A= next=0A= }=0A= =0A= /^#[ \t]*elif/ {=0A= push($0)=0A= next=0A= }=0A= =0A= =0A= ------=_NextPart_000_0057_01C10F84.16892170--