wrowe       02/05/13 10:45:49

  Modified:    test     aprtest.win
  Added:       test     MakeWin32Make.awk
  Removed:     test     MakeWin32Make.pl
  Log:
    OK... we force folks to swallow awk for all sorts of goodies, such as
    make_exports and win32res (version resource tags.)  Why not this rather
    simple script as well?  Eliminates all but one .pl requirement, and that
    is only for moving around .mak files on win32 (build/fixwin32mak.pl)
    which is only done for a release.
  
  Revision  Changes    Path
  1.3       +2 -2      apr/test/aprtest.win
  
  Index: aprtest.win
  ===================================================================
  RCS file: /home/cvs/apr/test/aprtest.win,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- aprtest.win       27 Jul 2001 18:37:11 -0000      1.2
  +++ aprtest.win       13 May 2002 17:45:49 -0000      1.3
  @@ -12,7 +12,7 @@
        $(MAKE) /nologo /f Makefile $(TARGET)
   
   Makefile: Makefile.in MakeWin32Make.pl
  -     perl MakeWin32Make.pl
  +     awk -f MakeWin32Make.awk <Makefile.in >Makefile
   
   clean:
  -        del makefile *.obj *.exe *.idb *.pdb
  \ No newline at end of file
  +        del Makefile *.obj *.exe *.idb *.pdb
  
  
  
  1.1                  apr/test/MakeWin32Make.awk
  
  Index: MakeWin32Make.awk
  ===================================================================
  {
  
      if (match($0, /[EMAIL PROTECTED]@/ ) ) {
          print "ALL: \$(TARGETS)";
        print "";
          print "CL = cl.exe";
          print "LINK = link.exe /nologo /debug /machine:I386 
/subsystem:console /incremental:no ";
        print "";
          print "CFLAGS = /nologo /c /MDd /W3 /Gm /GX /Zi /Od /D _DEBUG /D 
WIN32 /D APR_DECLARE_STATIC /FD ";
        print "";
          print ".c.obj::";
          $0 = "\t\$(CL) -c \$< \$(CFLAGS) \$(INCLUDES)";
      }
      if ( match( $0, /^ALL_LIBS=/ ) ) {
          $0 = "";
      }
      if ( match( $0, /^LOCAL_LIBS=/ ) ) {
          print "LOCAL_LIBS= ../LibD/apr.lib ";
          print "ALL_LIBS= kernel32\.lib user32\.lib advapi32\.lib ws2_32\.lib 
wsock32\.lib ole32\.lib ";
        $0 = ""
      }
      if ( match( $0, /[EMAIL PROTECTED]@/ ) ) {
          $0 = "";
      }
      gsub( /\$\{LD_FLAGS\}/, "", $0 );
      gsub( /\.\.\/libapr\.la/, "../LibD/apr.lib", $0 );
      gsub( /[EMAIL PROTECTED]@/, "del", $0 );
      if (gsub( /\$\(RM\) -f/, "del" ) ) {
        gsub( /\*\.a/, "*.lib *.exp *.idb *.ilk *.pdb", $0 );
        gsub( /Makefile/, "Makefile *.ncb *.opt", $0 );
      }
      gsub( /[EMAIL PROTECTED]@/, "cl", $0);
      gsub( /[EMAIL PROTECTED]@/, "", $0);
      gsub( /-I\$\(INCDIR\)/, "/I \"$(INCDIR)\"", $0);
  
      gsub( /\.\.\/libapr\.a/, "../LibD/apr.lib", $0 );
      if ( gsub( /[EMAIL PROTECTED]@/, ".exe", $0 ) ) {
          gsub( /\$\(CC\) \$\(CFLAGS\)/, "\$\(LINK\) /subsystem:console", $0 );
          gsub( /-o (\S+)/, "/out:\"$1\"", $0 );
          gsub( /--export-dynamic /, "", $0 );
          gsub( /-fPIC /, "", $0 );
      }
      if ( gsub( /-shared/, "/subsystem:windows /dll", $0 ) ) {
          gsub( /-o (\S+)/ "/out:\"$1\"", $0 );
      }
      gsub( /\$\(NONPORTABLE\)/, "", $0 );
      gsub( /\.a /, ".lib ", $0 );
      gsub( /\.o /, ".obj ", $0 );
      gsub( /\.lo /, ".obj ", $0 );
  
      print $0;
  }
  
  
  

Reply via email to