Description of patch attempt:

I'm trying to add support for Unified Parallel C.  Source files have
the suffix .upc.  Typical compilers are called upcc or upc.  A patch
file (automake-upc.patch) and a tarball containing a new M4 macro and
two test cases (automake-upc-new.tar.gz) are attached.

I haven't been able to test the patch yet because I get the following
error when I run './configure; make' using the CVS trunk:

[EMAIL PROTECTED]:Download/automake% make
cd . && perllibdir=/home/jon/Download/automake"/lib:./lib"
/home/jon/Download/automake/aclocal -I m4
/bin/sh: /home/jon/Download/automake/aclocal: No such file or directory

What do I need to do to create this 'aclocal' file properly?

ChangeLog entry as plaintext:

2006-07-04  Jonathan Higa <[EMAIL PROTECTED]>

       * automake.in ('name' => 'objc'): Fix typo in hash.
       * automake.in ('name' => 'upc'): Support Unified Parallel C.
       * automake.in (lang_upc_rewrite): Follow the C++ and OBJC convention
       for UPC objects.
       * doc/automake.texi: Attempt to document new UPC routines.
       * lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for
       UPC and UPCFLAGS.
       * m4/depend.m4 (_AM_DEPENDENCIES): Add UPC.
       * m4/upc.m4: Define AM_PROG_UPC.
       * tests/ext.test: Check for .o objects from .upc source.
       * tests/upc.test: Verify definition of .upc suffix.
       * tests/upc2.test: Need error if .upc appears without AM_PROG_UPC.

Attachment: automake-upc-new.tar.gz
Description: GNU Zip compressed data

? m4/upc.m4
? tests/upc.test
? tests/upc2.test
Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.2903
diff -u -r1.2903 ChangeLog
--- ChangeLog	24 Jun 2006 05:35:43 -0000	1.2903
+++ ChangeLog	4 Jul 2006 13:56:52 -0000
@@ -1,3 +1,18 @@
+2006-07-04  Jonathan Higa <[EMAIL PROTECTED]>
+
+        * automake.in ('name' => 'objc'): Fix typo in hash.
+        * automake.in ('name' => 'upc'): Support Unified Parallel C.
+        * automake.in (lang_upc_rewrite): Follow the C++ and OBJC convention
+	for UPC objects.
+        * doc/automake.texi: Attempt to document new UPC routines.
+        * lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for
+        UPC and UPCFLAGS.
+        * m4/depend.m4 (_AM_DEPENDENCIES): Add UPC.
+        * m4/upc.m4: Define AM_PROG_UPC.
+        * tests/ext.test: Check for .o objects from .upc source.
+        * tests/upc.test: Verify definition of .upc suffix.
+        * tests/upc2.test: Need error if .upc appears without AM_PROG_UPC.
+
 2006-06-24  Stepan Kasal  <[EMAIL PROTECTED]>
 	    Ralf Wildenhues  <[EMAIL PROTECTED]>
 
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.306
diff -u -r1.306 NEWS
--- NEWS	21 Apr 2006 19:02:29 -0000	1.306
+++ NEWS	4 Jul 2006 13:56:53 -0000
@@ -118,6 +118,10 @@
 
     This new version check ensures that the whole build system has
     been generated using the same autoconf version.
+
+  - New support for Unified Parallel C:
+    - AM_PROG_UPC looks for a UPC compiler.
+    - A new section of the manual documents the support.
 
 New in 1.9:
 
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1623
diff -u -r1.1623 automake.in
--- automake.in	24 Jun 2006 05:31:54 -0000	1.1623
+++ automake.in	4 Jul 2006 13:56:58 -0000
@@ -738,7 +738,7 @@
 register_language ('name' => 'objc',
 		   'Name' => 'Objective C',
 		   'config_vars' => ['OBJC'],
-		   'linker' => 'OBJCLINK',,
+		   'linker' => 'OBJCLINK',
  		   'link' => '$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
 		   'autodep' => 'OBJC',
 		   'flags' => ['OBJCFLAGS', 'CPPFLAGS'],
@@ -751,6 +751,23 @@
 		   'pure' => 1,
 		   'extensions' => ['.m']);
 
+# Unified Parallel C.
+register_language ('name' => 'upc',
+		   'Name' => 'Unified Parallel C',
+		   'config_vars' => ['UPC'],
+		   'linker' => 'UPCLINK',
+ 		   'link' => '$(UPCLD) $(AM_UPCFLAGS) $(UPCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
+		   'autodep' => 'UPC',
+		   'flags' => ['UPCFLAGS', 'CPPFLAGS'],
+		   'compile' => '$(UPC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_UPCFLAGS) $(UPCFLAGS)',
+		   'compiler' => 'UPCCOMPILE',
+		   'compile_flag' => '-c',
+		   'output_flag' => '-o',
+		   'lder' => 'UPCLD',
+		   'ld' => '$(UPC)',
+		   'pure' => 1,
+		   'extensions' => ['.upc']);
+
 # Headers.
 register_language ('name' => 'header',
 		   'Name' => 'Header',
@@ -5387,6 +5404,12 @@
     return &lang_sub_obj;
 }
 
+# Rewrite a single Unified Parallel C file.
+sub lang_upc_rewrite
+{
+    return &lang_sub_obj;
+}
+
 # Rewrite a single Java file.
 sub lang_java_rewrite
 {
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.137
diff -u -r1.137 automake.texi
--- doc/automake.texi	26 May 2006 16:47:05 -0000	1.137
+++ doc/automake.texi	4 Jul 2006 13:57:07 -0000
@@ -172,6 +172,7 @@
 * Yacc and Lex::                Yacc and Lex support
 * C++ Support::                 Compiling C++ sources
 * Objective C Support::         Compiling Objective C sources
+* Unified Parallel C Support::  Compiling Unified Parallel C sources
 * Assembly Support::            Compiling assembly sources
 * Fortran 77 Support::          Compiling Fortran 77 sources
 * Fortran 9x Support::          Compiling Fortran 9x sources
@@ -2488,6 +2489,10 @@
 @code{GCJ} and @code{GCJFLAGS}.  @command{gcj} is the Java front-end to the
 GNU Compiler Collection.
 
[EMAIL PROTECTED] AM_PROG_UPC
+Find a compiler for Unified Parallel C.
+This is required if any Unified Parallel C source is included.
+
 @item AM_WITH_DMALLOC
 @acindex AM_WITH_DMALLOC
 @cindex @command{dmalloc}, support for
@@ -4158,6 +4163,7 @@
 @itemx maude_LFLAGS
 @itemx maude_OBJCFLAGS
 @itemx maude_RFLAGS
[EMAIL PROTECTED] maude_UPCFLAGS
 @itemx maude_YFLAGS
 @cindex per-target compilation flags, defined
 Automake allows you to set compilation flags on a per-program (or
@@ -4173,7 +4179,8 @@
 @samp{_GCJFLAGS},
 @samp{_LFLAGS},
 @samp{_OBJCFLAGS},
[EMAIL PROTECTED], and
[EMAIL PROTECTED],
[EMAIL PROTECTED], and
 @samp{_YFLAGS}.
 
 When using a per-target compilation flag, Automake will choose a
@@ -4721,6 +4728,41 @@
 @end vtable
 
 
[EMAIL PROTECTED] Unified Parallel C Support
[EMAIL PROTECTED] Unified Parallel C Support
+
[EMAIL PROTECTED] Unified Parallel C support
[EMAIL PROTECTED] Support for Unified Parallel C
+
+Automake includes some support for Unified Parallel C.
+
+Any package including Unified Parallel C code must define the output variable
[EMAIL PROTECTED] in @file{configure.ac}; the simplest way to do this is to use
+the @code{AM_PROG_UPC} macro (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}).
+
+A few additional variables are defined when an Unified Parallel C source file
+is seen:
+
[EMAIL PROTECTED] @code
[EMAIL PROTECTED] UPC
+The name of the Unified Parallel C compiler.
+
[EMAIL PROTECTED] UPCFLAGS
+Any flags to pass to the Unified Parallel C compiler.
+
[EMAIL PROTECTED] AM_UPCFLAGS
+The maintainer's variant of @code{UPCFLAGS}.
+
[EMAIL PROTECTED] UPCCOMPILE
+The command used to actually compile a Unified Parallel C source file.  The
+file name is appended to form the complete command line.
+
[EMAIL PROTECTED] UPCLINK
+The command used to actually link a Unified Parallel C program.
[EMAIL PROTECTED] vtable
+
+
 @node Assembly Support
 @section Assembly Support
 
@@ -4967,6 +5009,9 @@
 @vindex OBJCLINK
 Objective C (@code{OBJCLINK})
 @item
[EMAIL PROTECTED] UPCLINK
+Unified Parallel C (@code{UPCLINK})
[EMAIL PROTECTED]
 @vindex LINK
 C (@code{LINK})
 @end enumerate
Index: lib/Automake/Variable.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Variable.pm,v
retrieving revision 1.44
diff -u -r1.44 Variable.pm
--- lib/Automake/Variable.pm	17 Apr 2006 12:14:07 -0000	1.44
+++ lib/Automake/Variable.pm	4 Jul 2006 13:57:08 -0000
@@ -185,6 +185,8 @@
    OBJC => 'AC_PROG_OBJC',
    OBJCFLAGS => 'AC_PROG_OBJC',
    RANLIB => 'AC_PROG_RANLIB',
+   UPC => 'AM_PROG_UPC',
+   UPCFLAGS => 'AM_PROG_UPC',
    YACC => 'AC_PROG_YACC',
    );
 
Index: m4/depend.m4
===================================================================
RCS file: /cvs/automake/automake/m4/depend.m4,v
retrieving revision 1.37
diff -u -r1.37 depend.m4
--- m4/depend.m4	6 Jun 2006 20:55:44 -0000	1.37
+++ m4/depend.m4	4 Jul 2006 13:57:09 -0000
@@ -34,6 +34,7 @@
 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list='gcc3 gcc'],
        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
                    [depcc="$$1"   am_compiler_list=])
 
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.605
diff -u -r1.605 Makefile.am
--- tests/Makefile.am	24 Jun 2006 05:31:55 -0000	1.605
+++ tests/Makefile.am	4 Jul 2006 13:57:09 -0000
@@ -568,6 +568,8 @@
 txinfo31.test \
 transform.test \
 unused.test \
+upc.test \
+upc2.test \
 vars.test \
 vars3.test \
 vartar.test \
Index: tests/ext.test
===================================================================
RCS file: /cvs/automake/automake/tests/ext.test,v
retrieving revision 1.8
diff -u -r1.8 ext.test
--- tests/ext.test	20 Mar 2006 20:31:29 -0000	1.8
+++ tests/ext.test	4 Jul 2006 13:57:09 -0000
@@ -26,17 +26,18 @@
 AC_PROG_F77
 AC_PROG_FC
 AC_PROG_OBJC
+AM_PROG_UPC
 END
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
-foo_SOURCES = 1.f 2.for 3.f90 4.F 5.r 6.m
+foo_SOURCES = 1.f 2.for 3.f90 4.F 5.r 6.m 7.upc
 END
 
 $ACLOCAL || exit 1
 $AUTOMAKE || exit 1
 
-for ext in f for f90 F r m
+for ext in f for f90 F r m upc
 do
    grep "^$ext\.o:" Makefile.in && exit 1
 done







Reply via email to