automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 30-transform-cond.patch


From: Akim Demaille
Subject: Re: 30-transform-cond.patch
Date: 09 Feb 2001 04:45:00 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

Tom Tromey <address@hidden> writes:

> I do like the patch.  But I'd like these things to be fixed before you
> check it in.

Here is  what I checked in.   Thanks for noticing!

----------------------------------------------------------------------
Here is the version I'm applying.  The changes Tom noted were due to
my writing $pair instead of $pairs.  I hope some day we really use
strict...  And prototypes, which will require a lot of massage, since
it means functions should be defined before being used.

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in (&transform): Use `my', not `local'.
        (&transform_cond): New.
        (&get_object_extension, &handle_texinfo, &handle_tags)
        (&handle_dist_worker, &handle_dist, &add_depend2, &handle_clean)
        (&handle_tests_dejagnu): Use it.
        * texinfos.am, lisp.am, header.am, dist.am, distdir.am, depend2.am
        * dejagnu.am, data.am, clean.am: Adjust to the new syntax.

Index: automake.in
--- automake.in Fri, 09 Feb 2001 04:02:17 +0100 akim (am/f/39_automake.i 1.36 
755)
+++ automake.in Fri, 09 Feb 2001 04:32:10 +0100 akim (am/f/39_automake.i 1.36 
755)
@@ -851,8 +851,9 @@ sub get_object_extension
        local ($xform) = &transform ('DEFAULT_INCLUDES' => $default_include);
        $output_vars .= &file_contents ('comp-vars', $xform);

-       $xform = $seen_objext ? 's/^OBJEXT//;' : 's/^OBJEXT.*$//;';
-       $output_rules .= &file_contents ('compile', $xform);
+       $output_rules .=
+         &file_contents ('compile',
+                         &transform_cond ('OBJEXT' => $seen_objext));

        # If using X, include some extra variable definitions.  NOTE
        # we don't want to force these into CFLAGS or anything,
@@ -2335,15 +2336,7 @@ sub handle_texinfo

     # Set transform for including texinfos.am.  First, handle --cygnus
     # stuff.
-    local ($xform);
-    if ($cygnus_mode)
-    {
-       $xform = 's/^NOTCYGNUS.*$//; s/^CYGNUS//;';
-    }
-    else
-    {
-       $xform = 's/^CYGNUS.*$//; s/^NOTCYGNUS//;';
-    }
+    my $xform = &transform_cond ('CYGNUS' => $cygnus_mode);

     # Handle location of texinfo.tex.
     local ($need_texi_file) = 0;
@@ -2541,17 +2534,9 @@ sub handle_tags
                $config .= &basename ($one_hdr);
            }
        }
-       local $xform = &transform ('CONFIG' => $xform,
-                                  'DIRS'   => join (' ', @tag_deps));
-
-       if (&variable_defined ('SUBDIRS'))
-       {
-           $xform .= 's/^SUBDIRS//;';
-       }
-       else
-       {
-           $xform .= 's/^SUBDIRS.*$//;';
-       }
+       my $xform = &transform ('CONFIG' => $xform,
+                               'DIRS'   => join (' ', @tag_deps));
+       $xform .= &transform_cond ('SUBDIRS' => &variable_defined ('SUBDIRS'));

        $output_rules .= &file_contents ('tags', $xform);
        $output_rules .= &file_contents ('tags-clean');
@@ -2586,23 +2571,8 @@ sub handle_dist_worker
     my $xform = '';

     # Initialization; only at top level.
-    if ($relative_dir eq '.')
-    {
-        $xform .= 's/address@hidden@//g;';
-    }
-    else
-    {
-        $xform .= 's/address@hidden@.*//g;';
-    }
-
-    if (defined $options{'check-news'})
-    {
-        $xform .= 's/address@hidden@//g;';
-    }
-    else
-    {
-        $xform .= 's/address@hidden@.*//g;';
-    }
+    my $xform = &transform_cond ('TOPDIR'  => ($relative_dir eq '.'),
+                                'CK-NEWS' => defined $options{'check-news'});

     # Scan EXTRA_DIST to see if we need to distribute anything from a
     # subdir.  If so, add it to the list.  I didn't want to do this
@@ -2646,17 +2616,6 @@ sub handle_dist_worker
         $xform .= 's/address@hidden@.*//g;';
     }

-    if ($cygnus_mode)
-    {
-       $xform .= 's/address@hidden@\t*/\t/g;';
-        $xform .= 's/address@hidden@.*//g;';
-    }
-    else
-    {
-       $xform .= 's/address@hidden@\t*/\t/g;';
-        $xform .= 's/address@hidden@.*//g;';
-    }
-
     # If we have SUBDIRS, create all dist subdirectories and do
     # recursive build.
     if (&variable_defined ('SUBDIRS'))
@@ -2693,19 +2652,17 @@ sub handle_dist_worker
            &define_pretty_variable ('DIST_SUBDIRS', '', '$(SUBDIRS)');
        }

-       $xform .= ('s/address@hidden@//g;'
-                  . &transform ('DIST_SUBDIR_NAME'
-                                => $dist_subdir_name,
-                                'TOP_DISTDIR'
-                                => (($relative_dir eq '.')
-                                    ? 'distdir' : 'top_distdir')));
-    }
-    else
-    {
-       $xform .= 's/address@hidden@.*//g;';
+       my $top_distdir = ($relative_dir eq '.') ? 'distdir' : 'top_distdir';
+       $xform .= &transform ('DIST_SUBDIR_NAME' => $dist_subdir_name,
+                             'TOP_DISTDIR'      => $top_distdir);
     }

-    $output_rules .= &file_contents ('distdir', $xform);
+    $output_rules .=
+      &file_contents ('distdir',
+                     $xform
+                     . &transform_cond ('CYGNUS' => $cygnus_mode,
+                                        'SUBDIRS'
+                                        => &variable_defined ('SUBDIRS')));

     # If the target `dist-hook' exists, make sure it is run.  This
     # allows users to do random weird things to the distribution
@@ -2832,24 +2789,9 @@ sub handle_dist
     if ($relative_dir eq '.')
     {
        # Rule to check whether a distribution is viable.
-       local ($xform) = '';
-
-       if (&target_defined ('distcheck-hook'))
-       {
-           $xform .= 's/^DISTHOOK//;';
-       }
-       else
-       {
-           $xform .= 's/^DISTHOOK.*$//;';
-       }
-       if ($seen_gettext)
-       {
-           $xform .= 's/^GETTEXT//;';
-       }
-       else
-       {
-           $xform .= 's/^GETTEXT.*$//;';
-       }
+       my ($xform) =
+         &transform_cond ('DISTHOOK' => &target_defined ('distcheck-hook'),
+                          'GETTEXT'  => $seen_gettext);

        # Arg, this file should have been named `distcheck'.
        $output_rules .= &file_contents ('dist', $xform);
@@ -2891,11 +2833,11 @@ sub add_depend2
     my $flag = $language_map{"$lang-flags"};

     # First include code for ordinary objects.
-    local ($xform, $ext);
+    my ($xform, $ext);
     $xform = &transform ('PFX'  => $pfx,
                         'FPFX' => $fpfx);
-    $xform .= $seen_objext  ? 's/^OBJEXT//;'  : 's/^OBJEXT.*$//;';
-    $xform .= $seen_libtool ? 's/^LIBTOOL//;' : 's/^LIBTOOL.*$//;';
+    $xform .= &transform_cond ('OBJEXT'  => $seen_objext,
+                              'LIBTOOL' => $seen_libtool);

     # This function can be called even when we don't want dependency
     # tracking.  This happens when we need an explicit rule for some
@@ -3869,14 +3811,8 @@ sub handle_clean
     # Don't include `MAINTAINER'; it is handled specially below.
     foreach $name ('MOSTLY', '', 'DIST')
     {
-       if (! &variable_defined ($name . 'CLEANFILES'))
-       {
-           $xform .= 's/^' . $name . 'CLEAN.*$//;';
-       }
-       else
-       {
-           $xform .= 's/^' . $name . 'CLEAN//;';
-       }
+      $xform .= &transform_cond ("${name}CLEAN"
+                                => &variable_defined ("${name}CLEANFILES"));
     }

     # Built sources are automatically removed by maintainer-clean.
@@ -3899,16 +3835,11 @@ sub handle_clean
                   . 's,address@hidden@,' . join (' ', @maintainer_clean_files)
                   . ',;');
     }
-    if ($recursive_install)
-    {
-       $xform .= 's/^NSUBDIRS.*$//;';
-    }
-    else
-    {
-       $xform .= 's/^NSUBDIRS//;';
-    }

-    $output_rules .= &file_contents ('clean', $xform);
+    $output_rules .=
+      &file_contents ('clean',
+                     $xform
+                     . &transform_cond ('SUBDIRS' => $recursive_install));

     foreach ('clean', 'distclean', 'mostlyclean', 'maintainer-clean')
       {
@@ -3976,16 +3907,9 @@ sub handle_tests_dejagnu
 {
     push (@check_tests, 'check-DEJAGNU');

-    local ($xform);
-    if ($cygnus_mode)
-    {
-        $xform = 's/^CYGNUS//;';
-    }
-    else
-    {
-        $xform = 's/^CYGNUS.*$//;';
-    }
-    $output_rules .= &file_contents ('dejagnu', $xform);
+    $output_rules .=
+      &file_contents ('dejagnu',
+                     &transform_cond ('CYGNUS' => $cygnus_mode));

     # In Cygnus mode, these are found in the build tree.
     # Otherwise they are looked for in $PATH.
@@ -7097,24 +7021,50 @@ sub file_contents
 }


+# $REGEXP
 # &transform (%PAIRS)
 # -------------------
 # Create a replacement expression suitable for file_contents
 # to replace each key of %PAIRS by its value.
-sub transform
+sub transform (%)
 {
-    local (%pairs) = @_;
-    local ($result) = '';
+    my (%pairs) = @_;
+    my ($result) = '';

-    local ($quoted);
-    foreach $pattern (sort keys %pairs)
+    foreach my $token (sort keys %pairs)
     {
-       ($quoted = $pairs{$pattern}) =~ s/(\W)/\\$1/g;
-        $result .= 's,\@' . $pattern . '\@,' . $quoted . ',g;';
+        $result .= "s/address@hidden@\E/\Q$pairs{$token}\E/g;";
     }
     return $result;
 }

+
+# $REGEXP
+# &transform_cond (%PAIRS)
+# ------------------------
+# For each pair ($TOKEN => $COND), if $COND is positive then create a regexp
+# that removes `?$TOKEN?', otherwise that removes the whole line containing
+# `?$TOKEN?'.  Do the converse for the token `?!$TOKEN?'.
+sub transform_cond (%)
+{
+    my (%pairs) = @_;
+    my ($result) = '';
+
+    foreach my $token (sort keys %pairs)
+    {
+        if ($pairs{$token})
+       {
+           $result .= "s/\Q?$token?\E//g;s/^.*\Q?!$token?\E.*\$//g;";
+       }
+       else
+       {
+           $result .= "s/\Q?!$token?\E//g;s/^.*\Q?$token?\E.*\$//g;";
+       }
+    }
+    return $result;
+}
+
+
 # Find all variable prefixes that are used for install directories.  A
 # prefix `zar' qualifies iff:
 # * `zardir' is a variable.
@@ -7421,23 +7371,13 @@ sub am_install_var
                next;
            }

-           local ($subdir_xform);
-           if ($strip_subdir)
-           {
-               $subdir_xform = 's/^NOBASE.*$//; s/^BASE//;';
-           }
-           else
-           {
-               $subdir_xform = 's/^BASE.*$//; s/^NOBASE//;';
-           }
-
            $output_rules .=
              &file_contents ($file,
                              &transform ('DIR'  => $X,
                                          'NDIR' => $nodir_name)
+                             . &transform_cond ('BASE' => $strip_subdir)
                              . $ltxform
-                             . $cygxform
-                             . $subdir_xform);
+                             . $cygxform);

            push (@uninstall, 'uninstall-' . $X . $primary);
            &depend ('.PHONY', 'uninstall-' . $X . $primary);
Index: texinfos.am
--- texinfos.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/10_texinfos.a 1.6 
644)
+++ texinfos.am Fri, 09 Feb 2001 04:03:20 +0100 akim (am/g/10_texinfos.a 1.6 
644)
@@ -29,11 +29,11 @@
 ## makeinfo.  Otherwise, if the texinfo file shrinks (or if you start
 ## using --no-split), you'll be left with some dead info files lying
 ## around -- dead files which will end up in the distribution.
-NOTCYGNUS      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-NOTCYGNUS      cd $(srcdir) \
-NOTCYGNUS        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
-CYGNUS @rm -f $@ address@hidden address@hidden
-CYGNUS $(MAKEINFO) -I $(srcdir) $<
+?!CYGNUS?      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
+?!CYGNUS?      cd $(srcdir) \
+?!CYGNUS?        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+?CYGNUS?       @rm -f $@ address@hidden address@hidden
+?CYGNUS?       $(MAKEINFO) -I $(srcdir) $<

 .texi.dvi:
        address@hidden@:$$TEXINPUTS \
@@ -50,11 +50,11 @@
 ## makeinfo.  Otherwise, if the texinfo file shrinks (or if you start
 ## using --no-split), you'll be left with some dead info files lying
 ## around -- dead files which will end up in the distribution.
-NOTCYGNUS      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-NOTCYGNUS      cd $(srcdir) \
-NOTCYGNUS        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
-CYGNUS @rm -f $@ address@hidden address@hidden
-CYGNUS $(MAKEINFO) -I $(srcdir) $<
+?!CYGNUS?      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
+?!CYGNUS?      cd $(srcdir) \
+?!CYGNUS?        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+?CYGNUS?       @rm -f $@ address@hidden address@hidden
+?CYGNUS?       $(MAKEINFO) -I $(srcdir) $<

 .texinfo.info:
 ## We want to force the .info file to be built in srcdir.  This is
@@ -65,11 +65,11 @@
 ## makeinfo.  Otherwise, if the texinfo file shrinks (or if you start
 ## using --no-split), you'll be left with some dead info files lying
 ## around -- dead files which will end up in the distribution.
-NOTCYGNUS      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-NOTCYGNUS      cd $(srcdir) \
-NOTCYGNUS        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
-CYGNUS @rm -f $@ address@hidden address@hidden
-CYGNUS $(MAKEINFO) -I $(srcdir) $<
+?!CYGNUS?      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
+?!CYGNUS?      cd $(srcdir) \
+?!CYGNUS?        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+?CYGNUS?       @rm -f $@ address@hidden address@hidden
+?CYGNUS?       $(MAKEINFO) -I $(srcdir) $<

 .texinfo:
 ## We want to force the .info file to be built in srcdir.  This is
@@ -80,11 +80,11 @@
 ## makeinfo.  Otherwise, if the texinfo file shrinks (or if you start
 ## using --no-split), you'll be left with some dead info files lying
 ## around -- dead files which will end up in the distribution.
-NOTCYGNUS      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-NOTCYGNUS      cd $(srcdir) \
-NOTCYGNUS        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
-CYGNUS @rm -f $@ address@hidden address@hidden
-CYGNUS $(MAKEINFO) -I $(srcdir) $<
+?!CYGNUS?      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
+?!CYGNUS?      cd $(srcdir) \
+?!CYGNUS?        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+?CYGNUS?       @rm -f $@ address@hidden address@hidden
+?CYGNUS?       $(MAKEINFO) -I $(srcdir) $<

 .texinfo.dvi:
        address@hidden@:$$TEXINPUTS \
@@ -101,11 +101,11 @@
 ## makeinfo.  Otherwise, if the texinfo file shrinks (or if you start
 ## using --no-split), you'll be left with some dead info files lying
 ## around -- dead files which will end up in the distribution.
-NOTCYGNUS      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-NOTCYGNUS      cd $(srcdir) \
-NOTCYGNUS        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
-CYGNUS @rm -f $@ address@hidden address@hidden
-CYGNUS $(MAKEINFO) -I $(srcdir) $<
+?!CYGNUS?      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
+?!CYGNUS?      cd $(srcdir) \
+?!CYGNUS?        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+?CYGNUS?       @rm -f $@ address@hidden address@hidden
+?CYGNUS?       $(MAKEINFO) -I $(srcdir) $<

 .txi.dvi:
        address@hidden@:$$TEXINPUTS \
@@ -122,11 +122,11 @@
 ## makeinfo.  Otherwise, if the texinfo file shrinks (or if you start
 ## using --no-split), you'll be left with some dead info files lying
 ## around -- dead files which will end up in the distribution.
-NOTCYGNUS      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-NOTCYGNUS      cd $(srcdir) \
-NOTCYGNUS        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
-CYGNUS @rm -f $@ address@hidden address@hidden
-CYGNUS $(MAKEINFO) -I $(srcdir) $<
+?!CYGNUS?      @cd $(srcdir) && rm -f $@ address@hidden address@hidden
+?!CYGNUS?      cd $(srcdir) \
+?!CYGNUS?        && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+?CYGNUS?       @rm -f $@ address@hidden address@hidden
+?CYGNUS?       $(MAKEINFO) -I $(srcdir) $<

 ## The way to make PostScript, for those who want it.
 DVIPS = dvips
@@ -143,8 +143,8 @@
        $(mkinstalldirs) $(DESTDIR)$(infodir)
        @list='$(INFO_DEPS)'; \
        for file in $$list; do \
-CYGNUS   if test -f $$file; then d=.; else d=$(srcdir); fi; \
-NOTCYGNUS        d=$(srcdir); \
+?CYGNUS?         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+?!CYGNUS?        d=$(srcdir); \
 ## We use these strange circumlocutions because we want the "ifile" to
 ## be relative, for the install.
          for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] 
$$file-[0-9][0-9]`; do \
@@ -200,8 +200,8 @@
        for base in $$list; do \
 ## In Cygnus mode, allow info file to be in source or build dir.  In
 ## other modes, allow only source dir.
-NOTCYGNUS        d=$(srcdir); \
-CYGNUS   if test -f $$base; then d=.; else d=$(srcdir); fi; \
+?!CYGNUS?        d=$(srcdir); \
+?CYGNUS?         if test -f $$base; then d=.; else d=$(srcdir); fi; \
          for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
            test -f $(distdir)/$$file \
            || cp -p $$d/$$file $(distdir)/$$file; \
@@ -223,7 +223,7 @@
 maintainer-clean-am: maintainer-clean-aminfo
 maintainer-clean-aminfo:
 ## Eww.  But how else can we find all the output files from makeinfo?
-NOTCYGNUS      cd $(srcdir) && \
+?!CYGNUS?      cd $(srcdir) && \
        for i in $(INFO_DEPS); do \
          rm -f $$i; \
          if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
@@ -231,5 +231,5 @@
          fi; \
        done

-CYGNUS.PHONY: clean-info
-CYGNUSclean-info: mostlyclean-aminfo
+?CYGNUS?.PHONY: clean-info
+?CYGNUS?clean-info: mostlyclean-aminfo
Index: tags.am
--- tags.am Sun, 28 Jan 2001 15:51:12 +0100 akim (am/g/12_tags.am 1.2 644)
+++ tags.am Fri, 09 Feb 2001 04:14:25 +0100 akim (am/g/12_tags.am 1.2 644)
@@ -33,12 +33,12 @@
                $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
-SUBDIRS        list='$(SUBDIRS)'; for subdir in $$list; do \
+?SUBDIRS?      list='$(SUBDIRS)'; for subdir in $$list; do \
 ## Do nothing if we're trying to look in `.'.
-SUBDIRS   if test "$$subdir" = .; then :; else \
-SUBDIRS            test -f $$subdir/TAGS && tags="$$tags -i 
$$here/$$subdir/TAGS"; \
-SUBDIRS   fi; \
-SUBDIRS        done; \
+?SUBDIRS?   if test "$$subdir" = .; then :; else \
+?SUBDIRS?          test -f $$subdir/TAGS && tags="$$tags -i 
$$here/$$subdir/TAGS"; \
+?SUBDIRS?   fi; \
+?SUBDIRS?      done; \
 ## Make sure the list of sources is unique.
        list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
Index: lisp.am
--- lisp.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/29_lisp.am 1.3 644)
+++ lisp.am Fri, 09 Feb 2001 04:07:18 +0100 akim (am/g/29_lisp.am 1.3 644)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+## Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.

 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@
        @list='$(@address@hidden)'; for p in $$list; do \
 ## A lisp file can be in the source directory or the build directory.
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-BASE     f="`echo $$p | sed -e 's|^.*/||'`"; \
-NOBASE   f="$$p"; \
+?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!BASE?          f="$$p"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@address@hidden)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@address@hidden)/$$f; \
 ## Only install .elc file if it exists.
@@ -37,8 +37,8 @@
 address@hidden@LISP:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
-BASE     f="`echo $$p | sed -e 's|^.*/||'`"; \
-NOBASE   f="$$p"; \
+?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!BASE?          f="$$p"; \
          echo " rm -f $(@address@hidden)/$$f 
$(DESTDIR)$(@address@hidden)/$${f}c"; \
          rm -f $(DESTDIR)$(@address@hidden)/$$f 
$(DESTDIR)$(@address@hidden)/$${f}c; \
        done
Index: header.am
--- header.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/38_header.am 1.3 644)
+++ header.am Fri, 09 Feb 2001 04:06:54 +0100 akim (am/g/38_header.am 1.3 644)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+## Copyright 1994, 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc.

 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@
        @list='$(@address@hidden)'; for p in $$list; do \
 ## A header file can be in the source directory or the build directory.
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-BASE     f="`echo $$p | sed -e 's|^.*/||'`"; \
-NOBASE   f="$$p"; \
+?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!NOBASE?        f="$$p"; \
          echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(@address@hidden)/$$f"; \
          $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(@address@hidden)/$$f; \
        done
@@ -32,8 +32,8 @@
 address@hidden@HEADERS:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
-BASE     f="`echo $$p | sed -e 's|^.*/||'`"; \
-NOBASE   f="$$p"; \
+?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!BASE?          f="$$p"; \
          echo " rm -f $(DESTDIR)$(@address@hidden)/$$f"; \
          rm -f $(DESTDIR)$(@address@hidden)/$$f; \
        done
Index: dist.am
--- dist.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/42_dist.am 1.3 644)
+++ dist.am Fri, 09 Feb 2001 04:03:20 +0100 akim (am/g/42_dist.am 1.3 644)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
+## Copyright 1994, 1995, 1996, 1999, 2001 Free Software Foundation, Inc.

 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -15,6 +15,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
@@ -31,10 +32,10 @@
 ## Undo the write access.
        chmod a-w $(distdir)
        dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
-DISTHOOK         && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
+?DISTHOOK?       && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
          && cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
-GETTEXT            --with-included-gettext \
+?GETTEXT?          --with-included-gettext \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
Index: distdir.am
--- distdir.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/h/17_distdir.am 1.3 644)
+++ distdir.am Fri, 09 Feb 2001 04:11:37 +0100 akim (am/h/17_distdir.am 1.3 644)
@@ -23,15 +23,15 @@
 ## For Gnits users, this is pretty handy.  Look at 15 lines
 ## in case some explanatory text is desirable.
 ##
address@hidden@@CK-NEWS@        @if sed 15q $(srcdir)/NEWS | fgrep -e 
"$(VERSION)" > /dev/null; then :; else \
address@hidden@@CK-NEWS@          echo "NEWS not updated; not releasing" 1>&2; \
address@hidden@@CK-NEWS@          exit 1; \
address@hidden@@CK-NEWS@        fi
+?TOPDIR??CK-NEWS?      @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > 
/dev/null; then :; else \
+?TOPDIR??CK-NEWS?        echo "NEWS not updated; not releasing" 1>&2; \
+?TOPDIR??CK-NEWS?        exit 1; \
+?TOPDIR??CK-NEWS?      fi
 ##
 ## Only for the top dir.
 ##
address@hidden@ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
address@hidden@ mkdir $(distdir)
+?TOPDIR?       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+?TOPDIR?       mkdir $(distdir)
 ##
 ##
        $(mkinstalldirs) @DISTDIRS@
@@ -46,8 +46,8 @@
 ## distribute could actually be a cross-filesystem symlink -- this can
 ## easily happen if "gettextize" was run on the distribution.
 ##
address@hidden@  if test -f $$file; then d=.; else d=$(srcdir); fi; \
address@hidden@  d=$(srcdir); \
+?CYGNUS?         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+?!CYGNUS?        d=$(srcdir); \
 ##
          if test -d $$d/$$file; then \
 ## Don't mention $$file in destination argument, since this fails if
@@ -70,13 +70,13 @@
 ## directory, then we use `distdir' instead of `top_distdir'; this lets
 ## us work correctly with an enclosing package.
 ##
address@hidden@ for subdir in $(@DIST_SUBDIR_NAME@); do \
address@hidden@   if test "$$subdir" = .; then :; else \
address@hidden@     test -d $(distdir)/$$subdir \
address@hidden@     || mkdir $(distdir)/$$subdir \
address@hidden@     || exit 1; \
address@hidden@     (cd $$subdir && \
address@hidden@       $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(@TOP_DISTDIR@) 
distdir=../$(distdir)/$$subdir distdir) \
address@hidden@       || exit 1; \
address@hidden@   fi; \
address@hidden@ done
+?SUBDIRS?      for subdir in $(@DIST_SUBDIR_NAME@); do \
+?SUBDIRS?        if test "$$subdir" = .; then :; else \
+?SUBDIRS?          test -d $(distdir)/$$subdir \
+?SUBDIRS?          || mkdir $(distdir)/$$subdir \
+?SUBDIRS?          || exit 1; \
+?SUBDIRS?          (cd $$subdir && \
+?SUBDIRS?            $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(@TOP_DISTDIR@) 
distdir=../$(distdir)/$$subdir distdir) \
+?SUBDIRS?            || exit 1; \
+?SUBDIRS?        fi; \
+?SUBDIRS?      done
Index: depend2.am
--- depend2.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/43_depend2.am 1.4 644)
+++ depend2.am Fri, 09 Feb 2001 04:03:20 +0100 akim (am/g/43_depend2.am 1.4 644)
@@ -21,8 +21,9 @@
 ## - once per language for generic compilation rules
 ## - once for each file which requires specific flags.
 ##
-## It is worth noting that @AMDEP@ and @AMDEPBACKSLASH@ are not
-## transformed by automake, they are AC_SUBST'ed.
+## It is worth noting that @AMDEPBACKSLASH@ is not transformed by automake,
+## it is AC_SUBST'ed, and @AMDEP@ can be both deactivated by automake,
+## or by AC_SUBST.

 @AMDEP@@address@hidden = @@address@hidden@

@@ -32,14 +33,14 @@
 @AMDEP@        $(@address@hidden) $(depcomp) @AMDEPBACKSLASH@
        @COMPILE@ -c -o @OBJ@ `test -f @SOURCE@ || echo 
'$(srcdir)/'address@hidden@

address@hidden@.lo:
address@hidden@ source='@SOURCE@' object='@LTOBJ@' libtool=yes @AMDEPBACKSLASH@
address@hidden@ depfile='$(DEPDIR)/@address@hidden' 
tmpdepfile='$(DEPDIR)/@address@hidden' @AMDEPBACKSLASH@
address@hidden@ $(@address@hidden) $(depcomp) @AMDEPBACKSLASH@
-LIBTOOL        @LTCOMPILE@ -c -o @LTOBJ@ `test -f @SOURCE@ || echo 
'$(srcdir)/'address@hidden@
address@hidden@.lo:
address@hidden@ source='@SOURCE@' object='@LTOBJ@' libtool=yes @AMDEPBACKSLASH@
address@hidden@ depfile='$(DEPDIR)/@address@hidden' 
tmpdepfile='$(DEPDIR)/@address@hidden' @AMDEPBACKSLASH@
address@hidden@ $(@address@hidden) $(depcomp) @AMDEPBACKSLASH@
+?LIBTOOL?      @LTCOMPILE@ -c -o @LTOBJ@ `test -f @SOURCE@ || echo 
'$(srcdir)/'address@hidden@

address@hidden@.obj:
address@hidden@ source='@SOURCE@' object='@OBJOBJ@' libtool=no @AMDEPBACKSLASH@
address@hidden@ depfile='$(DEPDIR)/@address@hidden' 
tmpdepfile='$(DEPDIR)/@address@hidden' @AMDEPBACKSLASH@
address@hidden@ $(@address@hidden) $(depcomp) @AMDEPBACKSLASH@
-OBJEXT @COMPILE@ -c -o @OBJOBJ@ `cygpath -w @address@hidden
address@hidden@.obj:
address@hidden@ source='@SOURCE@' object='@OBJOBJ@' libtool=no @AMDEPBACKSLASH@
address@hidden@ depfile='$(DEPDIR)/@address@hidden' 
tmpdepfile='$(DEPDIR)/@address@hidden' @AMDEPBACKSLASH@
address@hidden@ $(@address@hidden) $(depcomp) @AMDEPBACKSLASH@
+?OBJEXT?       @COMPILE@ -c -o @OBJOBJ@ `cygpath -w @address@hidden
Index: dejagnu.am
--- dejagnu.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/45_dejagnu.am 1.4 644)
+++ dejagnu.am Fri, 09 Feb 2001 04:03:20 +0100 akim (am/g/45_dejagnu.am 1.4 644)
@@ -32,10 +32,10 @@
        EXPECT=$(EXPECT); export EXPECT; \
 ## Allow this to work when expect and DejaGNU are in tree.
 ## Only required when --cygnus in force.
-CYGNUS if [ -f $(top_builddir)/../expect/expect ]; then \
-CYGNUS   TCL_LIBRARY=`CDPATH=: && cd $(top_srcdir)/../tcl/library && pwd`; \
-CYGNUS   export TCL_LIBRARY; \
-CYGNUS fi; \
+?CYGNUS?       if [ -f $(top_builddir)/../expect/expect ]; then \
+?CYGNUS?         TCL_LIBRARY=`CDPATH=: && cd $(top_srcdir)/../tcl/library && 
pwd`; \
+?CYGNUS?         export TCL_LIBRARY; \
+?CYGNUS?       fi; \
        runtest=$(RUNTEST); \
 ## If runtest can't be found, print a warning but don't die.  It is
 ## pointless to cause a failure if the tests cannot be run at all.
Index: data.am
--- data.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/46_data.am 1.3 644)
+++ data.am Fri, 09 Feb 2001 04:03:20 +0100 akim (am/g/46_data.am 1.3 644)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+## Copyright 1994, 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc.

 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -25,8 +25,8 @@
 ## If the _DATA variable has an entry like foo/bar, install it as
 ## $(destdir)/bar, not $(destdir)/foo/bar.  The user can always make a
 ## new dir variable for the latter case.
-BASE     f="`echo $$p | sed -e 's|^.*/||'`"; \
-NOBASE   f="$$p"; \
+?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!BASE?          f="$$p"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@address@hidden)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@address@hidden)/$$f; \
        done
@@ -34,8 +34,8 @@
 address@hidden@DATA:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
-BASE     f="`echo $$p | sed -e 's|^.*/||'`"; \
-NOBASE   f="$$p"; \
+?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!BASE?          f="$$p"; \
          echo " rm -f $(DESTDIR)$(@address@hidden)/$$f"; \
          rm -f $(DESTDIR)$(@address@hidden)/$$f; \
        done
Index: compile.am
--- compile.am Sun, 04 Feb 2001 14:35:53 +0100 akim (am/g/48_compile.am 1.2 644)
+++ compile.am Fri, 09 Feb 2001 04:03:20 +0100 akim (am/g/48_compile.am 1.2 644)
@@ -21,7 +21,7 @@
 ## Don't remove 'core.*' because some distributions have eg "core.c".
 ## 4.4BSD systems use `PROG.core'.
        -rm -f *.o core *.core
-OBJEXT -rm -f *.$(OBJEXT)
+?OBJEXT?       -rm -f *.$(OBJEXT)

 distclean-am: distclean-compile
 distclean-compile:
Index: clean.am
--- clean.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/50_clean.am 1.5 644)
+++ clean.am Fri, 09 Feb 2001 04:31:37 +0100 akim (am/g/50_clean.am 1.5 644)
@@ -21,17 +21,17 @@
 ## return an error if there are no arguments other than "-f".
 mostlyclean-am: mostlyclean-generic
 mostlyclean-generic:
-MOSTLYCLEAN    -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+?MOSTLYCLEAN?  -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)

 clean-am: clean-generic mostlyclean-am
 clean-generic:
-CLEAN  -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+?CLEAN?        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

 distclean-am: distclean-generic clean-am
 distclean-generic:
        -rm -f Makefile $(CONFIG_CLEAN_FILES)
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-DISTCLEAN      -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+?DISTCLEAN?    -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)

 maintainer-clean-am: maintainer-clean-generic distclean-am
 maintainer-clean-generic:
@@ -45,7 +45,7 @@
 .PHONY: clean mostlyclean distclean maintainer-clean \
 clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic

-NSUBDIRSclean: clean-am
-NSUBDIRSdistclean: distclean-am
-NSUBDIRSmostlyclean: mostlyclean-am
-NSUBDIRSmaintainer-clean: maintainer-clean-am
+?!SUBDIRS?clean: clean-am
+?!SUBDIRS?distclean: distclean-am
+?!SUBDIRS?mostlyclean: mostlyclean-am
+?!SUBDIRS?maintainer-clean: maintainer-clean-am
Index: tests/Makefile.in
--- tests/Makefile.in Fri, 09 Feb 2001 04:02:17 +0100 akim (am/h/14_Makefile.i 
1.10 644)
+++ tests/Makefile.in Fri, 09 Feb 2001 04:33:19 +0100 akim (am/h/14_Makefile.i 
1.10 644)
@@ -1,6 +1,6 @@
 # Makefile.in generated automatically by automake 1.4c from Makefile.am

-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -465,10 +465,8 @@

 mostlyclean-generic:

-
 clean-generic:

-
 distclean-generic:
        -rm -f Makefile $(CONFIG_CLEAN_FILES)
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
@@ -508,4 +506,3 @@
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-
Index: m4/Makefile.in
--- m4/Makefile.in Fri, 09 Feb 2001 04:02:17 +0100 akim (am/h/15_Makefile.i 1.9 
644)
+++ m4/Makefile.in Fri, 09 Feb 2001 04:33:19 +0100 akim (am/h/15_Makefile.i 1.9 
644)
@@ -1,6 +1,6 @@
 # Makefile.in generated automatically by automake 1.4c from Makefile.am

-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,7 @@
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(m4datadir)
        @list='$(m4data_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f="`echo $$p | sed -e 's|^.*/||'`"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4datadir)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4datadir)/$$f; \
@@ -168,10 +168,8 @@

 mostlyclean-generic:

-
 clean-generic:

-
 distclean-generic:
        -rm -f Makefile $(CONFIG_CLEAN_FILES)
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
@@ -208,4 +206,3 @@
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-
Index: Makefile.in
--- Makefile.in Fri, 09 Feb 2001 04:02:17 +0100 akim (am/h/16_Makefile.i 1.10 
644)
+++ Makefile.in Fri, 09 Feb 2001 04:33:18 +0100 akim (am/h/16_Makefile.i 1.10 
644)
@@ -1,6 +1,6 @@
 # Makefile.in generated automatically by automake 1.4c from Makefile.am

-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -316,7 +316,7 @@
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
        @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f="`echo $$p | sed -e 's|^.*/||'`"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
@@ -334,7 +334,7 @@
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(scriptdir)
        @list='$(dist_script_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f="`echo $$p | sed -e 's|^.*/||'`"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(scriptdir)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(scriptdir)/$$f; \
@@ -407,7 +407,6 @@

 tags: TAGS

-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@ -560,10 +559,8 @@

 mostlyclean-generic:

-
 clean-generic:

-
 distclean-generic:
        -rm -f Makefile $(CONFIG_CLEAN_FILES)
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
@@ -693,4 +690,3 @@
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]