Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$(MKZIP) is called for test0.zip even when not found #37

Open
mojca opened this issue Mar 2, 2018 · 2 comments
Open

$(MKZIP) is called for test0.zip even when not found #37

mojca opened this issue Mar 2, 2018 · 2 comments

Comments

@mojca
Copy link
Contributor

mojca commented Mar 2, 2018

With a bunch of tests on msys2, the zip binary was not found during configuration:

checking for zip... no
checking for pkzip... no

this apparently prevents some tests to be run (there's a condition for that in configure.ac), but not in all cases:

cd tmp && : ../test0.zip README
rm -r tmp
test -s test0.zip && cp -v test0.zip ../../zziplib/test/test.zip
make[3]: *** [Makefile:686: test0.zip] Error 1

The first like should have been

cd tmp && $(MKZIP) ../test0.zip README

but $(MKZIP) has not been set.

The following part is equally problematic:

zzshowme$(EXEEXT) : zzipself$(EXEEXT) zzipsetstub$(EXEEXT)
	$(MKZIP) -0 -j $@ .libs/zzipself$(EXEEXT)
	$(MKZIP) -9 -j $@ $(README)
	- test -s $@ || cp test2.zip $@
	test ! -f $@.zip || mv $@.zip $@
	./zzipsetstub $@ .libs/zzipself$(EXEEXT)
	- chmod +x $@

and results in

: -0 -j zzshowme.exe .libs/zzipself.exe
: -9 -j zzshowme.exe ../../zziplib/README
test -s zzshowme.exe || cp test2.zip zzshowme.exe
cp: cannot stat 'test2.zip': No such file or directory
make[2]: [Makefile:717: zzshowme.exe] Error 1 (ignored)
test ! -f zzshowme.exe.zip || mv zzshowme.exe.zip zzshowme.exe
./zzipsetstub zzshowme.exe .libs/zzipself.exe
zzshowme.exe: No such file or directory
@gdraheim
Copy link
Owner

gdraheim commented Mar 2, 2018

well, a zip-program is a requirement for test, sorry about that.

@mojca
Copy link
Contributor Author

mojca commented Mar 2, 2018

That's fine. But in that case the fact should be communicated to the user. For example, I would expect make check to fail immediately with unable to find zip when MKZIP is undefined. I would then know immediately what to do. The way it is now it's not even clear what exactly is going on, just some weird inexplicable failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants