From: Akim Demaille Date: Fri, 23 Mar 2001 16:50:29 +0000 (+0000) Subject: * automake.in (&file_contents): Use rule_define. X-Git-Tag: handle-languages~139 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=1add67080e5596fb80a647e441494b6f61cc3dc3;p=automake.git * automake.in (&file_contents): Use rule_define. --- diff --git a/ChangeLog b/ChangeLog index 8b2a7247..3f594dfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-03-23 Akim Demaille + + * automake.in (&file_contents): Use rule_define. + 2001-03-23 Akim Demaille * automake.in (¯o_define): Don't rely on $1. diff --git a/Makefile.in b/Makefile.in index 6bc48eff..6f93b597 100644 --- a/Makefile.in +++ b/Makefile.in @@ -140,11 +140,11 @@ all: all-recursive .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 @@ -153,7 +153,7 @@ $(ACLOCAL_M4): configure.in 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 @@ -181,7 +181,7 @@ uninstall-binSCRIPTS: 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 diff --git a/automake.in b/automake.in index f0d97a4d..4980f192 100755 --- a/automake.in +++ b/automake.in @@ -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; diff --git a/m4/Makefile.in b/m4/Makefile.in index 66c195b1..6ead21c7 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -99,11 +99,11 @@ all: all-am .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 diff --git a/tests/Makefile.in b/tests/Makefile.in index 0373c844..c29f544f 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -368,11 +368,11 @@ all: all-am .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