Red Hat Bugzilla – Bug 1031929
The default target of v7/tests/Makefile should do necessary compilation work rather than cleaning the files when executing make
Last modified: 2016-06-03 09:59:15 EDT
Description of problem:
When executing "make" command under tests directory, since the first target is clean of Makefile, it will perform "make clean" for each test. It is not correct and supposed to do some necessary compilation work instead.
Version-Release number of selected component (if applicable):
Created attachment 825995 [details]
patch refine hwcert Makefile to make sure tests do necessary compilation work rather than cleaning/installing the files
I can't build the package with the patch. If I do:
typically, I've done the following to build the package:
Now when I do this I get rpm errors about arch-dependant files in a noarch package.
I think it's because "install" builds binaries in some of the tests with the patch.
I think the patch has confused the meaning of "install".
For the package, it means install the sources (mostly python).
For the tests, and means compilation in some cases.
So I don't think it's a good idea to have the default action "install" for the tests.
I just removed the "all" target from tests/Makefile. Seems to work.
We got this error because we want to build a noarch package which could be run on different arch. And in the process of rpmbuild will execute make, so under tests/ with "all" target some tests would be compiled.Then we got this error "Arch dependent binaries in noarch package". OTOH, If we wanna get a package which is specific to X86_64, like this hwcert-client-1.7.0-64.el7.x86_64.rpm in this case this error doesn't exist anymore.
So I think removing the "all" target from tests/Makefile will fix this issue.