]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoscan.pl (scan_files): Eliminate a warning if no C files
authorPavel Roskin <proski@gnu.org>
Fri, 10 Nov 2000 15:49:15 +0000 (15:49 +0000)
committerPavel Roskin <proski@gnu.org>
Fri, 10 Nov 2000 15:49:15 +0000 (15:49 +0000)
are found.
(output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES
instead of old-style arguments for AC_INIT and AC_OUTPUT.

ChangeLog
autoscan.in
autoscan.pl
bin/autoscan.in

index 4ae9db522d9b6f3689e2ef2b9f15e90fe8bf07aa..6ea85a205880a4dd25e654fcf719877b8cde990d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-10  Pavel Roskin  <proski@gnu.org>
+
+       * autoscan.pl (scan_files): Eliminate a warning if no C files
+       are found.
+       (output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES
+       instead of old-style arguments for AC_INIT and AC_OUTPUT.
+
 2000-11-10  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi (Limitations of Usual Tools): `&' in sed's rhs
index 6bb8d80377bfeb4c8f23d2428cdb6db6dc357062..baf301c02eecae09ae8d3c6c8ef91509170425bd 100644 (file)
@@ -151,7 +151,9 @@ sub wanted
 # that might create nonportabilities.
 sub scan_files
 {
-  $initfile = $cfiles[0];              # Pick one at random.
+  if (defined $cfiles[0]) {
+    $initfile = $cfiles[0];            # Pick one at random.
+  }
 
   if ($verbose) {
     print "cfiles:", join(" ", @cfiles), "\n";
@@ -318,7 +320,10 @@ sub output
   local (%unique_makefiles);
 
   print CONF "# Process this file with autoconf to produce a configure script.\n";
-  print CONF "AC_INIT($initfile)\n";
+  print CONF "AC_INIT\n";
+  if (defined $initfile) {
+    print CONF "AC_CONFIG_SRCDIR([$initfile])\n";
+  }
 
   &output_programs;
   &output_headers;
@@ -330,7 +335,9 @@ sub output
     s/\.in$//;
     $unique_makefiles{$_}++;
   }
-  print CONF "\nAC_OUTPUT([", join("\n           ", keys(%unique_makefiles)), "])\n";
+  print CONF "\nAC_CONFIG_FILES([",
+    join("\n           ", keys(%unique_makefiles)), "])\n";
+  print CONF "AC_OUTPUT\n";
 
   close CONF;
 }
index 6bb8d80377bfeb4c8f23d2428cdb6db6dc357062..baf301c02eecae09ae8d3c6c8ef91509170425bd 100644 (file)
@@ -151,7 +151,9 @@ sub wanted
 # that might create nonportabilities.
 sub scan_files
 {
-  $initfile = $cfiles[0];              # Pick one at random.
+  if (defined $cfiles[0]) {
+    $initfile = $cfiles[0];            # Pick one at random.
+  }
 
   if ($verbose) {
     print "cfiles:", join(" ", @cfiles), "\n";
@@ -318,7 +320,10 @@ sub output
   local (%unique_makefiles);
 
   print CONF "# Process this file with autoconf to produce a configure script.\n";
-  print CONF "AC_INIT($initfile)\n";
+  print CONF "AC_INIT\n";
+  if (defined $initfile) {
+    print CONF "AC_CONFIG_SRCDIR([$initfile])\n";
+  }
 
   &output_programs;
   &output_headers;
@@ -330,7 +335,9 @@ sub output
     s/\.in$//;
     $unique_makefiles{$_}++;
   }
-  print CONF "\nAC_OUTPUT([", join("\n           ", keys(%unique_makefiles)), "])\n";
+  print CONF "\nAC_CONFIG_FILES([",
+    join("\n           ", keys(%unique_makefiles)), "])\n";
+  print CONF "AC_OUTPUT\n";
 
   close CONF;
 }
index 6bb8d80377bfeb4c8f23d2428cdb6db6dc357062..baf301c02eecae09ae8d3c6c8ef91509170425bd 100644 (file)
@@ -151,7 +151,9 @@ sub wanted
 # that might create nonportabilities.
 sub scan_files
 {
-  $initfile = $cfiles[0];              # Pick one at random.
+  if (defined $cfiles[0]) {
+    $initfile = $cfiles[0];            # Pick one at random.
+  }
 
   if ($verbose) {
     print "cfiles:", join(" ", @cfiles), "\n";
@@ -318,7 +320,10 @@ sub output
   local (%unique_makefiles);
 
   print CONF "# Process this file with autoconf to produce a configure script.\n";
-  print CONF "AC_INIT($initfile)\n";
+  print CONF "AC_INIT\n";
+  if (defined $initfile) {
+    print CONF "AC_CONFIG_SRCDIR([$initfile])\n";
+  }
 
   &output_programs;
   &output_headers;
@@ -330,7 +335,9 @@ sub output
     s/\.in$//;
     $unique_makefiles{$_}++;
   }
-  print CONF "\nAC_OUTPUT([", join("\n           ", keys(%unique_makefiles)), "])\n";
+  print CONF "\nAC_CONFIG_FILES([",
+    join("\n           ", keys(%unique_makefiles)), "])\n";
+  print CONF "AC_OUTPUT\n";
 
   close CONF;
 }