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]

02-handle-programs.patch


Index: ChangeLog
from  Akim Demaille  <akim@epita.fr>
	* automake.in (handle_programs) <xexe>: Remove, replaced by
	`exeext'.
	Use it, and &transform.
	
	
Index: automake.in
--- automake.in Fri, 26 Jan 2001 21:37:09 +0100 akim (am/f/39_automake.i 1.4 755)
+++ automake.in Fri, 26 Jan 2001 21:47:38 +0100 akim (am/f/39_automake.i 1.4 755)
@@ -1708,6 +1708,9 @@ sub check_canonical_spelling
     return $xname;
 }
 
+
+# handle_programs ()
+# ------------------
 # Handle C programs.
 sub handle_programs
 {
@@ -1798,23 +1801,19 @@ sub handle_programs
 	    $xlink = $linker ? $linker : 'LINK';
 	}
 
-	local ($xexe);
+	local ($exeext) = '';
 	if ($seen_exeext && $one_file !~ /\./)
 	{
-	    $xexe = 's/\@EXEEXT\@/\$(EXEEXT)/g;';
-	}
-	else
-	{
-	    $xexe = 's/\@EXEEXT\@//g;';
+	    $exeext = '$(EXEEXT)';
 	}
 
 	$output_rules .=
 	    &file_contents_with_transform
-		('s/\@PROGRAM\@/' . $one_file . '/go;'
-		 . 's/\@XPROGRAM\@/' . $xname . '/go;'
-		 . 's/\@XLINK\@/' . $xlink . '/go;'
-		 . $xexe,
-		 'program');
+	      (&transform ('EXEEXT'   => $exeext,
+			   'PROGRAM'  => $one_file,
+			   'XPROGRAM' => $xname,
+			   'XLINK'    => $xlink),
+	       'program');
     }
 
     if (&variable_defined ('LDADD') && &handle_lib_objects ('', 'LDADD', 0))


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