automake
[Top][All Lists]
Advanced

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

18-file-contents-uses-rule-define.patch


From: Akim Demaille
Subject: 18-file-contents-uses-rule-define.patch
Date: Fri, 09 Mar 2001 00:48:04 +0100

The reason you can observe a difference on the Makefile.in is that I
changed file_contents to dump *exactly* what it saw, instead of
reconstructing it.  The drawback is that when we were reconstructing,
we could clean up the output for duplicate spaces around the colon.

These precise spaces are coming for the MAINTAINER-MODE in configure.am:


%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% 
$(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)


Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in (&file_contents): Use rule_define.

Index: Makefile.in
--- Makefile.in Thu, 08 Mar 2001 22:57:30 +0100 akim (am/h/16_Makefile.i 1.41 
644)
+++ Makefile.in Thu, 08 Mar 2001 23:42:04 +0100 akim (am/h/16_Makefile.i 1.41 
644)
@@ -143,11 +143,11 @@
 .SUFFIXES:
 .SUFFIXES: .dvi .info .ps .texi .texinfo .txi

-$(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnits  Makefile

-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) && \
          CONFIG_HEADERS= CONFIG_LINKS= \
          CONFIG_FILES=$@ $(SHELL) ./config.status
@@ -156,7 +156,7 @@

 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) 
$(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) 
$(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)
 automake: $(top_builddir)/config.status automake.in
        cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= 
$(SHELL) ./config.status
@@ -184,7 +184,7 @@
          rm -f $(DESTDIR)$(bindir)/$$f; \
        done

-$(srcdir)/version.texi: $(srcdir)/stamp-vti
+$(srcdir)/version.texi:  $(srcdir)/stamp-vti
        @:

 $(srcdir)/stamp-vti: automake.texi $(top_srcdir)/configure.in
Index: automake.in
--- automake.in Thu, 08 Mar 2001 23:31:16 +0100 akim (am/f/39_automake.i 1.131 
755)
+++ automake.in Thu, 08 Mar 2001 23:41:54 +0100 akim (am/f/39_automake.i 1.131 
755)
@@ -6771,6 +6771,7 @@ sub file_contents ($%)
          # line).
          # I'm quite shoked!  It seems that (\\\n|[^\n]) is not the
          # same as `([^\n]|\\\n)!!!  Don't swap it, it breaks.
+         my $paragraph = $_;
          /^((?:\\\n|[^\n])*)(?:\n(\t.*))?$/som;
          my ($relationship, $actions) = ($1, $2 || '');

@@ -6784,6 +6785,8 @@ sub file_contents ($%)

          foreach (split (' ' , $targets))
            {
+             # FIXME: We are not robust to people defining several targets
+             # at once, only some of them being in %dependencies.
              if (defined $dependencies{$_})
                {
                  &depend ($_, @deps);
@@ -6795,18 +6798,8 @@ sub file_contents ($%)
                  # targets instead of one by one.
                  if (!defined $targets{$targets})
                    {
-                     # Some hair to avoid spurious trailing blank
-                     # when there are no dependencies.
-                     $result_rules .= "$separator$comment";
-                     $result_rules .= "$targets:";
-                     $result_rules .= " $dependencies"
-                       if $dependencies;
-                     $result_rules .= "\n";
-                     # Only add actions if we found some.  Otherwise
-                     # we can end up with a spurious newline.  See
-                     # pr87.test.
-                     $result_rules .= "$actions\n"
-                         if $actions;
+                     $result_rules .= "$separator$comment$paragraph\n";
+                     rule_define ($targets, 1, '', $.);
                    }
                  $comment = $separator = '';
                  last;
Index: m4/Makefile.in
--- m4/Makefile.in Thu, 08 Mar 2001 22:57:30 +0100 akim (am/h/15_Makefile.i 
1.32 644)
+++ m4/Makefile.in Thu, 08 Mar 2001 23:42:05 +0100 akim (am/h/15_Makefile.i 
1.32 644)
@@ -102,11 +102,11 @@

 .SUFFIXES:

-$(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnits  m4/Makefile

-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) && \
          CONFIG_HEADERS= CONFIG_LINKS= \
          CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
Index: tests/Makefile.in
--- tests/Makefile.in Thu, 08 Mar 2001 22:57:30 +0100 akim (am/h/14_Makefile.i 
1.35 644)
+++ tests/Makefile.in Thu, 08 Mar 2001 23:42:05 +0100 akim (am/h/14_Makefile.i 
1.35 644)
@@ -370,11 +370,11 @@

 .SUFFIXES:

-$(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnits  tests/Makefile

-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) && \
          CONFIG_HEADERS= CONFIG_LINKS= \
          CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status



reply via email to

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