Fixed prerequisite version checking to work on all shells.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 13 Sep 2007 19:03:53 +0000 (19:03 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 13 Sep 2007 19:03:53 +0000 (19:03 +0000)
Fixed parameter shifting on some shells when no arguments
are given to autodist.
Added support for source file distdef processing for the
following files: .mm .M .S .F .F90 .F95 .fpp .FPP

apps/autodist/CHANGES
apps/autodist/autodist.in

index 73d44ff54e6665262cb7ea26ecaa4fe1fbc493e5..39e76a7f9f6524a06c9238f0b979b384f53f39a3 100644 (file)
@@ -1,3 +1,13 @@
+Thu Sep 13 18:50:00 EEST 2007 Pekka Riikonen <priikone@silcnet.org>
+
+       * Fixed prerequisite version checking to work on all shells.
+
+       * Fixed parameter shifting on some shells when no arguments
+         are given to autodist.
+
+       * Added support for source file distdef processing for the
+         following files: .mm .M .S .F .F90 .F95 .fpp .FPP
+
 Thu May 31 23:34:00 EEST 2007 Pekka Riikonen <priikone@silcnet.org>
 
        * Autodist 1.3.2.
index e4388ab0a4fb9fbc74b1af3485e12dec28556597..bac46d50b4caf483cca4fdc1cf8ca79edae2f66a 100755 (executable)
@@ -872,8 +872,9 @@ ad_process_source_tree()
 {
   ad_debug "Starting processing source files: $1"
 
-  # We take only C/C++ files since they use the C compiler friendly
-  # version of distdefs.  Other files are not assumed to use them.
+  # We take only C/C++ (and other files that are run through traditional
+  # preprocessor) files since they use the C compiler friendly version
+  # of distdefs.  Other files are not assumed to use them.
   files=`find $am_distdir -type f \! -name \*\.ad \( \
        -name \*\.[cC] -o \
        -name \*\.[cC][cCpP] -o \
@@ -881,6 +882,13 @@ ad_process_source_tree()
        -name \*\.[cC][pP][pP] -o \
        -name \*\.[cC]++ -o \
        -name \*\.m -o \
+       -name \*\.mm -o \
+       -name \*\.M -o \
+       -name \*\.S -o \
+       -name \*\.F -o \
+       -name \*\.F90 -o \
+       -name \*\.F95 -o \
+       -name \*\.[fF][pP][pP] -o \
        -name \*\.[hH] -o \
        -name \*\.hh -o \
        -name \*\.[cC]\.in -o \
@@ -1186,7 +1194,7 @@ ad_parse_distribution()
   prereq=`sed 's/^[    ]*//' < $distdir/$1 | grep -v "^#" \
     | grep "prereq " | cut -d' ' -f2- | sort | uniq`
   if test '!' -z $prereq; then
-    if [[ $ver < $prereq ]]; then
+    if test "$ver" \< "$prereq"; then
       ad_fatal "Autodist $prereq or newer is required for distribution $1"
     fi
   fi
@@ -1841,9 +1849,9 @@ ad_run_dist_hooks()
 usage="Usage: autodist [options] [distribution] [version] [params]"
 help="\
 Autodist prepares source tree for configuration, compilation and
-distribution.  Generates Automake.am files from Automake.ad files, 
-configure.ac file from configure.ad file(s), generates the configure 
-script by running Autoconf tool, and generates Makefile.in files by 
+distribution.  Generates Automake.am files from Automake.ad files,
+configure.ac file from configure.ad file(s), generates the configure
+script by running Autoconf tool, and generates Makefile.in files by
 running Automake tool.
 
 Operation modes:
@@ -2004,7 +2012,9 @@ else
 fi
 
 # Get extra parameters from command line
-shift
+if test $# != 0; then
+  shift
+fi
 
 #
 # Run pre-hooks