automake
[Top][All Lists]
Advanced

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

30-transform-cond.patch


From: Akim Demaille
Subject: 30-transform-cond.patch
Date: Wed, 07 Feb 2001 00:56:41 +0100

A very stupid and mechanic patch, indeed, but it helps me seeing what
happens.  In this patch I took the freedom of introducing a new
syntax: @FOO@ means `to be substituted', while `?FOO?' means to be
removed if positive, or to kill the line if negative, and conversely
for `?!FOO?'.

This patch includes the Makefile.ins' diffs, i.e., no changes.  I have
pr19 and 87 fail at home but my archive is old, and tomorrow I'll
adjust what needs to be before applying if approved.

Index: ChangeLog
--- ChangeLog Sun, 04 Feb 2001 17:31:54 +0100 akim (am/f/47_ChangeLog 1.34 644)
+++ 0.40(w)/ChangeLog Wed, 07 Feb 2001 00:30:10 +0100 akim (am/f/47_ChangeLog 
1.35 644)
@@ -1,3 +1,13 @@
+2001-02-07  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.
+
 2001-02-04  Akim Demaille  <address@hidden>

        * automake.in: Various formatting changes, and modernization of
Index: automake.in
--- automake.in Sun, 04 Feb 2001 17:31:54 +0100 akim (am/f/39_automake.i 1.34 
755)
+++ 0.40(w)/automake.in Wed, 07 Feb 2001 00:49:22 +0100 akim 
(am/f/39_automake.i 1.35 755)
@@ -851,8 +851,9 @@
        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 @@

     # 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 @@
                $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 @@
     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
@@ -2648,17 +2618,6 @@
         $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'))
@@ -2695,19 +2654,17 @@
            &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
@@ -2834,24 +2791,9 @@
     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);
@@ -2893,11 +2835,11 @@
     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
@@ -3842,14 +3784,8 @@
     # 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.
@@ -3946,16 +3882,9 @@
 {
     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.
@@ -7053,24 +6982,50 @@
 }


+# $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 ($pair{$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.
@@ -7377,23 +7332,13 @@
                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 Sun, 04 Feb 2001 14:35:53 +0100 akim (am/g/10_texinfos.a 1.4 
644)
+++ 0.40(w)/texinfos.am Tue, 06 Feb 2001 23:50:16 +0100 akim 
(am/g/10_texinfos.a 1.5 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: lisp.am
--- lisp.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/29_lisp.am 1.1 644)
+++ 0.40(w)/lisp.am Tue, 06 Feb 2001 23:59:07 +0100 akim (am/g/29_lisp.am 1.2 
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 Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/38_header.am 1.1 644)
+++ 0.40(w)/header.am Tue, 06 Feb 2001 23:58:32 +0100 akim (am/g/38_header.am 
1.2 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|^.*/||'`"; \
+?!BASE?          f="$$p"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@address@hidden)/$$f"; \
          $(INSTALL_DATA) $$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 Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/42_dist.am 1.1 644)
+++ 0.40(w)/dist.am Tue, 06 Feb 2001 23:51:32 +0100 akim (am/g/42_dist.am 1.2 
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 Wed, 31 Jan 2001 22:34:58 +0100 akim (am/h/17_distdir.am 1.1 644)
+++ 0.40(w)/distdir.am Tue, 06 Feb 2001 23:50:53 +0100 akim (am/h/17_distdir.am 
1.2 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 Wed, 31 Jan 2001 20:16:37 +0100 akim (am/g/43_depend2.am 1.2 644)
+++ 0.40(w)/depend2.am Wed, 07 Feb 2001 00:50:48 +0100 akim (am/g/43_depend2.am 
1.3 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 Sun, 28 Jan 2001 15:51:12 +0100 akim (am/g/45_dejagnu.am 1.2 644)
+++ 0.40(w)/dejagnu.am Tue, 06 Feb 2001 23:50:16 +0100 akim (am/g/45_dejagnu.am 
1.3 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 Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/46_data.am 1.1 644)
+++ 0.40(w)/data.am Wed, 07 Feb 2001 00:29:36 +0100 akim (am/g/46_data.am 1.2 
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)
+++ 0.40(w)/compile.am Wed, 07 Feb 2001 00:39:11 +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 Sun, 04 Feb 2001 14:35:53 +0100 akim (am/g/50_clean.am 1.3 644)
+++ 0.40(w)/clean.am Wed, 07 Feb 2001 00:25:14 +0100 akim (am/g/50_clean.am 1.4 
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
 clean-generic:
-CLEAN  -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+?CLEAN?        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

 distclean-am: distclean-generic
 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
 maintainer-clean-generic:
Index: tests/Makefile.in
--- tests/Makefile.in Sun, 04 Feb 2001 15:32:38 +0100 akim (am/h/14_Makefile.i 
1.8 644)
+++ 0.40(w)/tests/Makefile.in Wed, 07 Feb 2001 00:34:39 +0100 akim 
(am/h/14_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,
@@ -423,7 +423,7 @@

 distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
-         d=$(srcdir); \
+  d=$(srcdir); \
          if test -d $$d/$$file; then \
            cp -pR $$d/$$file $(distdir) \
            || exit 1; \
Index: m4/Makefile.in
--- m4/Makefile.in Sun, 04 Feb 2001 14:35:53 +0100 akim (am/h/15_Makefile.i 1.7 
644)
+++ 0.40(w)/m4/Makefile.in Wed, 07 Feb 2001 00:34:39 +0100 akim 
(am/h/15_Makefile.i 1.8 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 @@
        $(mkinstalldirs) $(DESTDIR)$(m4datadir)
        @list='$(m4data_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         f="$$p"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4datadir)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4datadir)/$$f; \
        done
@@ -115,7 +115,7 @@
 uninstall-m4dataDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(m4data_DATA)'; for p in $$list; do \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         f="$$p"; \
          echo " rm -f $(DESTDIR)$(m4datadir)/$$f"; \
          rm -f $(DESTDIR)$(m4datadir)/$$f; \
        done
@@ -128,7 +128,7 @@

 distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
-         d=$(srcdir); \
+  d=$(srcdir); \
          if test -d $$d/$$file; then \
            cp -pR $$d/$$file $(distdir) \
            || exit 1; \
Index: Makefile.in
--- Makefile.in Sun, 04 Feb 2001 15:28:52 +0100 akim (am/h/16_Makefile.i 1.8 
644)
+++ 0.40(w)/Makefile.in Wed, 07 Feb 2001 00:34:38 +0100 akim 
(am/h/16_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,
@@ -316,7 +316,7 @@
        $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
        @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         f="$$p"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
        done
@@ -324,7 +324,7 @@
 uninstall-dist_pkgdataDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         f="$$p"; \
          echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
          rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
        done
@@ -334,7 +334,7 @@
        $(mkinstalldirs) $(DESTDIR)$(scriptdir)
        @list='$(dist_script_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         f="$$p"; \
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(scriptdir)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(scriptdir)/$$f; \
        done
@@ -342,7 +342,7 @@
 uninstall-dist_scriptDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(dist_script_DATA)'; for p in $$list; do \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         f="$$p"; \
          echo " rm -f $(DESTDIR)$(scriptdir)/$$f"; \
          rm -f $(DESTDIR)$(scriptdir)/$$f; \
        done
@@ -420,11 +420,11 @@
                $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-   if test "$$subdir" = .; then :; else \
-           test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-   fi; \
-       done; \
+SUBDIRS        list='$(SUBDIRS)'; for subdir in $$list; do \
+SUBDIRS   if test "$$subdir" = .; then :; else \
+SUBDIRS            test -f $$subdir/TAGS && tags="$$tags -i 
$$here/$$subdir/TAGS"; \
+SUBDIRS   fi; \
+SUBDIRS        done; \
        list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@ -494,14 +494,8 @@
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)

 distdir: $(DISTFILES)
-       @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; 
else \
-         echo "NEWS not updated; not releasing" 1>&2; \
-         exit 1; \
-       fi
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-       mkdir $(distdir)
        @for file in $(DISTFILES); do \
-         d=$(srcdir); \
+  d=$(srcdir); \
          if test -d $$d/$$file; then \
            cp -pR $$d/$$file $(distdir) \
            || exit 1; \
@@ -509,16 +503,6 @@
            test -f $(distdir)/$$file \
            || cp -p $$d/$$file $(distdir)/$$file \
            || exit 1; \
-         fi; \
-       done
-       for subdir in $(SUBDIRS); do \
-         if test "$$subdir" = .; then :; else \
-           test -d $(distdir)/$$subdir \
-           || mkdir $(distdir)/$$subdir \
-           || exit 1; \
-           (cd $$subdir && \
-             $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) 
distdir=../$(distdir)/$$subdir distdir) \
-             || exit 1; \
          fi; \
        done
        $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" 
distdir="$(distdir)" dist-info



reply via email to

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