bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

update csharpcomp, csharpcomp-script modules


From: Bruno Haible
Subject: update csharpcomp, csharpcomp-script modules
Date: Sat, 22 Jul 2006 16:22:11 +0200
User-agent: KMail/1.9.1

Merge from gettext.

2006-06-21  Bruno Haible  <address@hidden>

        Avoid warnings from recent versions of mcs.
        * csharpcomp.sh.in (options_mcs): Don't use options -o, -L, -r any
        more. Use options documented since mcs-1.0 instead. Similarly for -g.
        * csharpcomp.c (compile_csharp_using_mono): Likewise.

2005-12-04  Bruno Haible  <address@hidden>

        * csharpcomp.sh.in: Suffix for resources is .resources, not .resource.

2005-12-04  Bruno Haible  <address@hidden>

        * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.

2005-07-09  Bruno Haible  <address@hidden>

        * csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
        * csharpcomp.c (compile_csharp_using_sscli): Likewise.
        Reported by Mark Junker <address@hidden>.


*** csharpcomp.sh.in    22 Jan 2006 08:31:53 -0000      1.2
--- csharpcomp.sh.in    22 Jul 2006 14:17:35 -0000
***************
*** 1,7 ****
  #!/bin/sh
  # Compile a C# program.
  
! # Copyright (C) 2003-2005 Free Software Foundation, Inc.
  # Written by Bruno Haible <address@hidden>, 2003.
  #
  # This program is free software; you can redistribute it and/or modify
--- 1,7 ----
  #!/bin/sh
  # Compile a C# program.
  
! # Copyright (C) 2003-2006 Free Software Foundation, Inc.
  # Written by Bruno Haible <address@hidden>, 2003.
  #
  # This program is free software; you can redistribute it and/or modify
***************
*** 47,53 ****
    {
      # Use the mktemp program if available. If not available, hide the error
      # message.
!     tmp=`(umask 077 && mktemp -d "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
      test -n "$tmp" && test -d "$tmp"
    } ||
    {
--- 47,53 ----
    {
      # Use the mktemp program if available. If not available, hide the error
      # message.
!     tmp=`(umask 077 && mktemp -d -q "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
      test -n "$tmp" && test -d "$tmp"
    } ||
    {
***************
*** 84,102 ****
            ;;
        esac
        options_cscc="$options_cscc -o "`echo "$2" | sed -e "$sed_quote_subst"`
!       options_mcs="$options_mcs -o "`echo "$2" | sed -e "$sed_quote_subst"`
        options_csc="$options_csc -out:"`echo "$2" | sed -e "$sed_quote_subst"`
        shift
        ;;
      -L)
        options_cscc="$options_cscc -L "`echo "$2" | sed -e "$sed_quote_subst"`
!       options_mcs="$options_mcs -L "`echo "$2" | sed -e "$sed_quote_subst"`
        options_csc="$options_csc -lib:"`echo "$2" | sed -e "$sed_quote_subst"`
        shift
        ;;
      -l)
        options_cscc="$options_cscc -l "`echo "$2" | sed -e "$sed_quote_subst"`
!       options_mcs="$options_mcs -r "`echo "$2" | sed -e "$sed_quote_subst"`
        options_csc="$options_csc -reference:"`echo "$2" | sed -e 
"$sed_quote_subst"`".dll"
        shift
        ;;
--- 84,102 ----
            ;;
        esac
        options_cscc="$options_cscc -o "`echo "$2" | sed -e "$sed_quote_subst"`
!       options_mcs="$options_mcs -out:"`echo "$2" | sed -e "$sed_quote_subst"`
        options_csc="$options_csc -out:"`echo "$2" | sed -e "$sed_quote_subst"`
        shift
        ;;
      -L)
        options_cscc="$options_cscc -L "`echo "$2" | sed -e "$sed_quote_subst"`
!       options_mcs="$options_mcs -lib:"`echo "$2" | sed -e "$sed_quote_subst"`
        options_csc="$options_csc -lib:"`echo "$2" | sed -e "$sed_quote_subst"`
        shift
        ;;
      -l)
        options_cscc="$options_cscc -l "`echo "$2" | sed -e "$sed_quote_subst"`
!       options_mcs="$options_mcs -reference:"`echo "$2" | sed -e 
"$sed_quote_subst"`
        options_csc="$options_csc -reference:"`echo "$2" | sed -e 
"$sed_quote_subst"`".dll"
        shift
        ;;
***************
*** 106,119 ****
        ;;
      -g)
        options_cscc="$options_cscc -g"
!       options_mcs="$options_mcs -g"
        options_csc="$options_csc -debug+"
        ;;
      -*)
        echo "csharpcomp: unknown option '$1'" 1>&2
        exit 1
        ;;
!     *.resource)
        options_cscc="$options_cscc -fresources="`echo "$1" | sed -e 
"$sed_quote_subst"`
        options_mcs="$options_mcs -resource:"`echo "$1" | sed -e 
"$sed_quote_subst"`
        options_csc="$options_csc -resource:"`echo "$1" | sed -e 
"$sed_quote_subst"`
--- 106,119 ----
        ;;
      -g)
        options_cscc="$options_cscc -g"
!       options_mcs="$options_mcs -debug"
        options_csc="$options_csc -debug+"
        ;;
      -*)
        echo "csharpcomp: unknown option '$1'" 1>&2
        exit 1
        ;;
!     *.resources)
        options_cscc="$options_cscc -fresources="`echo "$1" | sed -e 
"$sed_quote_subst"`
        options_mcs="$options_mcs -resource:"`echo "$1" | sed -e 
"$sed_quote_subst"`
        options_csc="$options_csc -resource:"`echo "$1" | sed -e 
"$sed_quote_subst"`
*** m4/csharpcomp.m4    8 Jun 2005 12:10:25 -0000       1.1
--- m4/csharpcomp.m4    22 Jul 2006 14:18:44 -0000
***************
*** 1,12 ****
! # csharpcomp.m4 serial 5 (gettext-0.15)
  dnl Copyright (C) 2003-2005 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
  dnl with or without modifications, as long as this notice is preserved.
  
  # Prerequisites of csharpcomp.sh.
  # Sets HAVE_CSHARPCOMP to nonempty if csharpcomp.sh will work.
! 
  AC_DEFUN([gt_CSHARPCOMP],
  [
    AC_REQUIRE([gt_CSHARP_CHOICE])
--- 1,14 ----
! # csharpcomp.m4 serial 6 (gettext-0.15)
  dnl Copyright (C) 2003-2005 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
  dnl with or without modifications, as long as this notice is preserved.
  
  # Prerequisites of csharpcomp.sh.
+ # Checks for a C# compiler.
+ # Sets at most one of HAVE_CSCC, HAVE_MCS, HAVE_CSC.
  # Sets HAVE_CSHARPCOMP to nonempty if csharpcomp.sh will work.
! # Also sets CSHARPCOMPFLAGS.
  AC_DEFUN([gt_CSHARPCOMP],
  [
    AC_REQUIRE([gt_CSHARP_CHOICE])
***************
*** 67,70 ****
--- 69,77 ----
    AC_SUBST(HAVE_CSCC)
    AC_SUBST(HAVE_MCS)
    AC_SUBST(HAVE_CSC)
+   dnl Provide a default for CSHARPCOMPFLAGS.
+   if test -z "${CSHARPCOMPFLAGS+set}"; then
+     CSHARPCOMPFLAGS="-O -g"
+   fi
+   AC_SUBST(CSHARPCOMPFLAGS)
  ])
*** lib/csharpcomp.c    26 Apr 2006 15:55:46 -0000      1.4
--- lib/csharpcomp.c    22 Jul 2006 14:18:44 -0000
***************
*** 1,5 ****
  /* Compile a C# program.
!    Copyright (C) 2003-2005 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2003.
  
     This program is free software; you can redistribute it and/or modify
--- 1,5 ----
  /* Compile a C# program.
!    Copyright (C) 2003-2006 Free Software Foundation, Inc.
     Written by Bruno Haible <address@hidden>, 2003.
  
     This program is free software; you can redistribute it and/or modify
***************
*** 129,137 ****
        for (i = 0; i < sources_count; i++)
        {
          const char *source_file = sources[i];
!         if (strlen (source_file) >= 9
!             && memcmp (source_file + strlen (source_file) - 9, ".resource",
!                        9) == 0)
            {
              char *option = (char *) xallocsa (12 + strlen (source_file) + 1);
  
--- 129,137 ----
        for (i = 0; i < sources_count; i++)
        {
          const char *source_file = sources[i];
!         if (strlen (source_file) >= 10
!             && memcmp (source_file + strlen (source_file) - 10, ".resources",
!                        10) == 0)
            {
              char *option = (char *) xallocsa (12 + strlen (source_file) + 1);
  
***************
*** 214,247 ****
        unsigned int i;
  
        argc =
!       1 + (output_is_library ? 1 : 0) + 2 + 2 * libdirs_count
!       + 2 * libraries_count + (debug ? 1 : 0) + sources_count;
        argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
  
        argp = argv;
        *argp++ = "mcs";
        if (output_is_library)
        *argp++ = "-target:library";
!       *argp++ = "-o";
!       *argp++ = (char *) output_file;
        for (i = 0; i < libdirs_count; i++)
        {
!         *argp++ = "-L";
!         *argp++ = (char *) libdirs[i];
        }
        for (i = 0; i < libraries_count; i++)
        {
!         *argp++ = "-r";
!         *argp++ = (char *) libraries[i];
        }
        if (debug)
!       *argp++ = "-g";
        for (i = 0; i < sources_count; i++)
        {
          const char *source_file = sources[i];
!         if (strlen (source_file) >= 9
!             && memcmp (source_file + strlen (source_file) - 9, ".resource",
!                        9) == 0)
            {
              char *option = (char *) xallocsa (10 + strlen (source_file) + 1);
  
--- 214,256 ----
        unsigned int i;
  
        argc =
!       1 + (output_is_library ? 1 : 0) + 1 + libdirs_count + libraries_count
!       + (debug ? 1 : 0) + sources_count;
        argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
  
        argp = argv;
        *argp++ = "mcs";
        if (output_is_library)
        *argp++ = "-target:library";
!       {
!       char *option = (char *) xallocsa (5 + strlen (output_file) + 1);
!       memcpy (option, "-out:", 5);
!       strcpy (option + 5, output_file);
!       *argp++ = option;
!       }
        for (i = 0; i < libdirs_count; i++)
        {
!         char *option = (char *) xallocsa (5 + strlen (libdirs[i]) + 1);
!         memcpy (option, "-lib:", 5);
!         strcpy (option + 5, libdirs[i]);
!         *argp++ = option;
        }
        for (i = 0; i < libraries_count; i++)
        {
!         char *option = (char *) xallocsa (11 + strlen (libraries[i]) + 4 + 1);
!         memcpy (option, "-reference:", 11);
!         memcpy (option + 11, libraries[i], strlen (libraries[i]));
!         strcpy (option + 11 + strlen (libraries[i]), ".dll");
!         *argp++ = option;
        }
        if (debug)
!       *argp++ = "-debug";
        for (i = 0; i < sources_count; i++)
        {
          const char *source_file = sources[i];
!         if (strlen (source_file) >= 10
!             && memcmp (source_file + strlen (source_file) - 10, ".resources",
!                        10) == 0)
            {
              char *option = (char *) xallocsa (10 + strlen (source_file) + 1);
  
***************
*** 297,302 ****
--- 306,316 ----
        /* Remove zombie process from process list, and retrieve exit status.  
*/
        exitstatus = wait_subprocess (child, "mcs", false, false, true, true);
  
+       for (i = 1 + (output_is_library ? 1 : 0);
+          i < 1 + (output_is_library ? 1 : 0)
+              + 1 + libdirs_count + libraries_count;
+          i++)
+       freesa (argv[i]);
        for (i = 0; i < sources_count; i++)
        if (argv[argc - sources_count + i] != sources[i])
          freesa (argv[argc - sources_count + i]);
***************
*** 417,425 ****
        for (i = 0; i < sources_count; i++)
        {
          const char *source_file = sources[i];
!         if (strlen (source_file) >= 9
!             && memcmp (source_file + strlen (source_file) - 9, ".resource",
!                        9) == 0)
            {
              char *option = (char *) xallocsa (10 + strlen (source_file) + 1);
  
--- 431,439 ----
        for (i = 0; i < sources_count; i++)
        {
          const char *source_file = sources[i];
!         if (strlen (source_file) >= 10
!             && memcmp (source_file + strlen (source_file) - 10, ".resources",
!                        10) == 0)
            {
              char *option = (char *) xallocsa (10 + strlen (source_file) + 1);
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]