This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

FYI: On the way to -w



I preferred to have transform _required_ a defined value for each key,
to make sure there are no accidents.  So I fixed the sites where
%transform receives an uninitialized value.

There are many other places to fix, most typically $2 etc. which do
not exist, such as in the example below.

Index: ChangeLog
from  Akim Demaille  <akim@epita.fr>
	* automake.in (&handle_options): Change the RE so that the third
	part of the versions always exist.
	(&file_contents): Don't pass uninitialized values to &transform.

2001-03-05  Akim Demaille  <akim@epita.fr>

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.969
diff -u -u -r1.969 automake.in
--- automake.in 2001/03/05 19:11:31 1.969
+++ automake.in 2001/03/05 19:28:41
@@ -1185,14 +1185,14 @@
 	    {
 		$use_dependencies = 0;
 	    }
-	    elsif (/([0-9]+)\.([0-9]+)([a-z])?/)
+	    elsif (/([0-9]+)\.([0-9]+)([a-z]?)/)
 	    {
 		# Got a version number.
 
 		my ($rmajor, $rminor, $ralpha) = ($1, $2, $3);
 
 		&prog_error ("version is incorrect: $VERSION")
-		    if $VERSION !~ /([0-9]+)\.([0-9]+)([a-z])?/;
+		    if $VERSION !~ /([0-9]+)\.([0-9]+)([a-z]?)/;
 
 		my ($tmajor, $tminor, $talpha) = ($1, $2, $3);
 
@@ -6634,14 +6634,14 @@
 		      'MAINTAINER-MODE'
 		      => $seen_maint_mode ? '@MAINTAINER_MODE_TRUE@' : '',
 
-		      'SHAR'        => $options{'dist-shar'},
-		      'BZIP2'       => $options{'dist-bzip2'},
-		      'ZIP'         => $options{'dist-zip'},
-		      'COMPRESS'    => $options{'dist-tarZ'},
+		      'SHAR'        => $options{'dist-shar'} || 0,
+		      'BZIP2'       => $options{'dist-bzip2'} || 0,
+		      'ZIP'         => $options{'dist-zip'} || 0,
+		      'COMPRESS'    => $options{'dist-tarZ'} || 0,
 
 		      'INSTALL-INFO' => !$options{'no-installinfo'},
 		      'INSTALL-MAN'  => !$options{'no-installman'},
-		      'CK-NEWS'      => $options{'check-news'},
+		      'CK-NEWS'      => $options{'check-news'} || 0,
 
 		      'SUBDIRS'      => &variable_defined ('SUBDIRS'),
 		      'CONFIGURE-AC' => $configure_ac,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]