sascha      00/12/17 16:17:18

  Modified:    .        Makefile.in configure.in
  Added:       helpers  make_export.awk
  Log:
  Drop the Perl dependency and use an awk script for creating apr.exports.
  
  Revision  Changes    Path
  1.35      +3 -2      apr/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr/Makefile.in,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -u -r1.34 -r1.35
  --- Makefile.in       2000/12/15 16:56:50     1.34
  +++ Makefile.in       2000/12/18 00:17:18     1.35
  @@ -10,6 +10,7 @@
   MFLAGS_STATIC=
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  @@ -117,9 +118,9 @@
   
   $(TARGET_EXPORTS):
        if test -z "$(srcdir)"; then \
  -             perl $(srcdir)helpers/make_export.pl -o $@ include/*.h; \
  +             $(AWK) -f $(srcdir)helpers/make_export.awk include/*.h > $@ ; \
        else \
  -             perl $(srcdir)helpers/make_export.pl -o $@ include/*.h 
$(srcdir)include/*.h; \
  +             $(AWK) -f $(srcdir)helpers/make_export.awk include/*.h 
$(srcdir)include/*.h > $@ ; \
        fi
   
   docs:
  
  
  
  1.190     +1 -0      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.189
  retrieving revision 1.190
  diff -u -u -r1.189 -r1.190
  --- configure.in      2000/12/15 16:56:51     1.189
  +++ configure.in      2000/12/18 00:17:18     1.190
  @@ -44,6 +44,7 @@
   AC_PROG_CC
   AC_PROG_RANLIB_NC
   AC_PROG_MAKE_SET
  +AC_PROG_AWK
   AC_CHECK_PROG(RM, rm, rm)
   AC_CHECK_TOOL(AR, ar, ar)
   
  
  
  
  1.1                  apr/helpers/make_export.awk
  
  Index: make_export.awk
  ===================================================================
  # Based on Ryan Bloom's make_export.pl
  
  /^#[ \t]*if(def)? APR_.*/ {
        if (old_filename != FILENAME) {
                if (old_filename != "") printf("%s", line)
                macro_no = 0
                found = 0
                count = 0
                old_filename = FILENAME
                line = ""
        }
        macro_stack[macro_no++] = macro
        macro = $2
        found++
        count++
        line = line macro "\n"
        next
  }
  
  /^#[ \t]*endif/ {
        if (count > 0) {
                count--
                line = line "/" macro "\n"
                macro = macro_stack[--macro_no]
        }
        if (found == count + 1) {
                found--
                line = ""
        } else if (found > count + 1) {
                found = 0
        }
        next
  }
  
  /^[ \t]*(APR_DECLARE[^(]*[(])?(const[ \t])?[a-z_]+[)]?[ 
\t]+[*]?([A-Za-z0-9_]+)\(/ {
        if (found) {
                found++
        }
        for (i = 0; i < count; i++) {
                line = line "\t"
        }
        sub("^[ \t]*(APR_DECLARE[^(]*[(])?(const[ \t])?[a-z_]+[)]?[ \t]+[*]?", 
"");
        sub("[(].*", "");
        line = line $0 "\n"
        next
  }
  
  END {
        printf("%s", line)
  }
  
  
  

Reply via email to