[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: FYI: PR 288
From: |
Tom Tromey |
Subject: |
Patch: FYI: PR 288 |
Date: |
13 Jan 2002 17:42:50 -0700 |
This fixes PR 288, and ansi2knr problem reported by Kevin Ryde.
It also adds modified version of a test case he wrote.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
For PR automake/288:
* automake.in (lang_c_rewrite): Set value for de_ansi_files entry
to directory.
(lang_c_finish): Likewise. Also, use directory information from
de_ansi_files.
2002-01-13 Kevin Ryde <address@hidden>
For PR automake/288:
* tests/Makefile.am (TESTS): Added ansi6.test.
* tests/ansi6.test: New file.
2002-01-13 Tom Tromey <address@hidden>
Index: Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.348
diff -u -r1.348 Makefile.in
--- Makefile.in 2002/01/13 19:49:21 1.348
+++ Makefile.in 2002/01/14 00:25:25
@@ -375,7 +375,7 @@
|| exit 1; \
fi; \
done
- for subdir in $(SUBDIRS); do \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1263
diff -u -r1.1263 automake.in
--- automake.in 2002/01/12 09:24:24 1.1263
+++ automake.in 2002/01/14 00:25:32
@@ -585,8 +585,10 @@
# This is a list of all targets to run during "make dist".
my @dist_targets;
-# Keys in this hash are the basenames of files which must depend
-# on ansi2knr.
+# Keys in this hash are the basenames of files which must depend on
+# ansi2knr. Values are either the empty string, or the directory in
+# which the ANSI source file appears; the directory must have a
+# trailing `/'.
my %de_ansi_files;
# This maps the source extension of a suffix rule to its
@@ -5164,7 +5166,9 @@
require_conf_file ("$am_file.am", FOREIGN, 'compile');
}
- $de_ansi_files{$base} = 1;
+ $de_ansi_files{$base} = (($directory eq '.' || $directory eq '')
+ ? ''
+ : "$directory/");
return $r;
}
@@ -5271,7 +5275,9 @@
{
if ($file =~ /^(.*)\.[cly]$/ && -f "$relative_dir/$file")
{
- $de_ansi_files{$1} = 1;
+ $de_ansi_files{$1} = (($relative_dir eq '.' || $relative_dir eq '')
+ ? ''
+ : "$relative_dir/");
}
}
@@ -5287,11 +5293,12 @@
# dir (because these files might be auto-generated. But
# we can't use $< -- some makes only define $< during a
# suffix rule.
- $output_rules .= ($base . "_.c: $base.c \$(ANSI2KNR)\n\t"
+ my $ansfile = $de_ansi_files{$base} . $base . '.c';
+ $output_rules .= ($base . "_.c: $ansfile \$(ANSI2KNR)\n\t"
. '$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) '
- . '`if test -f $(srcdir)/' . $base . '.c'
- . '; then echo $(srcdir)/' . $base . '.c'
- . '; else echo ' . $base . '.c; fi` '
+ . '`if test -f $(srcdir)/' . $ansfile
+ . '; then echo $(srcdir)/' . $ansfile
+ . '; else echo ' . $ansfile . '; fi` '
. "| sed 's/^# \\([0-9]\\)/#line \\1/' "
. '| $(ANSI2KNR) > ' . $base . "_.c"
# If ansi2knr fails then we shouldn't
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.371
diff -u -r1.371 Makefile.am
--- tests/Makefile.am 2002/01/13 20:33:40 1.371
+++ tests/Makefile.am 2002/01/14 00:25:32
@@ -24,6 +24,7 @@
ansi3.test \
ansi4.test \
ansi5.test \
+ansi6.test \
ar.test \
asm.test \
auxdir.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.479
diff -u -r1.479 Makefile.in
--- tests/Makefile.in 2002/01/13 20:33:40 1.479
+++ tests/Makefile.in 2002/01/14 00:25:32
@@ -96,6 +96,7 @@
ansi3.test \
ansi4.test \
ansi5.test \
+ansi6.test \
ar.test \
asm.test \
auxdir.test \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: FYI: PR 288,
Tom Tromey <=