diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2021-12-26 19:35:06 +0000 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2021-12-26 19:50:50 +0000 |
commit | d62ed0ce17d86fe12cb5ccb2f5b3a0e9c1f5613a (patch) | |
tree | b6f4442916f6f5920e37ea925a3daa972bbd84e2 /Makefile.in | |
parent | 899ca73b45ce2d8703fd35b6d2bc5a536cf935a7 (diff) | |
download | libpcap-d62ed0ce17d86fe12cb5ccb2f5b3a0e9c1f5613a.tar.gz |
Improve error detection in "make releasetar".
Commit 0cc4639 started to fail the left-hand side of the "tar | tar"
pipeline in "make releasetar", but not the full command, hence not the
make target, so make exited cleanly and the build matrix scripts did not
detect the error:
$ make releasetar
--- releasetar ---
tar: Win32/Prj/wpcap.sln: Cannot stat: No such file or directory
tar: Win32/Prj/wpcap.vcxproj: Cannot stat: No such file or directory
tar: Win32/Prj/wpcap.vcxproj.filters: Cannot stat: No such file or
directory
tar: Error exit delayed from previous errors.
$ ./build.sh
Add a dry run tar invocation before each of the two pipelines to make
this particular type of failure more likely to be detected:
$ make releasetar
tar: Win32/Prj/wpcap.sln: Cannot stat: No such file or directory
tar: Win32/Prj/wpcap.vcxproj: Cannot stat: No such file or directory
tar: Win32/Prj/wpcap.vcxproj.filters: Cannot stat: No such file or
directory
tar: Exiting with failure status due to previous errors
make: *** [Makefile:821: releasetar] Error 2
However, this is not a complete solution because a pipelined command
can still fail due to reasons irrelevant to the dry run. Perhaps it
would be better to move this logic to a separate shell script to match
the solution space to the problem space better.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 51261a25..9595068d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -823,8 +823,12 @@ releasetar: mkdir $$name && \ tar cf - $(COMMON_C_SRC) $(HDR) $(MAN1) \ $(MAN3PCAP_EXPAND) $(MAN3PCAP_NOEXPAND) $(MANFILE) \ + $(MANMISC) $(EXTRA_DIST) >/dev/null && \ + tar cf - $(COMMON_C_SRC) $(HDR) $(MAN1) \ + $(MAN3PCAP_EXPAND) $(MAN3PCAP_NOEXPAND) $(MANFILE) \ $(MANMISC) $(EXTRA_DIST) | \ (cd $$name; tar xf -) && \ + tar cf - $$name >/dev/null && \ tar cf - $$name | gzip >$$name.tar.gz && \ rm -rf $$name |