]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
1999-01-10 Alexandre Oliva <oliva@dcc.unicamp.br>
authorTom Tromey <tromey@redhat.com>
Sun, 10 Jan 1999 21:09:52 +0000 (21:09 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 10 Jan 1999 21:09:52 +0000 (21:09 +0000)
* missing (autoheader): accept multiple header files
(automake): simplify sed processing

ChangeLog
lib/missing
missing

index 199c36ec315552c29e72f89b675895e7480ae12d..d5580be1030fa43c9e44408697f57eb5061d8656 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-01-10  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * missing (autoheader): accept multiple header files
+       (automake): simplify sed processing
+
 1999-01-10  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * automake.in (handle_configure, stamp_dir): create only one stamp
index cbe2b0ef0e3aa005628a84fb179c341db985f7dc..5a81ac50e30603efc7a0e49ededae5ca81faae33 100755 (executable)
@@ -82,15 +82,17 @@ WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`acconfig.h' or \`configure.in'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
-    if test -z "$files"; then
-      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
-      test -z "$files" || files="$files.in"
-    else
-      files=`echo "$files" | sed -e 's/:/ /g'`
-    fi
-    test -z "$files" && files="config.h.in"
-    touch $files
+    files=`sed -n '/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
     ;;
 
   automake)
@@ -99,9 +101,9 @@ WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print \
-      | sed 's/^\(.*\).am$/touch \1.in/' \
-      | sh
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
     ;;
 
   bison|yacc)
diff --git a/missing b/missing
index cbe2b0ef0e3aa005628a84fb179c341db985f7dc..5a81ac50e30603efc7a0e49ededae5ca81faae33 100755 (executable)
--- a/missing
+++ b/missing
@@ -82,15 +82,17 @@ WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`acconfig.h' or \`configure.in'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
-    if test -z "$files"; then
-      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
-      test -z "$files" || files="$files.in"
-    else
-      files=`echo "$files" | sed -e 's/:/ /g'`
-    fi
-    test -z "$files" && files="config.h.in"
-    touch $files
+    files=`sed -n '/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
     ;;
 
   automake)
@@ -99,9 +101,9 @@ WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print \
-      | sed 's/^\(.*\).am$/touch \1.in/' \
-      | sh
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
     ;;
 
   bison|yacc)