On Tue, Dec 13, 2022, at 1:30 AM, Frederic Berat wrote: > On Mon, Dec 12, 2022 at 9:19 PM Zack Weinberg <z...@owlfolio.org> wrote: >> > --- a/t/ax/depcomp.sh >> > +++ b/t/ax/depcomp.sh >> > @@ -243,6 +243,7 @@ cat > sub/subfoo.h <<'END' >> > #include <stdio.h> >> > extern int subfoo (void); >> > END >> > +cp sub/subfoo.h sub/subfoo.save >> > >> > cat > src/baz.c <<'END' >> > #include "baz.h" >> > @@ -399,8 +400,7 @@ do_test () >> > && rewrite "$srcdir"/sub/subfoo.h echo 'choke me' \ >> > && not $MAKE \ >> > && delete "$srcdir"/sub/subfoo.h \ >> > - && edit "$srcdir"/sub/subfoo.c -e 1d \ >> > - && edit "$srcdir"/foo.h -e 2d \ >> > + && mv "$srcdir"/sub/subfoo.save "$srcdir"/sub/subfoo.h \ >> > && make_ok \ >> > || r='not ok' >> > result_ "$r" "$pfx dependency tracking works" >> >> These changes don't seem to have anything to do with the patch as >> described. They should be submitted separately. > > Actually, that is related. The edit removes the "#include subfoo.h" > line from foo.h, because the subfoo.h file got overwritten earlier. > This subfoo.h is the one that had the function declaration in ("extern > int subfoo (void);" specifically). > Either you need the original header back, or you need to get the > declaration back another way. I felt this way was easier than trying > to insert a declaration without breaking the test.
OK, I clearly don't understand what this test is doing, so I'm going to defer to someone else to review it. zw